Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Proposal to migrate `DelayedMask` to the DelayedArray package

未关闭
#122 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
20/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
r
领域
data, performance

调研方向

首先检查 alabaster.matrix 中的 DelayedMask 实现,以及 DelayedArray 对延迟 [<- 的处理,包括 DelayedNaryIsoOp 和 extract_*_array() 调用。确定迁移或通用掩码是否应归入 DelayedArray,并记录提议的行为和效率权衡;完成工作需要达成一致的实现范围或由 maintainer 作出决定。

由索引模型根据 Issue 内容生成。

描述

My alabaster.matrix package has a DelayedMask class that replaces all instances of a placeholder with an NA value during extract_*_array() calls. Essentially, it is equivalent to:

library(DelayedArray)
y <- DelayedArray(matrix(rbinom(100, 1, 0.2), ncol=5))
placeholder <- 1

z <- y
z[z == placeholder] <- NA

# Gives the same (abstract) matrix contents as:
alabaster.matrix::DelayedMask(y, placeholder)

AFAICT the DelayedMask approach should be more efficient as the DelayedMask only realizes one matrix while the delayed [<- requires realization of both z and z == placeholder. (Currently DelayedMask is literally for masking NAs but it could be generalized to handle more boolean operations, e.g., so z[z > cap] <- cap could be used to upper-bound the contents of the matrix.)

Would this be of interest to the DelayedArray package? Perhaps there might be an easy way that we can detect that the logical subset is generated from the same matrix that it is operating on in [<-, and switch from creating a DelayedNaryIsoOp to a DelayedMask.

主要语言
R
星标
29
派生
12
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Bioconductor/DelayedArray 的其他 Issue

查看 Bioconductor/DelayedArray 的全部 Issue

相似的 Issue

更多 R Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。