qimpy.io.cast_tensor
- cast_tensor(t)
Convert t to a torch tensor on current device (if not already so). Useful to handle input from yaml, checkpoint or python code on an equal footing.
- Parameters:
t (Tensor | ndarray | float | Sequence[float])
- Return type:
Tensor