MCPcopy Create free account
hub / github.com/numpy/numpy / test_different_field_order

Method test_different_field_order

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

Source from the content-addressed store, hash-verified

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