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

Method test_different_field_order

numpy/lib/tests/test_recfunctions.py:891–897  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

889 assert_equal(test, control)
890
891 def test_different_field_order(self):
892 # gh-8940
893 a = np.zeros(3, dtype=[('a', 'i4'), ('b', 'f4'), ('c', 'u1')])
894 b = np.ones(3, dtype=[('c', 'u1'), ('b', 'f4'), ('a', 'i4')])
895 # this should not give a FutureWarning:
896 j = join_by(['c', 'b'], a, b, jointype='inner', usemask=False)
897 assert_equal(j.dtype.names, ['b', 'c', 'a1', 'a2'])
898
899 def test_duplicate_keys(self):
900 a = np.zeros(3, dtype=[('a', 'i4'), ('b', 'f4'), ('c', 'u1')])

Callers

nothing calls this directly

Calls 2

join_byFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected