Open rchurt opened 4 years ago
Thanks for the thoughtful writeup.
The next problem is that if I go to plot a dataset with an unnecessary dimension...
This is definitely a bug (or rather a regression), you should not get a widget for a constant dimension.
The larger issue of dropping dimensions on select I also agree with and something that has bothered me before. Given the backward compatibility constraints here I would say we should start by implementing a drop
keyword or similar on select
and then consider making it the default for 2.0.
Agreed, sounds like a good plan!
ALL software version info
Google Colab Chrome 84.0.4147.89
Description of expected behavior and the observed behavior
Let's say I create and slice a Dataset like so:
The first problem is that the
.select()
keeps unnecessary dimensions. For example, compare the output of this......to slicing the original
xarray
......and you'll see that the slice of the original
xarray
doesn't keep the unnecessary dimensionz
.The next problem is that if I go to plot a dataset with an unnecessary dimension...
...it gives a dropdown to select the unnecessary dimension...
...when what I really want is this:
In this example it's not much of a problem to have the extra dimension there, but it was a problem for me when I then tried to use that dimension later (i.e., to iterate through it to make a
GridSpace
) because each plot in theGridSpace
still has the dimension, but different values for it.Fixing either of these issues (i.e., the extra dimensions being kept by
.select()
and being plotted) would fix the problem, but perhaps it would be worth fixing both?