Skip to content

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

@dstansby

Description

@dstansby

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy