MCPcopy
hub / github.com/numpy/numpy / _create_data

Method _create_data

numpy/ma/tests/test_core.py:1145–1158  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1143class TestMaskedArrayArithmetic:
1144 # Base test class for MaskedArrays.
1145 def _create_data(self):
1146 # Base data definition.
1147 x = np.array([1., 1., 1., -2., pi / 2.0, 4., 5., -10., 10., 1., 2., 3.])
1148 y = np.array([5., 0., 3., 2., -1., -4., 0., -10., 10., 1., 0., 3.])
1149 a10 = 10.
1150 m1 = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
1151 m2 = [0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1]
1152 xm = masked_array(x, mask=m1)
1153 ym = masked_array(y, mask=m2)
1154 z = np.array([-.5, 0., .5, .8])
1155 zm = masked_array(z, mask=[0, 1, 0, 0])
1156 xf = np.where(m1, 1e+20, x)
1157 xm.set_fill_value(1e+20)
1158 return x, y, a10, m1, m2, xm, ym, z, zm, xf
1159
1160 def test_basic_arithmetic(self):
1161 # Test of basic arithmetic.

Callers 6

test_basic_arithmeticMethod · 0.95
test_basic_ufuncsMethod · 0.95
test_minmax_funcMethod · 0.95
test_minmax_methodsMethod · 0.95
test_addsumprodMethod · 0.95
test_modMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected