Remove unnecessary move to `numpy` space w/ slow `array` calls
@sadielbartholomew 已经在做这个了。
开始于 2025年4月4日。
评估
这个 Issue 还没有评估数据。
描述
The cf-plot code frequently calls the array attribute to extract some data array to store as a an variable and process using numpy operations, which is slow(er) because it bypasses the lazy and optimised Dask approach of cf-python for handling the underlying arrays, ultimately calling a compute to calculate the whole array at that point. Such calls to array and subsequent use of numpy operations is very often avoidable.
So, we should do a pass through of the code and survey as to cases where this is done, then convert them to stay in cf-python/dask space unless there is a very good reason not to. The ideal point to compute the underlying data array is at the end of the logical chain when the data is immediately required for the generation of the plot in being sent to a Cartopy or matplotlib method to make the appropriate marks on the image file. Calculating the array any earlier than this could well be unnecessary and degrade performance.
- 主要语言
- Python
- 星标
- 21
- 派生
- 11
- 平均合并
- 7 小时 11 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NCAS-CMS/cf-plot 的其他 Issue
-
testing
难度 3/5 1-2 天 新手友好度 58/100
-
docs enhancement
难度 3/5 1-2 天 新手友好度 64/100
-
Add animation hooks into cf-plot可能重新可做 @bnlawrence 于 98 天前认领,目前没有进行中的 PR。 未关闭enhancement
-
bug v35plus
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 45/100
相似的 Issue
-
area/i18n comp/desktop P3 type/feature
难度 2/5 1-3 小时 新手友好度 65/100
NousResearch/hermes-agent#134377 ·
维护者通常 1 天内回复
-
good first issue needs-triage priority: medium
难度 2/5 1-3 小时 新手友好度 78/100
melodic-software/claude-code-plugins#6499 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
ssciwr/clang-format-wheel#167 ·
-
conda skeleton cran has SSL_NO_VERIFY check inverted and TLS verification off by default可能已有人在做 @matthewfeickert 今天认领。 未关闭type::bug
难度 2/5 1-3 小时 新手友好度 82/100
conda/conda-build#6202 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复