[SciPy-Dev] Any ufunc in SciPy with two inputs and multiple outputs?

Robert Kern robert.kern at gmail.com
Wed Mar 11 12:09:00 EDT 2015


On Wed, Mar 11, 2015 at 4:02 PM, Jaime Fernández del Río <
jaime.frio at gmail.com> wrote:
>
> Hi all,
>
> There has been some work on ufunc arguments going on in numpy, e.g.
multiple output parameters can now be specified in a tuple to the 'out'
keyword argument, see #5621.
>
> There is also an ongoing discussion, see #5662, on whether this taking of
tuples of arrays as 'out' arguments should be extended to the ufunc methods
that can support it, which seems to only be `outer`. We need a ufunc with
two inputs and more than one output to test this, and there are none in
NumPy (the only ufuncs with more than one output are frexp and modf, which
take a single input). I haven't been able to spot any such ufunc in a quick
search of scipy.special, but would appreciate if someone more knowledgeable
of the innards of scipy could confirm this or point me in the right
direction.

[~]
|7> for f in vars(special).values():
    if isinstance(f, np.ufunc):
        if f.nin == 2 and f.nout > 1:
            print f.__name__
..>
ellipj
pbwa
pbdv
pbvv

--
Robert Kern
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20150311/b9589a8f/attachment.html>


More information about the SciPy-Dev mailing list