-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CI: update tests for numpy 1.20 change to floordiv #38172
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
Yikes, I got this passing, but i have no earthly idea what is going on in the Sparse tests |
if mask.any(): | ||
expected[mask] = np.nan | ||
condition = _np_version_under1p20 | ||
if isinstance(a_dense, np.ndarray) and isinstance(b_dense, np.ndarray): |
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.
can you add some comments here on what is changed, it is non-obvious from inspection what is changing (e.g. what is true in prior version and what is true now)
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.
yah as mentioned above, i have no frikkin idea what the underlying logic is here
condition = _np_version_under1p20 | ||
if isinstance(a_dense, np.ndarray) and isinstance(b_dense, np.ndarray): | ||
condition = True | ||
if a_dense.dtype == np.float64 and np.isnan(a.fill_value): |
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 seems really fragile
can we push an xfail for this case for now? (and debug / followup with this PR later). |
failing on 1.1.x as well, so will want to try to backport this. |
agreed with the above |
…-npdev-floordiv
updated to xfail |
narrowed down the xfails a little bit |
@@ -29,7 +31,7 @@ class TestSparseArrayArithmetics: | |||
def _assert(self, a, b): | |||
tm.assert_numpy_array_equal(a, b) | |||
|
|||
def _check_numeric_ops(self, a, b, a_dense, b_dense, mix, op): | |||
def _check_numeric_ops(self, a, b, a_dense, b_dense, mix, op, flag=False): |
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.
what is flag for?
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.
leftover from previous attempt at a fix, will remove
thanks @jbrockmendel (feel free to open an issue to address this, no hurry now). |
@meeseeksdev backport 1.1.x |
#38191) Co-authored-by: jbrockmendel <jbrockmendel@gmail.com>
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
Looks like numpy/numpy#16161 changed numpy's floordiv behavior