-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Fine-grained errstate handling #13145
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
|
||
.. _whatsnew_0190.new_features: | ||
|
||
New features |
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.
just leave all this off for now (this whatsnew file)
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.
As in don't add the new file at all?
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.
right, will add it later
@rkern ohh that was easy 😄 can we have a test which asserts the actual error state (is the default). Put in |
Current coverage is 85.27% (diff: 100%)@@ master #13145 diff @@
==========================================
Files 139 139
Lines 50380 50439 +59
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 42953 43012 +59
Misses 7427 7427
Partials 0 0
|
Please excuse the CI churn. The jobs for the older commits could be cancelled. |
no prob. thats an annoyance about Travis. |
@rkern I think we can now do this for 0.19.0 can you rebase / update? |
@rkern can you rebase |
@rkern, you now have another watcher on this... :-) Do you have an ETA when you could rebase? |
@jreback Rebased. |
@@ -95,7 +95,7 @@ def _align_core(terms): | |||
term_axis_size = len(ti.axes[axis]) | |||
reindexer_size = len(reindexer) | |||
|
|||
ordm = np.log10(abs(reindexer_size - term_axis_size)) | |||
ordm = np.log10(max(1, abs(reindexer_size - term_axis_size))) |
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 the fix for #13135 ?
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.
Yes.
this looks pretty good. just some minor comments. can you add in the whatsnew a sub-section, then add a warning (so its a big red box!) near the top. |
can you add docs and rebase. ping when green. this touches lots of code so I will merge then. |
…ed to be silenced.
@jreback rebased and docced. |
looks fine. though failing on all sparse comparisons....pls ping when green |
@jreback Fixed thinko. All green. |
@rkern Thanks a lot! |
git diff upstream/master | flake8 --diff
The precise strategy to be taken here is open for discussion. I tried to be reasonably fine-grained rather than slap a generic decorator over everything because it's easier to go that direction than the reverse. The
errstate()
blocks in the tests were added after fixing all of the library code. Unfortunately, these are less fine-grained than I would like because some of the tests have many lines of the formassert_array_equal(pandas_expression_to_test, expected_raw_numpy_expression)
whereexpected_raw_numpy_expression
is what is triggering the warning. It was tedious to try to rewrite all of that to wrap justexpected_raw_numpy_expression
.I think I got everything exercised by the test suite except for parts of the test suite that are skipped on my machine due to dependencies. We'll see how things go in the CI.
I haven't added any new tests yet. Could do if requested.