Skip to content

Refactor utils.py to use sph_harm_y_all from SciPy 1.15+ #294

@Ao-chuba

Description

@Ao-chuba

" @marco-2023 maybe make a new issue for the refactor to sph_harm_y_all. It can even be a (small) GSoC project, but it is also probably really easy for you or @Ao-chuba to do it at this stage, knowing the code as y'all do. "
Originally posted by @PaulWAyers in #291 (comment)

As discussed in PR #291, the current implementation generate_real_spherical_harmonics_scipy and generate_derivative_real_spherical_harmonics in src/grid/utils.py relies on explicit Python loops to compute spherical harmonics degree by degree and order by order. With the update to SciPy >= 1.15.0, we now have access to scipy.special.sph_harm_y_all, which computes all spherical harmonics up to a given degree n and order m simultaneously.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions