Test Process function 3D array
(self)
| 36 | self.assertEqual(np.all((x+1)==y),True) |
| 37 | |
| 38 | def testProcess3D(self): |
| 39 | "Test Process function 3D array" |
| 40 | print(self.typeStr, "... ", end=' ', file=sys.stderr) |
| 41 | process = Flat.__dict__[self.typeStr + "Process"] |
| 42 | pack_output = b'' |
| 43 | for i in range(24): |
| 44 | pack_output += struct.pack(self.typeCode,i) |
| 45 | x = np.frombuffer(pack_output, dtype=self.typeCode) |
| 46 | x.shape = (2,3,4) |
| 47 | y = x.copy() |
| 48 | process(y) |
| 49 | self.assertEqual(np.all((x+1)==y),True) |
| 50 | |
| 51 | def testProcess3DTranspose(self): |
| 52 | "Test Process function 3D array, FORTRAN order" |