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

Method test_testBasic1d

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

Source from the content-addressed store, hash-verified

113 return x, y, a10, m1, m2, xm, ym, z, zm, xf, s
114
115 def test_testBasic1d(self):
116 # Test of basic array creation and properties in 1 dimension.
117 x, _, _, m1, _, xm, _, _, _, xf, s = self._create_data()
118 assert_(not isMaskedArray(x))
119 assert_(isMaskedArray(xm))
120 assert_equal(shape(xm), s)
121 assert_equal(xm.shape, s)
122 assert_equal(xm.dtype, x.dtype)
123 assert_equal(xm.size, reduce(lambda x, y: x * y, s))
124 assert_equal(count(xm), len(m1) - reduce(lambda x, y: x + y, m1))
125 assert_(eq(xm, xf))
126 assert_(eq(filled(xm, 1.e20), xf))
127 assert_(eq(x, xm))
128
129 @pytest.mark.parametrize("s", [(4, 3), (6, 2)])
130 def test_testBasic2d(self, s):

Callers

nothing calls this directly

Calls 8

_create_dataMethod · 0.95
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