MCPcopy Index your code
hub / github.com/numpy/numpy / testSum

Method testSum

tools/swig/test/testVector.py:88–92  ·  view source on GitHub ↗

Test sum function

(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

sumFunction · 0.85

Tested by

no test coverage detected