-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
BUG: linalg.polar: empty array support #20432
Conversation
thanks @redha2404 , can you add a regression test? Examples can be found in the test file changes in https://github.com/scipy/scipy/pull/20295/files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me, thanks! I'll let @ev-br take a look. CI failure is unrelated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good start but needs a tweak to properly account for integer inputs.
I think the problem with int is now resolved |
Thanks. The dtype is indeed correct now.
The dtype here is irrelevant, but the contents of |
I didn't notice
So, should I just put e.g, |
Oh, not for u. It doesn't transform int to float. I should not change the line for u |
I changed it as you suggested it |
Hi @redha2404 - did you mean to close this? |
I wanted to give it the last look-though before pressing the green button but the patch is now gone. |
I wanted to change the branch from which I merge because it was from my main branch. Should I make another PR with the same modifications ? |
Yeah, sounds good 👍 |
Reference issue
Check the box "polar" in #20372
What does this implement/fix?
If a is empty, the polar function now returns p and u of the right types. Before, an error occurred on empty array.
Additional information
It is just a first PR for #20372 to see I understand the problem