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

Method testSum

tools/swig/test/testVector.py:87–91  ·  view source on GitHub ↗

Test sum function

(self)

Source from the content-addressed store, hash-verified

85
86 # Test the (int DIM1, type* IN_ARRAY1) typemap
87 def testSum(self):
88 "Test sum function"
89 print(self.typeStr, "... ", end=' ', file=sys.stderr)
90 sum = Vector.__dict__[self.typeStr + "Sum"]
91 self.assertEqual(sum([5, 6, 7, 8]), 26)
92
93 # Test the (int DIM1, type* IN_ARRAY1) typemap
94 def testSumBadList(self):

Callers

nothing calls this directly

Calls 2

printFunction · 0.85
sumFunction · 0.50

Tested by

no test coverage detected