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

Method test_ensure_array

numpy/core/tests/test_numeric.py:3493–3499  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3491 assert_raises(ValueError, np.require, a, None, ['C', 'F'])
3492
3493 def test_ensure_array(self):
3494 class ArraySubclass(np.ndarray):
3495 pass
3496
3497 a = ArraySubclass((2, 2))
3498 b = np.require(a, None, ['E'])
3499 assert_(type(b) is np.ndarray)
3500
3501 def test_preserve_subtype(self):
3502 class ArraySubclass(np.ndarray):

Callers

nothing calls this directly

Calls 2

assert_Function · 0.90
ArraySubclassClass · 0.70

Tested by

no test coverage detected