Installation

gwfast can be easily installed using pip, either from PyPI:

$ pip install --upgrade pip
$ pip install gwfast

or from GitHub:

$ pip install --upgrade pip
$ pip install --upgrade "jax[cpu]"
$ pip install git+https://github.com/CosmoStatGW/gwfast

Otheriwse the git repository can be cloned:

$ git clone https://github.com/CosmoStatGW/gwfast

Then, to install the required packages, simply run

$ cd gwfast
$ pip install --upgrade pip
$ pip install -r requirements.txt

To install a JAX version for GPU or TPU proceed as explained in https://github.com/google/jax#installation.

If willing to use numerical differentiation, a patch has to be applied to numdifftools. This can be done by running the following command while being in the environment gwfast has been installed into

$ patch $(python -c "import site; print(site.getsitepackages()[0])")"/numdifftools/limits.py" $(python -c "import site; print(site.getsitepackages()[0])")"/gwfast/.patch/patch_ndt_complex_0-9-41.patch