It can be annoying to always remember to allocate output arrays with the requisite lmax+1 due to the fact that quantities are specified on the closed interval [0, lmax]. In the context of #6, it also then becomes convenient and/or necessary for the user to hand a properly constructed offset array as well, and that may add to the annoyingness.
Consider whether a helper function should be provided to do vector and matrix-output allocations. (And maybe the hardest problem, what should such a function be named?)
Right now the "broadcasting" syntax (e.g. Plm.(0:lmax, 0:lmax, x)) allocates an output array of the necessary size, but the abuse of broadcasting like that is probably something that should be removed before a v1.0 is tagged.
It can be annoying to always remember to allocate output arrays with the requisite
lmax+1
due to the fact that quantities are specified on the closed interval [0, lmax]. In the context of #6, it also then becomes convenient and/or necessary for the user to hand a properly constructed offset array as well, and that may add to the annoyingness.Consider whether a helper function should be provided to do vector and matrix-output allocations. (And maybe the hardest problem, what should such a function be named?)
Right now the "broadcasting" syntax (e.g.
Plm.(0:lmax, 0:lmax, x)
) allocates an output array of the necessary size, but the abuse of broadcasting like that is probably something that should be removed before a v1.0 is tagged.