-
-
Notifications
You must be signed in to change notification settings - Fork 11.9k
BUG: fix typo in polydiv that prevented promotion to poly1d #17053
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
Conversation
|
It might be good to add a test for the return type of |
|
closes #17076 |
|
@Dahlia-Chehata: Not sure it was really worth opening an issue about that given we already have the patch, but no harm done. |
|
@eric-wieser you are right, but I discovered this PR after I already had opened the issue. |
numpy/lib/tests/test_polynomial.py
Outdated
| assert_equal(isinstance(s, np.poly1d) == True) | ||
| assert_equal(isinstance(t, np.poly1d) == True) |
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.
| assert_equal(isinstance(s, np.poly1d) == True) | |
| assert_equal(isinstance(t, np.poly1d) == True) | |
| assert isinstance(s, np.poly1d) | |
| assert isinstance(t, np.poly1d) |
numpy/lib/tests/test_polynomial.py
Outdated
| d = np.poly1d([1, 2, 3]) | ||
| c = [1, 2, 3] | ||
| s, t = np.polydiv(d, c) |
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 test is backwards - its the one that passed before this patch.
Probably fine to keep it, but you should add one with the arguments in the other order too.
rossbar
left a comment
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.
LGTM, thanks @jakobjakobson13
See #17012 item 16.
Closes #17076