MCPcopy Index your code
hub / github.com/numpy/numpy / assert_equal_records

Function assert_equal_records

numpy/ma/testutils.py:100–111  ·  view source on GitHub ↗

Asserts that two records are equal. Pretty crude for now.

(a, b)

Source from the content-addressed store, hash-verified

98
99
100def assert_equal_records(a, b):
101 """
102 Asserts that two records are equal.
103
104 Pretty crude for now.
105
106 """
107 assert_equal(a.dtype, b.dtype)
108 for f in a.dtype.names:
109 (af, bf) = (operator.getitem(a, f), operator.getitem(b, f))
110 if not (af is masked) and not (bf is masked):
111 assert_equal(operator.getitem(a, f), operator.getitem(b, f))
112
113
114def assert_equal(actual, desired, err_msg=''):

Callers 15

test_byviewMethod · 0.90
test_getMethod · 0.90
test_hardmaskMethod · 0.90
test_picklingMethod · 0.90
test_exotic_formatsMethod · 0.90
test_view_by_itselfMethod · 0.90
test_fromarraysMethod · 0.90
test_fromrecordsMethod · 0.90
test_toflexMethod · 0.90

Calls 1

assert_equalFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…