On Tue, Jun 1, 2021 at 3:18 PM Filippo Vicentini <filippovicent...@gmail.com>
wrote:

> 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.

Cheers,
Ralf



> Complex numbers are very common when working in quantum physics, where we
> have complex-valued probability amplitudes.
>
> Best,
> Filippo Vicentini
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to