-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Hashtable size hint cap #22805
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
BUG: Hashtable size hint cap #22805
Conversation
Hello @chris-b1! Thanks for updating the PR.
Comment last updated on January 14, 2019 at 20:09 Hours UTC |
@@ -266,6 +266,7 @@ cdef class {{name}}HashTable(HashTable): | |||
def __cinit__(self, size_hint=1): | |||
self.table = kh_init_{{dtype}}() | |||
if size_hint is not None: | |||
size_hint = min(size_hint, _SIZE_HINT_LIMIT) |
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.
you can type the size_hint as a uint_t I think to avoid this problem
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.
It's getting typed as a uint
on the next line - we actually want it untyped here so it could accept arbitrarily large values, just needs capped before before being converted to the c-type (what was causing the original error)
can you rebase |
@chris-b1 can you rebase / update |
Codecov Report
@@ Coverage Diff @@
## master #22805 +/- ##
==========================================
- Coverage 92.21% 92.18% -0.04%
==========================================
Files 162 169 +7
Lines 51768 50810 -958
==========================================
- Hits 47739 46839 -900
+ Misses 4029 3971 -58
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #22805 +/- ##
=======================================
Coverage 92.38% 92.38%
=======================================
Files 166 166
Lines 52363 52363
=======================================
Hits 48377 48377
Misses 3986 3986
Continue to review full report at Codecov.
|
@jreback - I think this is good now |
@@ -573,9 +574,10 @@ cdef class StringHashTable(HashTable): | |||
# or a sentinel np.nan / None missing value | |||
na_string_sentinel = '__nan__' | |||
|
|||
def __init__(self, int size_hint=1): | |||
def __init__(self, size_hint=1): |
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 just type this as int64?
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.
good point, that'll work
This just needs a rebase and it looks good to go (Travis failure was a timeout) |
can you merge master and update |
@chris-b1 can you merge master |
@jreback - should be good now! |
thanks @chris-b1 |
git diff upstream/master -u -- "*.py" | flake8 --diff