Rate this Page
★ ★ ★ ★ ★

IndexType#

tensordict.utils.IndexType#

The type of the indices that a tensordict accepts in td[index].

An int, a slice, None, a tensor (of indices or a boolean mask), a list, or a tuple of these, as for a tensor; a str or a tuple of str is a key.

alias of Union[None, int, slice, str, Tensor, List[Any], Tuple[Any, …]]