Skip to content

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

Closed
@bouweandela

Description

@bouweandela

🐛 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions