def test_type_cupy(self, input_param, input_data, expected_type): input_data = {k: cp.asarray(v) for k, v in input_data.items()} result = CastToTyped(**input_param)(input_data) for k, v in result.items(): self.assertTrue(isinstance(v, cp.ndarray)) self.assertEqual(v.dtype, expected_type[k])
def test_type(self, input_param, input_data, expected_type): result = CastToTyped(**input_param)(input_data) for k, v in result.items(): self.assertEqual(v.dtype, expected_type[k])