CCL icon indicating copy to clipboard operation
CCL copied to clipboard

Port much of the C code to Python

Open nikfilippas opened this issue 1 year ago • 0 comments

This was originally one of v3's milestones, but we decided to change it as it can be left for later, to speed up releasing v3. The entire library can benefit from these changes:

  1. Vectorize all functions up to the level where they communicate with SWIG (it will make future migration a piece of cake).
  2. Decorator to automatically dispatch input and remove all the ndim checks in the output of vectorized functions. --> This removes the need to check the ndim of the output every time, in every function.
  3. Move easily portable code from C to Python using myccl. --> This is some work I have done independently to verify that most of the C code can be ported to Python with no speed disadvantage.

The 3rd step is much easier if 1 and 2 are done.

nikfilippas avatar Apr 01 '23 11:04 nikfilippas