pymc-devs / pytensor

PyTensor allows you to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays.
https://pytensor.readthedocs.io
Other
308 stars 94 forks source link

Scipy 1.14.0 changed the upcasting rule of several special functions when passing integers #862

Open ricardoV94 opened 1 month ago

ricardoV94 commented 1 month ago

Description

Functions like scipy.special.psi now always upcast to float64, even if the input is a low precision integer like int8. We need to handle these types, but: 1) float64 may be a bit too wasteful 2) We can't have the dtype depend on the scipy version, and lower pinning to 1.14.0 may be too restrictive?

ricardoV94 commented 1 month ago

I posed a vague question on the scipy discourse: https://discuss.scientific-python.org/t/several-special-functions-started-upcasting-low-precision-integer-inputs-to-float64-in-v1-14-0/1266