Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Isaacson committed Aug 19, 2024
1 parent 1a17828 commit 60f37cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/beignet/_segment_sum.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ def segment_sum(
valid_indexes = indexes[valid_mask]
valid_input = input[valid_mask]

output = torch.zeros(n, *input.shape[1:], device=input.device, dtype=valid_input.dtype)

return output.scatter_add(0, valid_indexes, valid_input).to(
**kwargs
output = torch.zeros(
n, *input.shape[1:], device=input.device, dtype=valid_input.dtype
)

return output.scatter_add(0, valid_indexes, valid_input).to(**kwargs)

0 comments on commit 60f37cc

Please sign in to comment.