Skip to content

Commit

Permalink
added pinv and pinvh to the linalg lib
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Papior <[email protected]>
  • Loading branch information
zerothi committed Sep 18, 2023
1 parent 0e7ad14 commit 2d65fc3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sisl/linalg/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,11 @@ def _append(name, suffix):
inv_destroy = _partial(inv, overwrite_a=True)
__all__ += _append("inv", ["", "_destroy"])

# Pseudo-inversion of matrix
pinv = _partial(sl.pinv, check_finite=False)
pinvh = _partial(sl.pinvh, check_finite=False)
__all__ += _append("pinv", ["", "h"])

# Solve eigenvalue problem
eig = _partial(sl.eig, check_finite=False, overwrite_a=False, overwrite_b=False)
eig_left = _partial(sl.eig, check_finite=False, overwrite_a=False, overwrite_b=False, left=True)
Expand Down

0 comments on commit 2d65fc3

Please sign in to comment.