-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Iris coords bounds indexing broken with multiple ellipsis #2425
Comments
This exposes a problem with the travis testing. I notice that the iris travis tests still appear to be using numpy v1.10 but I get numpy v1.12 (the latest) via a conda install iris with the conda forge channel (where one get's iris v1.12 right now). Since iris supports later versions of numpy, I think this exposes a bug and a frailty of testing here. |
this is being actively worked on by myself and @djkirkham i know there are changes staged for the coord API to avoid double ellipsis |
Great news, let me know if I can help in any way. |
writing a test case for us which catches the failure mode you are interested in would help the only failure i remember seeing was fixed inside but this is exactly here:
iirc |
That's right the failure is indeed in iris.coord. I mentioned |
@marqh do you have an open PR/issue?
See the ticket description. Happy to turn this into a failing unittest for your branch if you want. |
Here's an error I got today which might be relevant to this bug (and might be a good test case):
|
I believe #2440 has fixed this issue, as part of a review of version dependencies @cpelley @DamienIrving |
I'll confirm shortly, just have numpy building. @DamienIrving, if you can provide me a small isolated example to run, I can see if I can run it for you? |
Confirmed, example in the ticket description now works. Cheers |
@cpelley If you have any cube with a time axis and try the following you'll get the error:
|
@DamienIrving I can confirm the following works for me now with iris master: >>> import iris.tests.stock
>>> import iris.coord_categorisation
>>> import numpy as np
>>> np.__version__
'1.12.1'
>>> cube = iris.tests.stock.realistic_3d()
>>> iris.coord_categorisation.add_year(cube, 'time')
>>> cube.aggregated_by(['year'], iris.analysis.MEAN)
<iris 'Cube' of air_potential_temperature / (K) (time: 1; grid_latitude: 9; grid_longitude: 11)> You happy for me to close this issue? |
@cpelley Thanks! I'd be happy for you to close the issue. Do you know how long it might be before this change is available to those who install iris via conda? The inability to create an annual mean timeseries is rather crippling for many of my workflows. |
@cpelley I found a good solution - I simply used conda to downgrade the version of numpy currently installed:
|
I'm afraid I haven't heard any talk of a new point release in the works. iris v2 release appears to be the main drive right now which is hoped for ~June. @SciTools/iris-devs can correct me if I'm wrong.
Yes our project does the same :) |
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.Here is a partial traceback:
Workaround is to explicitly specify numpy as one of our dependencies and pin its version to 1.11
The text was updated successfully, but these errors were encountered: