Skip to content

Commit fc3339c

Browse files
committed
Fix order of rows of new_strides in view_default
1 parent 6e94a89 commit fc3339c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/torchjd/sparse/_aten_function_overrides

src/torchjd/sparse/_aten_function_overrides/shape.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def view_default(t: StructuredSparseTensor, shape: list[int]) -> Tensor:
5959
# I think we could skip the - stride_row because the floor div will handle it for us, but it
6060
# will make code harder to understand.
6161

62-
new_strides = torch.stack(stride_rows, dim=0)
62+
new_strides = torch.stack(stride_rows[::-1], dim=0)
6363
return to_most_efficient_tensor(t.physical, new_strides)
6464

6565

0 commit comments

Comments
 (0)