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

Method test_testBasic1d

numpy/ma/tests/test_old_ma.py:53–65  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

51 self.d = (x, y, a10, m1, m2, xm, ym, z, zm, xf, s)
52
53 def test_testBasic1d(self):
54 # Test of basic array creation and properties in 1 dimension.
55 (x, y, a10, m1, m2, xm, ym, z, zm, xf, s) = self.d
56 assert_(not isMaskedArray(x))
57 assert_(isMaskedArray(xm))
58 assert_equal(shape(xm), s)
59 assert_equal(xm.shape, s)
60 assert_equal(xm.dtype, x.dtype)
61 assert_equal(xm.size, reduce(lambda x, y:x * y, s))
62 assert_equal(count(xm), len(m1) - reduce(lambda x, y:x + y, m1))
63 assert_(eq(xm, xf))
64 assert_(eq(filled(xm, 1.e20), xf))
65 assert_(eq(x, xm))
66
67 @pytest.mark.parametrize("s", [(4, 3), (6, 2)])
68 def test_testBasic2d(self, s):

Callers

nothing calls this directly

Calls 7

assert_Function · 0.90
isMaskedArrayFunction · 0.90
assert_equalFunction · 0.90
shapeFunction · 0.90
filledFunction · 0.90
countFunction · 0.85
eqFunction · 0.85

Tested by

no test coverage detected