Skip to content

Commit

Permalink
Replacing deprecated H and A from scipy.sparse.csr_matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
quant12345 committed Jul 27, 2024
1 parent a043eae commit 8de95b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pandapower/pf/run_bfswpf.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def _make_bibc_bcbv(bus, branch, graph):
# [M N ]
A = DLF_loop[0:nobus - 1, 0:nobus - 1]
M = DLF_loop[nobus - 1:, 0:nobus - 1]
N = DLF_loop[nobus - 1:, nobus - 1:].A
N = DLF_loop[nobus - 1:, nobus - 1:].toarray()
# considering the fact that number of loops is relatively small, N matrix is expected to be small and dense
# ...in that case dense version is more efficient, i.e. N is transformed to dense and
# inverted using sp.linalg.inv(N)
Expand Down
2 changes: 1 addition & 1 deletion pandapower/pypower/d2Sbus_dV2.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def d2Sbus_dV2(Ybus, V, lam):
A = sparse((lam * V, (ib, ib)))
B = Ybus * diagV
C = A * conj(B)
D = Ybus.H * diagV
D = Ybus.T.conjugate() * diagV
E = diagV.conj() * (D * diaglam - sparse((D * lam, (ib, ib))))
F = C - A * sparse((conj(Ibus), (ib, ib)))
G = sparse((ones(nb) / abs(V), (ib, ib)))
Expand Down

0 comments on commit 8de95b0

Please sign in to comment.