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

Method testConstructor3

tools/swig/test/testArray.py:141–147  ·  view source on GitHub ↗

Test Array2 copy constructor

(self)

Source from the content-addressed store, hash-verified

139 self.assertTrue(isinstance(aa, Array.Array2))
140
141 def testConstructor3(self):
142 "Test Array2 copy constructor"
143 for i in range(self.nrows):
144 for j in range(self.ncols):
145 self.array2[i][j] = i * j
146 arrayCopy = Array.Array2(self.array2)
147 self.assertTrue(arrayCopy == self.array2)
148
149 def testConstructorBad1(self):
150 "Test Array2 nrows, ncols constructor, negative nrows"

Callers

nothing calls this directly

Calls 1

Array2Method · 0.80

Tested by

no test coverage detected