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

Method testReverse

tools/swig/test/testVector.py:115–121  ·  view source on GitHub ↗

Test reverse function

(self)

Source from the content-addressed store, hash-verified

113
114 # Test the (type INPLACE_ARRAY1[ANY]) typemap
115 def testReverse(self):
116 "Test reverse function"
117 print(self.typeStr, "... ", end=' ', file=sys.stderr)
118 reverse = Vector.__dict__[self.typeStr + "Reverse"]
119 vector = np.array([1, 2, 4], self.typeCode)
120 reverse(vector)
121 self.assertEqual((vector == [4, 2, 1]).all(), True)
122
123 # Test the (type INPLACE_ARRAY1[ANY]) typemap
124 def testReverseWrongDim(self):

Callers

nothing calls this directly

Calls 2

printFunction · 0.85
allMethod · 0.45

Tested by

no test coverage detected