Skip to content

Commit

Permalink
Fix for Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
aarmey committed Aug 1, 2024
1 parent 76b597f commit d64a88b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
5 changes: 0 additions & 5 deletions tensorly/backend/pytorch_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,6 @@ def update_index(tensor, index, values):
def lstsq(a, b, rcond=None, driver="gelsd"):
return torch.linalg.lstsq(a, b, rcond=rcond, driver=driver)

@staticmethod
def eigh(tensor):
"""Legacy only, deprecated from PyTorch 1.8.0"""
return torch.symeig(tensor, eigenvectors=True)

@staticmethod
def sign(tensor):
"""torch.sign does not support complex numbers."""
Expand Down
3 changes: 1 addition & 2 deletions tensorly/utils/jointdiag.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import Any
from itertools import combinations
import tensorly as tl

Expand All @@ -13,7 +12,7 @@ def jointdiag(
max_iter: int = 50,
threshold: float = 1e-10,
verbose: bool = False,
) -> tuple[Any, Any]:
):
"""
Jointly diagonalizes n matrices, organized in tensor of dimension (k,k,n).
Returns the diagonalized matrices, along with the transformation matrix.
Expand Down

0 comments on commit d64a88b

Please sign in to comment.