FIX: restrict scipy to >=1.17 and update Legendre code#436
Merged
Conversation
Collaborator
|
Looks good to me |
RemingtonRohel
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
This PR updates the pyDARN code to use the new version of the scipy.special Legendre function 'assoc_legendre_p_all' instead of the old deprecated 'lpmn' function that was replaced in version 1.15.0, but was broken for a while and is now fixed in the latest 1.17 version of scipy.
The outputs for the new legendre functions are very different, so to reduce the changes in the code I have reworked the new output to be as similar to the old one as possible.
I tested the new code with scipy 1.15-1.16.3 but I got the issue we had before, so we would need to restrict up to 1.17 for this to work.
With the new code change, it doesn't make sense to keep the old code and if/else it as we still need to have a <1.15 >=1.17 statement anyway, where <1.15 is now 2.5+ years old anyway.
issue: to close #434
Approval
Number of approvals: 2 for testing please
Test
matplotlib version: 3.10.8
python version: 3.11
Note testers: please indicate what version of matplotlib you are using
Comparison between old code and scipy 1.14.0 and new code and 1.17.0:

OLD:
NEW:
