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

Method test_subclass

numpy/lib/tests/test_function_base.py:1046–1056  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1044 delete(a, [], axis="nonsense")
1045
1046 def test_subclass(self):
1047 class SubClass(np.ndarray):
1048 pass
1049
1050 a_orig, _ = self._create_arrays()
1051 a = a_orig.view(SubClass)
1052 assert_(isinstance(delete(a, 0), SubClass))
1053 assert_(isinstance(delete(a, []), SubClass))
1054 assert_(isinstance(delete(a, [0, 1]), SubClass))
1055 assert_(isinstance(delete(a, slice(1, 2)), SubClass))
1056 assert_(isinstance(delete(a, slice(1, -2)), SubClass))
1057
1058 def test_array_order_preserve(self):
1059 # See gh-7113

Callers

nothing calls this directly

Calls 5

_create_arraysMethod · 0.95
assert_Function · 0.90
deleteFunction · 0.90
sliceFunction · 0.85
viewMethod · 0.45

Tested by

no test coverage detected