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