HistogramWidget: 'MultiScaleData' object has no attribute 'ndim'
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 30/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- python
调研方向
从 napari_matplotlib/histogram.py 中的 HistogramWidget.draw 开始,重点查看访问 layer.data.ndim 的第 72 行。将报告中的 zarr 数据加载到 napari 中以复现错误,并跟踪 MultiScaleData 如何提供给 widget。当 HistogramWidget 能够处理这些数据且不引发报告的 AttributeError 时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Getting this error trying to use HistogramWidget with some zarr data loaded into napari:
File ~/miniconda3/lib/python3.11/site-packages/napari_matplotlib/histogram.py:72, in HistogramWidget.draw(self=<napari_matplotlib.histogram.HistogramWidget object>)
67 """
68 Clear the axes and histogram the currently selected layer/slice.
69 """
70 layer = self.layers[0]
---> 72 if layer.data.ndim - layer.rgb == 3:
layer = <Image layer 'full_rebinned_4' at 0x16d1ad390>
layer.rgb = False
73 # 3D data, can be single channel or RGB
74 data = layer.data[self.current_z]
75 self.axes.set_title(f"z={self.current_z}")
AttributeError: 'MultiScaleData' object has no attribute 'ndim'
- 主要语言
- Python
- 星标
- 50
- 派生
- 24
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
matplotlib/napari-matplotlib 的其他 Issue
-
Bug Styling
难度 3/5 1-2 天 新手友好度 42/100
matplotlib/napari-matplotlib#235 · 1 条评论 ·
-
New feature
难度 3/5 1-2 天 新手友好度 38/100
matplotlib/napari-matplotlib#196 ·
-
New feature
难度 2/5 1-3 小时 新手友好度 45/100
matplotlib/napari-matplotlib#195 ·
-
good first issue Styling
难度 3/5 1-2 天 新手友好度 48/100
matplotlib/napari-matplotlib#141 ·
-
New feature
难度 5/5 一周以上 新手友好度 25/100
matplotlib/napari-matplotlib#66 · 1 条评论 · 2 个 reaction ·
查看 matplotlib/napari-matplotlib 的全部 Issue
相似的 Issue
-
[Doc]: Feedback for `/zh-cn/v0.30.0/tutorials/models/Qwen3.6-35B-A3B.html`A3社区配置和基线不一致,社区配置也达不到基线未关闭documentation
难度 2/5 1-3 小时 新手友好度 62/100
vllm-project/vllm-ascend#24429 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
nq-rdl/agent-extensions#623 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
vortex-data/vortex#12633 ·
维护者通常 1 天内回复
-
needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
gke-labs/kube-agents#7955 ·
维护者通常 1 天内回复