Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Oct 10, 2023
1 parent 7747505 commit 2fb64be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tensordict/tensordict.py
Original file line number Diff line number Diff line change
Expand Up @@ -7924,6 +7924,8 @@ def sort_keys(element):
rename_key = _renamed_inplace_method(rename_key_)

def where(self, condition, other, *, out=None, pad=None):
if condition.ndim < self.ndim:
condition = expand_right(condition, self.batch_size)
condition = condition.unbind(self.stack_dim)
if _is_tensor_collection(other.__class__) or (
isinstance(other, Tensor)
Expand Down

0 comments on commit 2fb64be

Please sign in to comment.