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

Fix array_equal behaviour for masked arrays #4457

Merged
merged 8 commits into from
Jun 19, 2024
Next Next commit
fix array_equal behaviour for masked arrays
  • Loading branch information
stephenworsley committed Dec 10, 2021
commit 474f0831695dcf4498b35541a6141a3cc4ac5828
3 changes: 2 additions & 1 deletion lib/iris/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,8 @@ def array_equal(array1, array2, withnans=False):

def normalise_array(array):
if not is_lazy_data(array):
array = np.asarray(array)
if not ma.isMaskedArray(array):
pp-mo marked this conversation as resolved.
Show resolved Hide resolved
array = np.asarray(array)
pp-mo marked this conversation as resolved.
Show resolved Hide resolved
return array

array1, array2 = normalise_array(array1), normalise_array(array2)
Expand Down
Loading