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

Method test_unique_allmasked

numpy/ma/tests/test_extras.py:1493–1506  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1491 assert_equal(test[2], [0, 0, 3, 1, 3, 2])
1492
1493 def test_unique_allmasked(self):
1494 # Test all masked
1495 data = masked_array([1, 1, 1], mask=True)
1496 test = unique(data, return_index=True, return_inverse=True)
1497 assert_equal(test[0], masked_array([1, ], mask=[True]))
1498 assert_equal(test[1], [0])
1499 assert_equal(test[2], [0, 0, 0])
1500 #
1501 # Test masked
1502 data = masked
1503 test = unique(data, return_index=True, return_inverse=True)
1504 assert_equal(test[0], masked_array(masked))
1505 assert_equal(test[1], [0])
1506 assert_equal(test[2], [0])
1507
1508 def test_ediff1d(self):
1509 # Tests mediff1d

Callers

nothing calls this directly

Calls 2

uniqueFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected