MCPcopy
hub / github.com/numpy/numpy / testMax

Method testMax

tools/swig/test/testTensor.py:73–79  ·  view source on GitHub ↗

Test max function

(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

maxFunction · 0.50

Tested by

no test coverage detected