[Numpy-discussion] RFC: supporting complex inputs in np.logaddexp
ralf.gommers at gmail.com
Mon Jun 7 12:42:46 EDT 2021
On Tue, Jun 1, 2021 at 3:18 PM Filippo Vicentini <filippovicentini at gmail.com>
> Hello all,
> I would like to ask if the maintainers would be in favour of adding
> support to np.logaddexp in order to support complex numbers.
> scipy.special.logsumexp already does, and it would be relatively
> straightforward to support them in numpy too.
That may just work by accident in SciPy, it's not tested in
`scipy/special/tests/test_logsumexp.py`. Probably because it's implemented
in pure Python. If you rely on that, adding a few tests would be nice.
Adding support to `np.logaddexp` seems fine to me.
> Complex numbers are very common when working in quantum physics, where we
> have complex-valued probability amplitudes.
> Filippo Vicentini
> NumPy-Discussion mailing list
> NumPy-Discussion at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion