Maybe change `testing.fast_array_utils.Flags` design
还没有人认领这个 Issue。
评估
调研方向
从链接的 pull request 讨论开始,检查当前 testing.fast_array_utils.Flags 的设计,尤其是 Flags.Any 和 Flags(0) 的处理方式。比较 issue 中描述的三个替代方案,并与维护者澄清预期语义。对于所有 ArrayTypes,达成一致的 flag 设计并确定相应行为后,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Continued from https://github.com/scverse/fast-array-utils/pull/30#discussion_r1967609696 (cc @ilan-gold)
Currently we have Flags.Any, which is set for all ArrayTypes, in order to make sure that for each ArrayType “at”,
at.flags & ~Flags(0)is truthy, andnot (at.flags & Flags(0))is true.
This isn’t trivially the case, since each flag represents an attribute, and its absence the inverse attribute, so there is always one group that has no flags set. With the current set of flags (sparse, gpu, dask, disk), this group contains numpy.ndarray)
Alternatives:
- don’t use
Flags(0)as default forskip, butNoneinstead (unintuitive, one would expectskip=Flags(0)to skip nothing) - use a flag that is the inverse of another, e.g.
Flags.Dense(there is no longer one obvious way to do things, e.g. shall we skip sparse or select dense?) - switch the flags to
NoDaskandNoDisk, so thatFlags(0)represents a combination that can never exist (might be elegant if there were were words to express these concepts without negation)
- 主要语言
- Python
- 星标
- 15
- 派生
- 5
- 平均合并
- 10 小时 33 分钟
- 30 天内合并 PR
- 9
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
scverse/fast-array-utils 的其他 Issue
-
难度 1/5 1-3 小时 新手友好度 74/100
scverse/fast-array-utils#165 ·
-
难度 5/5 一周以上 新手友好度 30/100
scverse/fast-array-utils#215 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 65/100
scverse/fast-array-utils#213 · 4 条评论 ·
-
难度 4/5 3-5 天 新手友好度 48/100
scverse/fast-array-utils#179 · 23 条评论 ·
-
type: numpy/scipy
难度 5/5 一周以上 新手友好度 25/100
scverse/fast-array-utils#128 ·
查看 scverse/fast-array-utils 的全部 Issue
相似的 Issue
-
agent-ready documentation needs-triage
难度 1/5 1-3 小时 新手友好度 88/100
-
documentation
难度 1/5 1 小时以内 新手友好度 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" 未关闭
难度 1/5 1 小时以内 新手友好度 92/100
-
instance instance add
难度 1/5 1 小时以内 新手友好度 72/100
searxng/searx-instances#939 · 1 条评论 ·
-
area-deployment area-integrations triage:bot-seen
难度 2/5 半天 新手友好度 86/100