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

Method test_outer_join

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

_create_arraysMethod · 0.95
join_byFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected