Skip to content

Commit 7f2c974

Browse files
committed
Fix StructuredSparseTensor.__new__
1 parent 5547ff6 commit 7f2c974

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/torchjd/sparse/_structured_sparse_tensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def __new__(cls, physical: Tensor, strides: Tensor):
3131
pshape = torch.tensor(physical.shape)
3232
vshape = strides @ (pshape - 1) + 1
3333
return Tensor._make_wrapper_subclass(
34-
cls, vshape, dtype=physical.dtype, device=physical.device
34+
cls, tuple(vshape.tolist()), dtype=physical.dtype, device=physical.device
3535
)
3636

3737
def __init__(self, physical: Tensor, strides: Tensor):

0 commit comments

Comments
 (0)