diff --git a/tensordict/base.py b/tensordict/base.py index ef560b7fc..39729eba4 100644 --- a/tensordict/base.py +++ b/tensordict/base.py @@ -10965,7 +10965,7 @@ def set_(x): tgt = mb_unwrap_functional_tensor(new_thing) src = mb_unwrap_functional_tensor(ragged_source) tgt.nested_int_memo = src.nested_int_memo - else: + elif new_thing is not None: _tensor_symint_registry[new_thing] = _tensor_symint_registry[ ragged_source ]