Was working in napari with someone yesterday and one of their images revealed an issue with napari's handling of singleton dimensions:
import napari, numpy
with napari.gui_qt():
napari.view_image(numpy.random.rand(10,1,10,10))

(see dimensions sliders 馃枙)
this would be solved visually easily enough by adding np.squeeze somewhere in magic_imread, but i'm not sure that's necessarily what we want to do here. perhaps dealing with them in the dims model is more appropriate? If anyone has a preference on how to tackle this, I'm happy to submit a PR
That must have crept back in there when adding labels / play buttons as we've had that issue a while back - see #409. I think there the approach was to not call squeeze, but to just change the display logic in the qt_dims, and I lean to still taking that approach here - i.e. if someone has 5D data with a singleton dim I shouldn't convert that to 4D data, I should just know not to show them a slider they don't need, and the sliders should still be numbered by default according to the original dims.
How does that sound @tlambert03? It would be great if you can fix / add better tests / see what the current tests we have (if any) for singletons are doing now
sounds good. will take a look
@tlambert03 I am working on a fix for this now, will make a PR soon. hope that's ok