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

Method test_unique_allmasked

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

Source from the content-addressed store, hash-verified

1535 assert_equal(test[2], [0, 0, 3, 1, 3, 2])
1536
1537 def test_unique_allmasked(self):
1538 # Test all masked
1539 data = masked_array([1, 1, 1], mask=True)
1540 test = unique(data, return_index=True, return_inverse=True)
1541 assert_equal(test[0], masked_array([1, ], mask=[True]))
1542 assert_equal(test[1], [0])
1543 assert_equal(test[2], [0, 0, 0])
1544 #
1545 # Test masked
1546 data = masked
1547 test = unique(data, return_index=True, return_inverse=True)
1548 assert_equal(test[0], masked_array(masked))
1549 assert_equal(test[1], [0])
1550 assert_equal(test[2], [0])
1551
1552 def test_ediff1d(self):
1553 # Tests mediff1d

Callers

nothing calls this directly

Calls 2

uniqueFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected