list_to_stack#
- tensordict.list_to_stack(allow_none=False)#
Returns whether assigning a list to a key stores a
NonTensorStack.See
set_list_to_stack.- Parameters:
allow_none (bool, optional) – if
Trueand the option was never set, returnsNoneinstead of the default (True). Defaults toFalse.
Examples
>>> from tensordict import list_to_stack >>> list_to_stack() True