-
Notifications
You must be signed in to change notification settings - Fork 301
Closed
Description
In numpy v1.12.0 it is no longer simply deprecated to index with a double ellipsis, it is now enforced by an IndexError exception raised. Here is the relevant numpy change.
This exposes a bug in iris as iris.util.column_slices_generator can return an ellipsis, then an additional ellipsis is also appended here.
>>> import numpy as np
>>> import iris.coords.DimCoord as DimCoord
>>> np.__version__
'1.12.0'
>>> coord = DimCoord([-1, 0, 1, 2])
>>> coord.guess_bounds()
>>> coord[np.array([0, 3])]
*** IndexError: an index can only have a single ellipsis ('...')Here is a partial traceback:
...
coord = super(DimCoord, self).__getitem__(key)
File "/path/to/iris/coords.py", line 496, in __getitem__
bounds = bounds[keys + (Ellipsis, )]
IndexError: an index can only have a single ellipsis ('...')Workaround is to explicitly specify numpy as one of our dependencies and pin its version to 1.11
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels