Skip to content

BUG: array ufuncs with more than 2 inputs fails with 2 or more pd.Series and scalar arguments #48280

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

Merged
merged 36 commits into from
Oct 11, 2022

Conversation

weikhor
Copy link
Contributor

@weikhor weikhor commented Aug 27, 2022

@weikhor weikhor requested a review from phofl August 28, 2022 16:37
@mroeschke mroeschke added the ufuncs __array_ufunc__ and __array_function__ label Aug 29, 2022
@weikhor weikhor requested a review from phofl August 30, 2022 13:34
Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small comment and needs whatsnew

otherwise lgtm

@weikhor
Copy link
Contributor Author

weikhor commented Sep 3, 2022

@phofl @mroeschke

Can please have review. Thank. :)

@phofl
Copy link
Member

phofl commented Sep 3, 2022

Please be patient, we will have a look when we have time

@weikhor
Copy link
Contributor Author

weikhor commented Sep 3, 2022

Please be patient, we will have a look when we have time

Ok. Understand. Thank

Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small comment, otherwise lgtm.

I think you had a test for ufunc(ser, ser, 1) with an earlier commit?

@@ -131,7 +131,7 @@ Timezones

Numeric
^^^^^^^
-
- Bug in cannot apply array ufunc operation when inputs are mixed with type DataFrame and type Series (:issue:`39853`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you reword? Not sure what this means

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have update

@weikhor weikhor requested a review from phofl September 6, 2022 14:53
@phofl
Copy link
Member

phofl commented Sep 6, 2022

And the tests?

@weikhor
Copy link
Contributor Author

weikhor commented Sep 6, 2022

And the tests?
I have add the test in test_array_ufuncs_for_many_arguments inside this pandas/tests/frame/test_ufunc.py

@phofl
Copy link
Member

phofl commented Sep 6, 2022

I think you had a test for ufunc(ser, ser, 1) with an earlier commit?

?

@weikhor
Copy link
Contributor Author

weikhor commented Sep 7, 2022

And the tests?

@phofl yes. Earlier commit has test ufunc(ser, ser, 1) and ufunc(df, df, 1). Already remove test ufunc(ser, ser, 1) because it almost the same. Do you think it is better I add ufunc(ser, ser, 1) test?

@weikhor weikhor closed this Sep 7, 2022
@weikhor weikhor reopened this Sep 7, 2022
@phofl
Copy link
Member

phofl commented Sep 7, 2022

We should cover all cases, so yes please add back in. It's easy to construct an implementation that allows ufunc(df, df, 1) but rejects ufunc(ser, ser, 1)

@weikhor
Copy link
Contributor Author

weikhor commented Oct 9, 2022

We should cover all cases, so yes please add back in. It's easy to construct an implementation that allows ufunc(df, df, 1) but rejects ufunc(ser, ser, 1)

Ok. Done

@phofl phofl added this to the 1.6 milestone Oct 11, 2022
@phofl phofl merged commit 8974a95 into pandas-dev:main Oct 11, 2022
@phofl
Copy link
Member

phofl commented Oct 11, 2022

thx @weikhor

@mroeschke mroeschke modified the milestones: 1.6, 2.0 Oct 13, 2022
noatamir pushed a commit to noatamir/pandas that referenced this pull request Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ufuncs __array_ufunc__ and __array_function__
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: array ufuncs with more than 2 inputs fails with 2 or more pd.Series and scalar arguments
3 participants