-
-
Notifications
You must be signed in to change notification settings - Fork 12k
Open
Labels
Description
Proposed new feature or change:
Working with masked arrays, unit tests often need to check if a function returns the expected masked array.
However, doing it with assert_array_equal is error prone because masked dimensions will not be compared.
Hence this will succeed:
ret = tested_function() # suppose returned np.ma.MaskedArray([4.0], mask=[True])
assert_array_equal(ret, np.array([3.0]))
May an equal_mask flag could be added so that the function compares that, for each item, both or none are masked