Skip to content

Commit

Permalink
style: run pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-murray committed Jul 5, 2024
1 parent 9e3401d commit e0a8831
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/warnings_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
- name: Run Tests
run: |
pytest -W error
pytest -W error
4 changes: 2 additions & 2 deletions src/linsolve/linsolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ def _invert_solve(self, A, y, rcond):
methods.
"""
# As of numpy 1.8, solve works on stacks of matrices
# Change in numpy 2.0:
# Change in numpy 2.0:
# The b array is only treated as a shape (M,) column vector if it is
# exactly 1-dimensional. In all other instances it is treated as a stack
# of (M, K) matrices. Previously b would be treated as a stack of (M,)
Expand Down Expand Up @@ -696,7 +696,7 @@ def eval(self, sol, keys=None):
def _chisq(self, sol, data, wgts, evaluator):
"""Internal adaptable chisq calculator."""
if len(wgts) == 0:
sigma2 = {k: 1.0 for k in list(data.keys())} # equal weights
sigma2 = dict.fromkeys(data.keys(), value=1.0) # equal weights
else:
sigma2 = {k: wgts[k] ** -1 for k in list(wgts.keys())}
evaluated = evaluator(sol, keys=data)
Expand Down
4 changes: 3 additions & 1 deletion tests/test_linsolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,9 @@ def test_init(self):
np.testing.assert_almost_equal(eval(k), 0.002)
assert len(ls.ls.prms) == 3

ls = linsolve.LinProductSolver(d, sol0, w, sparse=self.sparse, build_solver=False)
ls = linsolve.LinProductSolver(
d, sol0, w, sparse=self.sparse, build_solver=False
)
assert not hasattr(ls, "ls")
assert ls.dtype == np.complex64

Expand Down

0 comments on commit e0a8831

Please sign in to comment.