(self)
| 27 | class TestToNumpy(unittest.TestCase): |
| 28 | @skipUnless(HAS_CUPY, "CuPy is required.") |
| 29 | def test_cupy_input(self): |
| 30 | test_data = cp.array([[1, 2], [3, 4]]) |
| 31 | test_data = cp.rot90(test_data) |
| 32 | self.assertFalse(test_data.flags["C_CONTIGUOUS"]) |
| 33 | result = ToNumpy()(test_data) |
| 34 | self.assertIsInstance(result, np.ndarray) |
| 35 | self.assertTrue(result.flags["C_CONTIGUOUS"]) |
| 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]]) |
nothing calls this directly
no test coverage detected