Open shoyer opened 8 years ago
This test looks wrong to me, I don't think the .all()
should be there. You'd know more about comparing xarray coordinates than me, what is the best way to write this? I don't really use xarray much, and I implemented this whilst still learning how xarray works, errors and areas for improvement are inevitable.
I think this is actually a pretty reasonable way to compare coordinates. And, if my guess is correct, this is actually a subtle NumPy bug/issue: arrays of different length compare as False
instead of raising TypeError when compared.
I would simply replace (uc == vc).all()
with np.all(uc == vc)
. That should fix the bool
issue.
Adapted from the sfvp example: