Ejemplo n.º 1
0
 def test_union1d(self):
     # Test union1d
     a = array([1, 2, 5, 7, 5, -1], mask=[0, 0, 0, 0, 0, 1])
     b = array([1, 2, 3, 4, 5, -1], mask=[0, 0, 0, 0, 0, 1])
     test = union1d(a, b)
     control = array([1, 2, 3, 4, 5, 7, -1], mask=[0, 0, 0, 0, 0, 0, 1])
     assert_equal(test, control)
     #
     assert_array_equal([], union1d([], []))
Ejemplo n.º 2
0
 def test_union1d(self):
     # Test union1d
     a = array([1, 2, 5, 7, 5, -1], mask=[0, 0, 0, 0, 0, 1])
     b = array([1, 2, 3, 4, 5, -1], mask=[0, 0, 0, 0, 0, 1])
     test = union1d(a, b)
     control = array([1, 2, 3, 4, 5, 7, -1], mask=[0, 0, 0, 0, 0, 0, 1])
     assert_equal(test, control)
     #
     assert_array_equal([], union1d([], []))