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

Method test_outer_join

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

Source from the content-addressed store, hash-verified

843 assert_equal(res, bar.view(ma.MaskedArray))
844
845 def test_outer_join(self):
846 a, b = self.a, self.b
847
848 test = join_by(('a', 'b'), a, b, 'outer')
849 control = ma.array([(0, 50, 100, -1), (1, 51, 101, -1),
850 (2, 52, 102, -1), (3, 53, 103, -1),
851 (4, 54, 104, -1), (5, 55, 105, -1),
852 (5, 65, -1, 100), (6, 56, 106, -1),
853 (6, 66, -1, 101), (7, 57, 107, -1),
854 (7, 67, -1, 102), (8, 58, 108, -1),
855 (8, 68, -1, 103), (9, 59, 109, -1),
856 (9, 69, -1, 104), (10, 70, -1, 105),
857 (11, 71, -1, 106), (12, 72, -1, 107),
858 (13, 73, -1, 108), (14, 74, -1, 109)],
859 mask=[(0, 0, 0, 1), (0, 0, 0, 1),
860 (0, 0, 0, 1), (0, 0, 0, 1),
861 (0, 0, 0, 1), (0, 0, 0, 1),
862 (0, 0, 1, 0), (0, 0, 0, 1),
863 (0, 0, 1, 0), (0, 0, 0, 1),
864 (0, 0, 1, 0), (0, 0, 0, 1),
865 (0, 0, 1, 0), (0, 0, 0, 1),
866 (0, 0, 1, 0), (0, 0, 1, 0),
867 (0, 0, 1, 0), (0, 0, 1, 0),
868 (0, 0, 1, 0), (0, 0, 1, 0)],
869 dtype=[('a', int), ('b', int),
870 ('c', int), ('d', int)])
871 assert_equal(test, control)
872
873 def test_leftouter_join(self):
874 a, b = 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