<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 1, 2021 at 3:18 PM Filippo Vicentini <<a href="mailto:filippovicentini@gmail.com">filippovicentini@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div id="gmail-m_631136955437577101geary-body" dir="auto"><div><span style="background-color:rgb(255,255,255)">Hello all,</span><div><br></div><div>I would like to ask if the maintainers would be in favour of adding support to np.logaddexp in order to support complex numbers. </div><div>scipy.special.logsumexp already does, and it would be relatively straightforward to support them in numpy too.</div></div></div></blockquote><div><br></div><div>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.</div><div><br></div><div>Adding support to `np.logaddexp` seems fine to me.</div><div><br></div><div>Cheers,<br></div><div>Ralf</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div id="gmail-m_631136955437577101geary-body" dir="auto"><div><div><br></div><div>Complex numbers are very common when working in quantum physics, where we have complex-valued probability amplitudes.</div><div><br></div><div>Best,</div><div>Filippo Vicentini</div></div></div>_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div></div>