Skip to content

Commit

Permalink
Merge pull request #2373 from quant12345/scalar
Browse files Browse the repository at this point in the history
Copy array element to standard python scalar
  • Loading branch information
vogt31337 committed Aug 29, 2024
2 parents 551708e + 0732a18 commit 641134d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Change Log

[upcoming release] - 2024-..-..
-------------------------------
- [FIXED] copy array element to standard python scalar
- [REMOVED] python 3.8 support
- [CHANGED] geopandas version to >= 1.0
- [ADDED] station controller functionality with voltage and reactive power control with and without droop and pf import support
Expand Down
6 changes: 3 additions & 3 deletions pandapower/test/opf/test_pp_vs_pm.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def test_case5_pm_pd2ppc():
net["_options"]["mode"] = "opf"
ppc = _pd2ppc(net)
# check which one is the ref bus in ppc
ref_idx = int(ppc[0]["bus"][:, BUS_I][ppc[0]["bus"][:, BUS_TYPE] == REF])
ref_idx = int(ppc[0]["bus"][:, BUS_I][ppc[0]["bus"][:, BUS_TYPE] == REF].item())
vmax = ppc[0]["bus"][ref_idx, VMAX]
vmin = ppc[0]["bus"][ref_idx, VMIN]

Expand All @@ -87,7 +87,7 @@ def test_case5_pm_pd2ppc():
# run pd2ppc with ext_grd controllable = True
net.ext_grid["controllable"] = True
ppc = _pd2ppc(net)
ref_idx = int(ppc[0]["bus"][:, BUS_I][ppc[0]["bus"][:, BUS_TYPE] == REF])
ref_idx = int(ppc[0]["bus"][:, BUS_I][ppc[0]["bus"][:, BUS_TYPE] == REF].item())
vmax = ppc[0]["bus"][ref_idx, VMAX]
vmin = ppc[0]["bus"][ref_idx, VMIN]

Expand All @@ -102,7 +102,7 @@ def test_case5_pm_pd2ppc():
assert net.ext_grid["in_service"].values.dtype == bool

ppc = _pd2ppc(net)
ref_idx = int(ppc[0]["bus"][:, BUS_I][ppc[0]["bus"][:, BUS_TYPE] == REF])
ref_idx = int(ppc[0]["bus"][:, BUS_I][ppc[0]["bus"][:, BUS_TYPE] == REF].item())

vmax1 = ppc[0]["bus"][ref_idx, VMAX]
vmin1 = ppc[0]["bus"][ref_idx, VMIN]
Expand Down

0 comments on commit 641134d

Please sign in to comment.