-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: Fix dtype mismatch on 32bit in IntervalTree get_indexer test #23468
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
Hello @jschendel! Thanks for submitting the PR.
|
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 just needs a small change in .get_indexer i think
this is inconsistent as II is the only index returning the wrong type
This is called in 1 case in
|
Merged master, to see if the code-check failure in https://travis-ci.org/pandas-dev/pandas/jobs/450067817#L2756 goes away. It wasn't clear to me what the issue was. |
Codecov Report
@@ Coverage Diff @@
## master #23468 +/- ##
==========================================
- Coverage 92.25% 92.24% -0.01%
==========================================
Files 161 161
Lines 51181 51224 +43
==========================================
+ Hits 47217 47254 +37
- Misses 3964 3970 +6
Continue to review full report at Codecov.
|
@jschendel are you able to fix this rather than this work-around? |
@jreback : will look into this tonight. sorry, been super bogged down at work. |
Modified |
Fixed the linting error (untested). |
lgtm. let's merge on green. |
thanks @jschendel and @TomAugspurger |
still failing |
Yeah, of course changing the It looks like one of the failures is unrelated to my changes though:
This error was not present in build #763 and then appeared in build #764; I had not made any changes between those two builds. |
…fixed * upstream/master: (47 commits) CLN: remove values attribute from datetimelike EAs (pandas-dev#23603) DOC/CI: Add linting to rst files, and fix issues (pandas-dev#23381) PERF: Speeds up creation of Period, PeriodArray, with Offset freq (pandas-dev#23589) PERF: define is_all_dates to shortcut inadvertent copy when slicing an IntervalIndex (pandas-dev#23591) TST: Tests and Helpers for Datetime/Period Arrays (pandas-dev#23502) Update description of Index._values/values/ndarray_values (pandas-dev#23507) Fixes to make validate_docstrings.py not generate warnings or unwanted output (pandas-dev#23552) DOC: Added note about groupby excluding Decimal columns by default (pandas-dev#18953) ENH: Support writing timestamps with timezones with to_sql (pandas-dev#22654) CI: Auto-cancel redundant builds (pandas-dev#23523) Preserve EA dtype in DataFrame.stack (pandas-dev#23285) TST: Fix dtype mismatch on 32bit in IntervalTree get_indexer test (pandas-dev#23468) BUG: raise if invalid freq is passed (pandas-dev#23546) remove uses of (ts)?lib.(NaT|iNaT|Timestamp) (pandas-dev#23562) BUG: Fix error message for invalid HTML flavor (pandas-dev#23550) ENH: Support EAs in Series.unstack (pandas-dev#23284) DOC: Updating DataFrame.join docstring (pandas-dev#23471) TST: coverage for skipped tests in io/formats/test_to_html.py (pandas-dev#22888) BUG: Return KeyError for invalid string key (pandas-dev#23540) BUG: DatetimeIndex slicing with boolean Index raises TypeError (pandas-dev#22852) ...
xref #23442 (comment)
To address @jreback's comment in the xref:
It looks like
IntervalTree.get_indexer
and any other similarIntervalTree
methods (get_loc
,get_indexer_nonunique
, etc.) will always return int64 as the data comes from aInt64Vector.to_array()
.If returning platform int is expected, I'm not sure that making this change now is the best use of time: I'm hitting these methods as part of the new
IntervalIndex
behavior specs, so probably best enforce platform int as part of that implementation.