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

Method test_ediff1d

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

Source from the content-addressed store, hash-verified

1550 assert_equal(test[2], [0])
1551
1552 def test_ediff1d(self):
1553 # Tests mediff1d
1554 x = masked_array(np.arange(5), mask=[1, 0, 0, 0, 1])
1555 control = array([1, 1, 1, 4], mask=[1, 0, 0, 1])
1556 test = ediff1d(x)
1557 assert_equal(test, control)
1558 assert_equal(test.filled(0), control.filled(0))
1559 assert_equal(test.mask, control.mask)
1560
1561 def test_ediff1d_tobegin(self):
1562 # Test ediff1d w/ to_begin

Callers

nothing calls this directly

Calls 4

arrayFunction · 0.90
ediff1dFunction · 0.90
assert_equalFunction · 0.90
filledMethod · 0.45

Tested by

no test coverage detected