Test scale function
(self)
| 122 | |
| 123 | # Test (type INPLACE_ARRAY2[ANY][ANY]) typemap |
| 124 | def testScale(self): |
| 125 | "Test scale function" |
| 126 | print(self.typeStr, "... ", end=' ', file=sys.stderr) |
| 127 | scale = Matrix.__dict__[self.typeStr + "Scale"] |
| 128 | matrix = np.array([[1, 2, 3], [2, 1, 2], [3, 2, 1]], self.typeCode) |
| 129 | scale(matrix, 4) |
| 130 | self.assertEqual((matrix == [[4, 8, 12], [8, 4, 8], [12, 8, 4]]).all(), True) |
| 131 | |
| 132 | # Test (type INPLACE_ARRAY2[ANY][ANY]) typemap |
| 133 | def testScaleWrongDim(self): |