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

Method testTwos

tools/swig/test/testVector.py:229–234  ·  view source on GitHub ↗

Test twos function

(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

allMethod · 0.45

Tested by

no test coverage detected