Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Jun 26, 2024
1 parent 6ae96dc commit 2c84098
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tensordict/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,14 @@ def dims(self, *args, **kwargs):
torch.qint8,
torch.quint4x2,
torch.quint8,
torch.uint16,
torch.uint32,
torch.uint64,
torch.uint8,
)
if hasattr(torch, "uint16"):
_TORCH_DTYPES = _TORCH_DTYPES + (torch.uint16,)
if hasattr(torch, "uint32"):
_TORCH_DTYPES = _TORCH_DTYPES + (torch.uint32,)
if hasattr(torch, "uint64"):
_TORCH_DTYPES = _TORCH_DTYPES + (torch.uint64,)
_STRDTYPE2DTYPE = {str(dtype): dtype for dtype in _TORCH_DTYPES}

IndexType = Union[None, int, slice, str, Tensor, List[Any], Tuple[Any, ...]]
Expand Down

0 comments on commit 2c84098

Please sign in to comment.