pg_utils.numerics.special.eval_jacobi_recur_mp

pg_utils.numerics.special.eval_jacobi_recur_mp(Nmesh: ndarray, alpha: Union[mpf, mpfr], beta: Union[mpf, mpfr], zmesh: ndarray, dps: int = 33, backend: Literal['mpmath', 'gmpy2'] = 'gmpy2') ndarray[source]

Evaluate Jacobi polynomials using recurrence relations to arb prec

This function is intended to maintain the same signature as scipy.special.eval_jacobi and sympy.jacobi, albeit several restrictions regarding the input params (see note)

Parameters:
  • Nmesh (np.ndarray) – mesh for degrees (N,Nz)

  • alpha (mpmath.mpf) – alpha index

  • beta (mpmath.mpf) – beta index

  • zmesh (np.ndarray) – mesh for evaluation grid (N,Nz)

  • dps (int) – number of decimal places for calculation, default to 113.

  • backend (Literal["mpmath", "gmpy2"]) – backend for calculation. Default to “gmpy2”.

Note

This function is designed in such a way that the Jacobi polynomial is evaluated on a grid that remains the same for all degrees. Denoting the total number of degrees with N and total number of grid points Nz, the standard for input parameter is as follows * Param Nmesh is of shape (N,Nz); first index changes deg * Param zmesh is of shape (N,Nz); second index changes z

Note

The input parameters alpha and beta as well as zmesh need to at least match the precision of the desired output, otherwise the multi-precision evaluation is meaningless.