" @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.