Skip to content
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

Resolve numpy deprecation: using large arrays as indexes for slicing #5530

Open
Tracked by #5466
ESadek-MO opened this issue Oct 5, 2023 · 0 comments
Open
Tracked by #5466

Comments

@ESadek-MO
Copy link
Contributor

ESadek-MO commented Oct 5, 2023

📰 Custom Issue

Written up from #5465.

Currently we use arrays as indexes used in slicing, this behavior is soon to be unsupported.
Relevant warning copied below.

lib/iris/tests/experimental/regrid/test_regrid_area_weighted_rectilinear_src_and_grid.py::TestAreaWeightedRegrid::test_lazy_nop
lib/iris/tests/integration/analysis/test_area_weighted.py::AreaWeightedTests::test_regrid_area_w_lazy
lib/iris/tests/integration/analysis/test_area_weighted.py::AreaWeightedTests::test_regrid_area_w_lazy_chunked
lib/iris/tests/unit/analysis/area_weighted/test_AreaWeightedRegridder.py::TestLazy::test_output_lazy
lib/iris/tests/unit/analysis/area_weighted/test_AreaWeightedRegridder.py::TestLazy::test_src_stays_lazy
lib/iris/analysis/_area_weighted.py:606: DeprecationWarning: Out of bound index found. This was previously ignored when the indexing result contained no elements. In the future the index error will be raised. This error occurs either due to an empty slice, or if an array has zero elements even before indexing.
 (Use `warnings.simplefilter('error')` to turn this DeprecationWarning into an error and get more details on the invalid index.)
   src_area_datas_square = src_data[
       ..., square_data_indices_y, square_data_indices_x
   ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant