pytorch-pfn-extras
Returns a module of ndarray implementation (numpy or cupy) for the given obj.
The obj can be torch.Tensor, torch.device or NumPy/CuPy ndarray.
obj (Union[Any, torch.Tensor]) –
Any