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

Method test_subclass_nomask_items

numpy/ma/tests/test_subclassing.py:327–336  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

325 mxcsub.flat[1:4] = xcsub[1:4]
326
327 def test_subclass_nomask_items(self):
328 x = np.arange(5)
329 xcsub = ComplicatedSubArray(x)
330 mxcsub_nomask = masked_array(xcsub)
331
332 assert_(isinstance(mxcsub_nomask[1,...].data, ComplicatedSubArray))
333 assert_(isinstance(mxcsub_nomask[0,...].data, ComplicatedSubArray))
334
335 assert_(isinstance(mxcsub_nomask[1], ComplicatedSubArray))
336 assert_(isinstance(mxcsub_nomask[0], ComplicatedSubArray))
337
338 def test_subclass_repr(self):
339 """test that repr uses the name of the subclass

Callers

nothing calls this directly

Calls 2

assert_Function · 0.90
ComplicatedSubArrayClass · 0.85

Tested by

no test coverage detected