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

Method testEOSplit

tools/swig/test/testVector.py:219–225  ·  view source on GitHub ↗

Test eoSplit function

(self)

Source from the content-addressed store, hash-verified

217
218 # Test the (type ARGOUT_ARRAY1[ANY]) typemap
219 def testEOSplit(self):
220 "Test eoSplit function"
221 print(self.typeStr, "... ", end=' ', file=sys.stderr)
222 eoSplit = Vector.__dict__[self.typeStr + "EOSplit"]
223 even, odd = eoSplit([1, 2, 3])
224 self.assertEqual((even == [1, 0, 3]).all(), True)
225 self.assertEqual((odd == [0, 2, 0]).all(), True)
226
227 # Test the (type* ARGOUT_ARRAY1, int DIM1) typemap
228 def testTwos(self):

Callers

nothing calls this directly

Calls 2

printFunction · 0.85
allMethod · 0.45

Tested by

no test coverage detected