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

Method testMax

tools/swig/test/testTensor.py:72–78  ·  view source on GitHub ↗

Test max function

(self)

Source from the content-addressed store, hash-verified

70
71 # Test (type* IN_ARRAY3, int DIM1, int DIM2, int DIM3) typemap
72 def testMax(self):
73 "Test max function"
74 print(self.typeStr, "... ", end=' ', file=sys.stderr)
75 max = Tensor.__dict__[self.typeStr + "Max"]
76 tensor = [[[1, 2], [3, 4]],
77 [[5, 6], [7, 8]]]
78 self.assertEqual(max(tensor), 8)
79
80 # Test (type* IN_ARRAY3, int DIM1, int DIM2, int DIM3) typemap
81 def testMaxBadList(self):

Callers

nothing calls this directly

Calls 2

printFunction · 0.85
maxFunction · 0.50

Tested by

no test coverage detected