LSSTDESC / CLMM

A Python library for performing galaxy cluster mass reconstruction from weak lensing observables
BSD 3-Clause "New" or "Revised" License
23 stars 18 forks source link

Remove recomputing of vectorization in NumCosmo backend #583

Closed m-aguena closed 1 year ago

m-aguena commented 1 year ago

There are many functions in the NumCosmo backend that vectorize internal functions at every call. That can be improved.

hsinfan1996 commented 1 year ago

What functions specifically? Most of those (if not all) in theory/numcosmo.py and cosmology/ccl.py need np.vectorize.

m-aguena commented 1 year ago

What functions specifically? Most of those (if not all) in theory/numcosmo.py and cosmology/ccl.py need np.vectorize.

Yes, but they do not have to be "revectorized" every time we call them. I just created a PR draft with a possible solution