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

Method test_ndenumerate_nomasked

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

Source from the content-addressed store, hash-verified

1753class TestNDEnumerate:
1754
1755 def test_ndenumerate_nomasked(self):
1756 ordinary = np.arange(6.).reshape((1, 3, 2))
1757 empty_mask = np.zeros_like(ordinary, dtype=bool)
1758 with_mask = masked_array(ordinary, mask=empty_mask)
1759 assert_equal(list(np.ndenumerate(ordinary)),
1760 list(ndenumerate(ordinary)))
1761 assert_equal(list(ndenumerate(ordinary)),
1762 list(ndenumerate(with_mask)))
1763 assert_equal(list(ndenumerate(with_mask)),
1764 list(ndenumerate(with_mask, compressed=False)))
1765
1766 def test_ndenumerate_allmasked(self):
1767 a = masked_all(())

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
ndenumerateFunction · 0.90
reshapeMethod · 0.80

Tested by

no test coverage detected