Do special functions need to have all kwargs/attributes/methods of ufuncs?
Matt Haberland <[email protected]> Mon, 18 Sep 2023 23:22:04 -0700
| Newsgroups | gmane.comp.python.scientific.devel |
|---|---|
| Message-ID | <CADuxUiwTwEgvamJQN2uKxHjN+Kno2i3+aDGmQp5=ejpx76xV1Q@mail.gmail.com> |
Hi Team, gh-19023 <https://github.com/scipy/scipy/pull/19023> added alternative backend support to some SciPy special functions; e.g., when `scipy.special.ndtr` receives a CuPy array, it calls `cupyx.scipy.special.ndtr` to perform the calculation and returns the resulting CuPy array. Currently, this functionality is opt-in only (via the SCIPY_ARRAY_API environment variable) because of a backward incompatibility issue: Technically, many `scipy.special` functions are universal functions, and without special care, these functions will lose some of these features (e.g. `reduce`) when we wrap them. SciPy doesn't actually document any of these features (e.g. compare `ndtr` documentation <https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.ndtr.html> vs ufunc documentation <https://numpy.org/doc/stable/reference/ufuncs.html>), but does anyone know of code that relies on them and would be impacted by the change? If you have thoughts about which ufunc features need to be preserved, please join the conversation in gh-19252. Thanks! Matt _______________________________________________ SciPy-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/scipy-dev.python.org/ Member address: [email protected]