You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read and followed the docs and still think this is a bug
Description
when calling copy.deepcopy() over TorchTensor, it fails when tensor.dtype != torch.float32.
The problem is that TorchTensor.new_empty() will create a float32 tensor no matter what, regardless of self.dtype
Example Code
importtorchfromdocarray.typing.tensor.torch_tensorimportTorchTensorimportcopyx=TorchTensor(torch.randn(2,3))
y=copy.deepcopy(x) # this worksxx=TorchTensor(torch.randint(0,100,(2,3)))
yy=copy.deepcopy(xx) # RuntimeError: Expected a Storage of type float or an UntypedStorage, but got type Long for argument 1 'storage'