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 #2373

Merged
merged 4 commits into from
Aug 29, 2024

Conversation

quant12345
Copy link
Contributor

@quant12345 quant12345 commented Aug 10, 2024

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/opf/test_pp_vs_pm.py::test_case5_pm_pd2ppc

Copy link

codecov bot commented Aug 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.00%. Comparing base (551708e) to head (0732a18).
Report is 5 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2373   +/-   ##
========================================
  Coverage    76.00%   76.00%           
========================================
  Files          282      282           
  Lines        32945    32945           
========================================
  Hits         25040    25040           
  Misses        7905     7905           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

vogt31337
vogt31337 previously approved these changes Aug 28, 2024
@vogt31337 vogt31337 merged commit 641134d into e2nIEE:develop Aug 29, 2024
17 of 25 checks passed
@quant12345 quant12345 deleted the scalar branch September 8, 2024 10:58
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