Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HistogramWidget: 'MultiScaleData' object has no attribute 'ndim' #251

Open
dstansby opened this issue Jan 23, 2024 · 1 comment
Open

HistogramWidget: 'MultiScaleData' object has no attribute 'ndim' #251

dstansby opened this issue Jan 23, 2024 · 1 comment
Labels
Bug Something isn't working

Comments

@dstansby
Copy link
Member

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'
@dstansby dstansby added the Bug Something isn't working label Jan 23, 2024
@dstansby
Copy link
Member Author

Looks like this might be fixed by napari/napari#6494

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant