Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor base class #48

Merged
merged 25 commits into from
Oct 10, 2024
Merged

Refactor base class #48

merged 25 commits into from
Oct 10, 2024

Conversation

jcapriot
Copy link
Member

@jcapriot jcapriot commented Sep 28, 2024

This refactor is aimed at increasing consistency throughout the package, adding a few bits of missing information.

  • Gets rid of the ugly set_kwargs funciton.
  • Automatically do a check for symmetry and hermitian, if not given.
  • Exposes a solve() operation that broadcast's like np.linalg.solve.
  • Uses Scipy's triangular solver for Forward and Backward class (and makes them transposes of each other).
  • Check's wrapped function signatures for valid keyword arguments.
    • Emits warnings on unused keyword arguments.
  • add a solver.transpose() method, which is aliased as a property as solver.T.
  • Define's Base as an abstract class, where subclasses must implement a _solver_single and a _solve_multiple.
  • Mimic's scipy's more recent rtol and atol keywords for solution checking.
  • Add __matmul__, __rmatmul__, and __rmul__ operations.

Copy link

codecov bot commented Oct 3, 2024

Codecov Report

Attention: Patch coverage is 99.45355% with 2 lines in your changes missing coverage. Please review.

Project coverage is 99.62%. Comparing base (089e975) to head (5047329).
Report is 27 commits behind head on main.

Files with missing lines Patch % Lines
pymatsolver/solvers.py 99.09% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #48      +/-   ##
==========================================
+ Coverage   91.71%   99.62%   +7.91%     
==========================================
  Files           7        7              
  Lines         374      531     +157     
==========================================
+ Hits          343      529     +186     
+ Misses         31        2      -29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jcapriot jcapriot force-pushed the consistent_refactor branch 5 times, most recently from 54156ff to fbfa8ff Compare October 10, 2024 20:02
@jcapriot jcapriot force-pushed the consistent_refactor branch 3 times, most recently from c57f2eb to 860858c Compare October 10, 2024 20:15
@jcapriot jcapriot force-pushed the consistent_refactor branch from 860858c to 5047329 Compare October 10, 2024 20:18
@jcapriot jcapriot merged commit 3297054 into main Oct 10, 2024
24 checks passed
@jcapriot jcapriot deleted the consistent_refactor branch October 10, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant