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

Method _create_data

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

Source from the content-addressed store, hash-verified

159
160 # message for warning filters
161 def _create_data(self):
162 # Base data definition.
163 x = np.array([1., 1., 1., -2., pi / 2.0, 4., 5., -10., 10., 1., 2., 3.])
164 y = np.array([5., 0., 3., 2., -1., -4., 0., -10., 10., 1., 0., 3.])
165 a10 = 10.
166 m1 = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
167 m2 = [0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1]
168 xm = masked_array(x, mask=m1)
169 ym = masked_array(y, mask=m2)
170 z = np.array([-.5, 0., .5, .8])
171 zm = masked_array(z, mask=[0, 1, 0, 0])
172 xf = np.where(m1, 1e+20, x)
173 xm.set_fill_value(1e+20)
174 return x, y, a10, m1, m2, xm, ym, z, zm, xf
175
176 def test_basicattributes(self):
177 # Tests some basic array attributes.

Callers 5

test_basic1dMethod · 0.95
test_basic2dMethod · 0.95
test_asarrayMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected