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

scipy.special.sph_harm is deprecated #83

Open
hoyer-a opened this issue Jan 6, 2025 · 3 comments
Open

scipy.special.sph_harm is deprecated #83

hoyer-a opened this issue Jan 6, 2025 · 3 comments

Comments

@hoyer-a
Copy link
Member

hoyer-a commented Jan 6, 2025

sph_harm will be removed in scipy 1.17.
The new sh-function is sph_harm_y

@mberz
Copy link
Member

mberz commented Jan 6, 2025

Thanks for catching this. It seems the primary change is the order of n and m and the change of coordinate variables.
Additionally, the function supports returning the derivative, which may be interesting to use when calculating the gradient with respect to phi

I guess in this case it could be beneficial to implement a switch for different scipy versions and release a patch before moving to spharpy 1.0.0

@mberz
Copy link
Member

mberz commented Jan 6, 2025

There are now also functions which return the spherical harmonics for multiple degrees and orders, same for the Legendre functions. This could be quite useful to avoid loops when building the basis matrix.

@xefonon
Copy link
Collaborator

xefonon commented Jan 21, 2025

This is great, I don't understand from the documentation if the derivatives are with respect to both theta and phi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

3 participants