DataArray aware `pint.context`
还没有人认领这个 Issue。
评估
调研方向
No files or tests are named. Start by tracing the DataArray.pint.to("nm") accessor and reviewing how Pint contexts and decorators accept variables; clarify whether upstream Pint support is required. Done would mean an agreed API and tests showing a context variable can be obtained from the current DataArray coordinate.
由索引模型根据 Issue 内容生成。
描述
For example, consider the spectroscopy context:
@context(n=1) spectroscopy = sp
There the conversion depends on the variable n used. Now, consider a DataArray/DataSet where n is a dimension/coordinate. Then when calling DataArray.pint.to("nm") we would want the variable n to be dynamically imported from the current context of the DataArray coordinate.
API-wise I am not sure how that would work, maybe by passing a list/dict of context objects (+ variables)? This might also involve upstream pint support for more complicated context and decorators.
- 主要语言
- Python
- 星标
- 120
- 派生
- 16
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
xarray-contrib/pint-xarray 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 48/100
xarray-contrib/pint-xarray#362 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 45/100
xarray-contrib/pint-xarray#361 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 55/100
xarray-contrib/pint-xarray#303 · 3 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
xarray-contrib/pint-xarray#271 · 7 条评论 ·
-
难度 5/5 一周以上 新手友好度 20/100
xarray-contrib/pint-xarray#269 · 3 条评论 ·
查看 xarray-contrib/pint-xarray 的全部 Issue
相似的 Issue
-
bug Size: XS
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
oposs/repo-infra#93 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 69/100
Graphify-Labs/graphify#4546 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 65/100
521xueweihan/HelloGitHub#4025 ·