Test ceil function
(self)
| 205 | |
| 206 | # Test (int DIM1, int DIM2, int DIM3, type* INPLACE_ARRAY3) typemap |
| 207 | def testCeil(self): |
| 208 | "Test ceil function" |
| 209 | print(self.typeStr, "... ", file=sys.stderr) |
| 210 | supertensor = np.arange(2*2*2*2, dtype=self.typeCode).reshape((2, 2, 2, 2)) |
| 211 | answer = supertensor.copy() |
| 212 | answer[answer > 5] = 5 |
| 213 | ceil = SuperTensor.__dict__[self.typeStr + "Ceil"] |
| 214 | ceil(supertensor, 5) |
| 215 | np.testing.assert_array_equal(supertensor, answer) |
| 216 | |
| 217 | # Test (int DIM1, int DIM2, int DIM3, type* INPLACE_ARRAY3) typemap |
| 218 | def testCeilWrongType(self): |
nothing calls this directly
no test coverage detected