Replace `np.pi` or `xp.pi` with ```py from scipy.constants import pi [...] pi ``` everywhere in the code.
Replace
np.piorxp.piwitheverywhere in the code.