def testTensorCallableToArrayCallable(self):

    def tensor_func(x: Tensor) -> Tensor:
        return np.exp(x)
    new_func = tensor_callable_to_array_callable(tensor_func=tensor_func, device=torch.device('cpu'))
    self.assertTrue(callable(new_func))
    self.assertIsInstance(new_func(np.array([1.0, 2.0])), np.ndarray)
def testTensorCallableToArrayCallable(self):

    def tensor_func(x: Tensor) -> Tensor:
        return np.exp(x)
    new_func = tensor_callable_to_array_callable(tensor_func=tensor_func, device=torch.device('cpu'))
    self.assertTrue(callable(new_func))
    self.assertIsInstance(new_func(np.array([1.0, 2.0])), np.ndarray)