Skip to content

Add cython directive cpow=True

This merge request fixes a waveform generation error found recently by @david.keitel. Essentially there has been a change in Cython 3 where cython.cpow is set to False by default instead of True. This causes that complex numbers cannot be converted to nans and triggers an error in cython. This situation occurs typicall by the end of the EOB dynamics, where quantities such as the Hamiltonian or other the coordinates/momenta, are ill-behaved at closer separation, and precisely this change of behavior is used in integrate_ode_prec.py to stop the evolution.

I am attaching a jupyter-notebook with an example to reproduce the error with current main. In the notebook one can check that this does not happens for the non-postadiabatic dynamics as it does not rely so much on cython. With the new MR the notebook runs fine, and one can check therein that both the PA and non-PA produce the same modes as expectedfix_cpython_powTrue.ipynb.

Merge request reports