Skip to content

Commit

Permalink
np.Inf to np.inf, reset all python test versions in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
robinhenry committed Nov 14, 2024
1 parent 30097e3 commit 746a4c6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ jobs:
strategy:
max-parallel: 6
matrix:
# python-version: ["3.8", "3.10", "3.13"]
python-version: ["3.13"]
python-version: ["3.10", "3.11", "3.13"]
poetry-version: ["1.8"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
python-version: ["3.11"]
poetry-version: ["1.4"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
Expand Down
4 changes: 2 additions & 2 deletions gym_anm/simulator/solve_load_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,13 @@ def _newton_raphson_sparse(v_guess, p, q, Y, x_tol=1e-10, lim_iter=100):

n_iter = 0
F = _f(v_guess, p, q, Y)
diff = norm(F, np.Inf)
diff = norm(F, np.inf)

while diff > x_tol and n_iter < lim_iter:
n_iter += 1
v_guess = v_guess - spsolve(_dfdx(v_guess, Y), F)
F = _f(v_guess, p, q, Y)
diff = norm(F, np.Inf)
diff = norm(F, np.inf)

converged = False if np.isnan(diff) else True

Expand Down

0 comments on commit 746a4c6

Please sign in to comment.