-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Is your feature request related to a problem? Please describe.
This feature request is not related to a problem, but would significantly speed up calculations, with relatively little development (I think).
Describe the solution you'd like
It would be quite practical to implement an option to pass a redshift array and evaluate all the quantities at all redshifts in the array. While one can easily use the update() method to loop over redshifts, some initial testing shows that passing an array is around factor of 10 faster.
Additional context
I have tried to rough hack the implementation in hmf, and it shows significant speed up with minimal development, as majority of functions seem to work out of the box on (all numpy array broadcasting is mostly there, CAMB seems to deal with that without an issue either, there is only a couple of interpolation functions that need some further changes).
The same would need to be passed on to halomod, where it seems that the implementation is a bit more involved, but not impossible.
I am willing to have a proper go at this myself in the following weeks/months and can open PRs for implementation. Any thoughts welcome, or reasons why this might not be a good idea...