Fix the failure of TestActuator.py due to some deprecations in SciPy#1376
Fix the failure of TestActuator.py due to some deprecations in SciPy#1376bcoconni merged 2 commits intoJSBSim-Team:masterfrom
TestActuator.py due to some deprecations in SciPy#1376Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses deprecation warnings from SciPy 1.16 by updating the usage of stats.linregress in the test suite. The changes ensure compatibility with newer versions of SciPy while maintaining the same test functionality.
Changes:
- Updated
stats.linregresscall to use separate x and y arrays instead of a 2D array - Switched from unpacking the result tuple to using the
LinregressResultobject's attributes (.slopeand.rvalue) - Added NumPy import to facilitate the array conversion
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1376 +/- ##
=======================================
Coverage 25.24% 25.24%
=======================================
Files 169 169
Lines 18549 18549
=======================================
Hits 4682 4682
Misses 13867 13867 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Looks good, plus all the tests passed 😉 |
|
Since the |
This PR is meant to fix the bug reported in issue #1374:
stats.linregressin a way that is deprecated since SciPy 1.16LinregressResultclass rather than using the named tuple which has been kept for backward compatibility and is susceptible to be deprecated at some point.