[Numpy-discussion] Deprecate numpy.dual?
Warren Weckesser
warren.weckesser at gmail.com
Fri Jan 3 07:11:44 EST 2020
In response to some work on improving the documentation of `numpy.linalg`
and how it compares to `scipy.linalg`, Kevin Sheppard suggested that the
documentation of the module `numpy.dual` should also be improved. When I
mentioned this suggestion in the community meeting on December 11, it was
suggested that we should probably deprecate `numpy.dual`.
I think some current NumPy developers (myself included at the time the
topic came up) are unfamiliar with the history and purpose of this module,
so I spent some time reading code and github issues and wrote up some
notes. These notes are available at
https://github.com/WarrenWeckesser/numpy-notes/blob/master/numpy-dual.md
If you are not familiar with `numpy.dual`, you might find those notes
useful.
Now that I know a bit more about `numpy.dual`, I'm not sure it should be
deprecated. It provides a hook for other libraries to selectively replace
the use of the exposed functions in internal NumPy code, so if a library
has a better version of, say, `linalg.eigh`, it can configure `numpy.dual`
to use its version. Then, for example, NumPy multivariate normal
distribution code could benefit from the use of that library's version of
`eigh`.
The NumPy documentation of `numpy.dual` refers specifically to SciPy, but
it could be used by any library. Does anyone know if any other libraries
use `register_func` to put their functions into the `numpy.dual` namespace?
SciPy currently registers some functions, but there is an open issue in
which it is proposed that SciPy no longer register its functions with
`numpy.dual`:
https://github.com/scipy/scipy/issues/10441
This email is to start the discussion of the future of `numpy.dual`.
Some of the options:
1. Quietly continue the status quo.
2. Deprecate `numpy.dual`.
3. Spend time improving the documentation of this feature, and
perhaps even expand the functions that are supported.
What do you think? For those who were involved in the creation of
`numpy.dual`: is it working out like you expected? If not, is it
worthwhile maintaining it?
Warren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20200103/d2111ef1/attachment.html>
More information about the NumPy-Discussion
mailing list