-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hypot with complex arguments #31941
Comments
It doesn't seem like one would ever want For what it's worth, this is what Matlab does. Numpy doesn't seem to allow complex input for |
I was also thinking about disallowing complex input. The signature could be restricted from Number to Real, but yes, it's breaking |
Arguably, the hypotenuse of a triangle with imaginary side lengths is imaginary. |
An imaginary side length of a triangle is beyond my imagination. I would interpret |
@KlausC so you'd say that current behaviour is correct (and only docstrings would need to be adjusted)? |
right, I support @thchr. Also the 1-argument version |
I imagine (see what I did there?) that @stevengj or @simonbyrne might have a useful opinions on this. |
Although it's possible to restrict the However, the documentation should be fixed to state |
Ok, there seems to be consensus to keep current behaviour and fix the docstring. I've opened PR #31947. |
While looking at #31922 I noted that currently
which doesn't look correct given the meaning of
hypot
as "more precise version of \sqrt{\sum x_i^2}". I couldn't find any test abouthypot
with complex arguments, so I think this case was never taken into account.The text was updated successfully, but these errors were encountered: