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

Method testTwos

tools/swig/test/testVector.py:228–233  ·  view source on GitHub ↗

Test twos function

(self)

Source from the content-addressed store, hash-verified

226
227 # Test the (type* ARGOUT_ARRAY1, int DIM1) typemap
228 def testTwos(self):
229 "Test twos function"
230 print(self.typeStr, "... ", end=' ', file=sys.stderr)
231 twos = Vector.__dict__[self.typeStr + "Twos"]
232 vector = twos(5)
233 self.assertEqual((vector == [2, 2, 2, 2, 2]).all(), True)
234
235 # Test the (type* ARGOUT_ARRAY1, int DIM1) typemap
236 def testTwosNonInt(self):

Callers

nothing calls this directly

Calls 2

printFunction · 0.85
allMethod · 0.45

Tested by

no test coverage detected