Skip to content

Commit 504c1a4

Browse files
committed
Address PR review comments: remove unused bool_compat, stale docs, and use torch.sparse.mm
1 parent 9697ec9 commit 504c1a4

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

linear_operator/operators/_linear_operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def _implements_second_arg(torch_function: Callable) -> Callable:
8080
where the first argument of the function is a torch.Tensor and the
8181
second argument is a LinearOperator
8282
83-
Examples of this include :meth:`torch.cholesky_solve`, `torch.linalg.solve`, or `torch.matmul`.
83+
Examples of this include `torch.linalg.solve` or `torch.matmul`.
8484
"""
8585

8686
@functools.wraps(torch_function)

linear_operator/utils/deprecation.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
import functools
55
import warnings
66

7-
import torch
8-
9-
bool_compat = torch.bool
10-
117

128
class DeprecationError(Exception):
139
pass

linear_operator/utils/sparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def bdsmm(sparse, dense):
125125
return res
126126

127127
else:
128-
return torch.mm(sparse, dense)
128+
return torch.sparse.mm(sparse, dense)
129129

130130

131131
def sparse_eye(size):

0 commit comments

Comments
 (0)