Shape-typing and narrower dtypes for `{lin,log,geom}space`
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- numpy, python
调研方向
从 numpy._core.function_base 开始,检查 linspace、logspace 和 geomspace 的类型标注。更新它们推断出的返回类型,使其使用所请求的一维 shape 和更窄的 dtype,然后验证示例 np.linspace(0, 1) 被推断为 np.ndarray[tuple[int], np.dtype[np.float64]]。
由索引模型根据 Issue 内容生成。
描述
Currently,np.linspace(0, 1) is inferred as npt.NDArray[np.floating]. This should be narrowed to np.ndarray[tuple[int], np.dtype[np.float64]].
These three functions live in numpy._core.function_base
- 主要语言
- Python
- 星标
- 80
- 派生
- 9
- 平均合并
- 3 分钟
- 30 天内合并 PR
- 3
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
numpy/numtype 的其他 Issue
-
topic: documentation
难度 2/5 1-3 小时 新手友好度 68/100
-
topic: documentation
难度 4/5 3-5 天 新手友好度 35/100
-
long pyright analysis times可能重新可做 @jorenham 于 428 天前认领,目前没有进行中的 PR。 未关闭blame: Pyright tool: basedpyright
-
numpy.generic stubs: Incomplete
难度 3/5 1-2 天 新手友好度 35/100
-
_numtype stubs: Refactor
难度 3/5 1-2 天 新手友好度 45/100
相似的 Issue
-
area: desktop area: website priority: P2 type: feature
难度 2/5 1-3 小时 新手友好度 62/100
appandflow/stim#3411 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1 小时以内 新手友好度 88/100
baptistehamon/lsapy#185 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
PolicyEngine/policyengine-us#10073 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
syedhamidali/radarx#277 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
Arekkazu/sgpmp-backend#549 ·
维护者通常 1 天内回复