I am trying to write a python function which is equivalent to Mathematica\'s JacobiAmplitude: https://reference.wolfram.com/language/ref/JacobiAmplitude.html
However,