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

Copy array element to standard python scalar #2415

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

quant12345
Copy link
Contributor

This PR removes warnings:

DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)

Copy array element to standard python scalar. If the array is larger than one element, raise an error.

Test to check:

pytest pandapower/test/control/test_discrete_tap_control.py::test_discrete_tap_control_lv
pytest pandapower/test/control/test_discrete_tap_control.py::test_discrete_tap_control_hv
pytest pandapower/test/control/test_discrete_tap_control.py::test_discrete_tap_control_lv_from_tap_step_percent
pytest pandapower/test/control/test_discrete_tap_control.py::test_discrete_tap_control_hv_from_tap_step_percent
pytest pandapower/test/estimation/test_wls_estimation.py::test_3bus_with_bad_data
pytest pandapower/test/estimation/test_wls_estimation.py::test_cigre_with_bad_data
pytest pandapower/test/grid_equivalents/test_get_equivalent.py
pytest pandapower/test/grid_equivalents/test_get_equivalent_networks.py

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.

2 participants