(self)
| 36 | assert_allclose(result, test_data.get(), type_test=False) |
| 37 | |
| 38 | def test_numpy_input(self): |
| 39 | test_data = np.array([[1, 2], [3, 4]]) |
| 40 | test_data = np.rot90(test_data) |
| 41 | self.assertFalse(test_data.flags["C_CONTIGUOUS"]) |
| 42 | result = ToNumpy(dtype="float32")(test_data) |
| 43 | self.assertIsInstance(result, np.ndarray) |
| 44 | self.assertEqual(result.dtype, np.float32) |
| 45 | self.assertTrue(result.flags["C_CONTIGUOUS"]) |
| 46 | assert_allclose(result, test_data, type_test=False) |
| 47 | |
| 48 | def test_tensor_input(self): |
| 49 | test_data = torch.tensor([[1, 2], [3, 4]]) |
nothing calls this directly
no test coverage detected