diff --git a/tensordict/base.py b/tensordict/base.py index c44d1b4c3..6c0780233 100644 --- a/tensordict/base.py +++ b/tensordict/base.py @@ -10687,7 +10687,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 ]