MCPcopy
hub / github.com/pydata/xarray / array_notnull_equiv

Function array_notnull_equiv

xarray/core/duck_array_ops.py:375–388  ·  view source on GitHub ↗

Like np.array_equal, but also allows values to be NaN in either or both arrays

(arr1, arr2)

Source from the content-addressed store, hash-verified

373
374
375def array_notnull_equiv(arr1, arr2):
376 """Like np.array_equal, but also allows values to be NaN in either or both
377 arrays
378 """
379 arr1 = asarray(arr1)
380 arr2 = asarray(arr2)
381 lazy_equiv = lazy_array_equiv(arr1, arr2)
382 if lazy_equiv is None:
383 with warnings.catch_warnings():
384 warnings.filterwarnings("ignore", "In the future, 'NAT == x'")
385 flag_array = (arr1 == arr2) | isnull(arr1) | isnull(arr2)
386 return bool(array_all(flag_array))
387 else:
388 return lazy_equiv
389
390
391def count(data, axis=None):

Callers 4

test_equalMethod · 0.90
test_some_not_equalMethod · 0.90
test_wrong_shapeMethod · 0.90
test_typesMethod · 0.90

Calls 4

asarrayFunction · 0.85
lazy_array_equivFunction · 0.85
isnullFunction · 0.85
array_allFunction · 0.85

Tested by 4

test_equalMethod · 0.72
test_some_not_equalMethod · 0.72
test_wrong_shapeMethod · 0.72
test_typesMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…