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

Method test_subclass

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

Source from the content-addressed store, hash-verified

906 delete(a, [], axis="nonsense")
907
908 def test_subclass(self):
909 class SubClass(np.ndarray):
910 pass
911 a = self.a.view(SubClass)
912 assert_(isinstance(delete(a, 0), SubClass))
913 assert_(isinstance(delete(a, []), SubClass))
914 assert_(isinstance(delete(a, [0, 1]), SubClass))
915 assert_(isinstance(delete(a, slice(1, 2)), SubClass))
916 assert_(isinstance(delete(a, slice(1, -2)), SubClass))
917
918 def test_array_order_preserve(self):
919 # See gh-7113

Callers

nothing calls this directly

Calls 3

assert_Function · 0.90
deleteFunction · 0.90
viewMethod · 0.45

Tested by

no test coverage detected