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

iris.util.array_equal ignores differences in masks with dask arrays #6188

Open
bouweandela opened this issue Oct 24, 2024 · 2 comments
Open
Assignees

Comments

@bouweandela
Copy link
Member

🐛 Bug Report

How To Reproduce

Steps to reproduce the behaviour:

In [1]: import dask.array as da
   ...: from iris.util import array_equal

In [2]: array_equal(da.array([1, 2]), da.ma.masked_array([1, 3], mask=[0, 1]))
Out[2]: True

Expected behaviour

The return value should be False because the arrays have different masks.

For numpy arrays, this work fine:

In [1]: import numpy as np
   ...: from iris.util import array_equal

In [2]: array_equal(np.array([1, 2]), np.ma.masked_array([1, 3], mask=[0, 1]))
Out[2]: False

so I would expect the same for dask arrays.

Screenshots

Environment

  • OS & Version: Ubuntu 24.10
  • Iris Version: v3.10.0
@trexfeathers
Copy link
Contributor

I'm only skim reading but is the discussion on #4457 useful at all?

@bouweandela
Copy link
Member Author

Unfortunately not, the issue is also present in the current main branch

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

3 participants