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

Method testResize1

tools/swig/test/testArray.py:176–180  ·  view source on GitHub ↗

Test Array2 resize method, array

(self)

Source from the content-addressed store, hash-verified

174 self.assertTrue(len(self.array2) == newRows * newCols)
175
176 def testResize1(self):
177 "Test Array2 resize method, array"
178 a = np.zeros((2*self.nrows, 2*self.ncols), dtype='l')
179 self.array2.resize(a)
180 self.assertTrue(len(self.array2) == a.size)
181
182 def testResizeBad1(self):
183 "Test Array2 resize method, negative nrows"

Callers

nothing calls this directly

Calls 1

resizeMethod · 0.45

Tested by

no test coverage detected