Skip to content

Commit ebb1ce0

Browse files
committed
Remove assertion forbidding composition in __new__
1 parent cb93e9f commit ebb1ce0

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/torchjd/sparse/_structured_sparse_tensor.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ class StructuredSparseTensor(Tensor):
1414

1515
@staticmethod
1616
def __new__(cls, physical: Tensor, strides: Tensor):
17-
# At the moment, this class is not compositional, so we assert
18-
# that the tensor we're wrapping is exactly a Tensor
19-
assert type(physical) is Tensor
20-
2117
assert strides.dtype == torch.int64
2218

2319
# Note [Passing requires_grad=true tensors to subclasses]

0 commit comments

Comments
 (0)