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

Method test_no_r1postfix

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

Source from the content-addressed store, hash-verified

967 dtype=[('a', int), ('b', int), ('d', int)])
968
969 def test_no_r1postfix(self):
970 # Basic test of join_by no_r1postfix
971 a, b = self.a, self.b
972
973 test = join_by(
974 'a', a, b, r1postfix='', r2postfix='2', jointype='inner')
975 control = np.array([(0, 50, 65, 100, 100), (1, 51, 66, 101, 101),
976 (2, 52, 67, 102, 102), (3, 53, 68, 103, 103),
977 (4, 54, 69, 104, 104), (5, 55, 70, 105, 105),
978 (6, 56, 71, 106, 106), (7, 57, 72, 107, 107),
979 (8, 58, 73, 108, 108), (9, 59, 74, 109, 109)],
980 dtype=[('a', int), ('b', int), ('b2', int),
981 ('c', int), ('d', int)])
982 assert_equal(test, control)
983
984 def test_no_postfix(self):
985 assert_raises(ValueError, join_by, 'a', self.a, self.b,

Callers

nothing calls this directly

Calls 2

join_byFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected