1

I need to compute the scipy.special trigamma and digamma functions of a variable with type bigfloat in python but I get the following error message:

TypeError: ufunc 'psi' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe'

I need to keep my variables as bigfloat for precision purposes. Does any body know how I can compute digamma and trigamma functions for such variables? Thanks.

Abhinav
  • 9
  • 2
Shayla
  • 11
  • 3

1 Answers1

1

Multiple precision implementations of digamma are available in gmpy2, mpmath, and Python-FLINT. I am not aware of any implementations of trigamma.

Disclaimer: I maintain gmpy2.

casevh
  • 11,093
  • 1
  • 24
  • 35