-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Description
When working on porting some scipy.special
functions to CuPy, I noticed that there was a scheduled deprecation for SciPy 1.7 that has not yet been carried out. Specifically, the unsafe double->int casting for the n
or k
inputs to binomial distribution functions bdtr
, bdtrc
and bdtri
leads to the following warning:
scipy/scipy/special/_legacy.pxd
Lines 39 to 43 in b5d8bab
cdef inline void _legacy_deprecation(char *func_name, double x, double y) nogil: | |
with gil: | |
PyErr_WarnEx_noerr(DeprecationWarning, | |
"non-integer arg n is deprecated, removed in SciPy 1.7.x", | |
1) |
I thought about making a PR to complete the deprecation, however, I am not sure how best to proceed with that as it seems inconsistent with other functions in that same file. For example the functions related to negative binomial distributions (nbdtr
, nbdtrc
and nbdtri
) and others instead raise a RuntimeWarning
and do not indicate that the unsafe casting is deprecated. Shouldn't the approach for bdtr
and nbdtr
be the consistent? Please advise.