-
Notifications
You must be signed in to change notification settings - Fork 62
Implement Series.str.find() #382
Implement Series.str.find() #382
Conversation
if not isinstance(sub, (StringLiteral, UnicodeType)): | ||
ty_checker.raise_exc(sub, 'str', 'sub') | ||
|
||
accepted_types = (Integer, IntegerLiteral, NoneType, Omitted) |
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.
If I'm not mistaken IntegerLiteral is inherited from Integer, so just (Integer, NoneType, Omitted)
would be enough. But it is better to check
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.
Also I'm not sure if it is better to explicitly add IntegerLiteral
as supported type or not. On one hand it makes the code more clear, on another, it is confusing that in some places it is specified and in another is not.
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 are right. IntegerLiteral
is inherited of Integer
.
ty_checker.raise_exc(end, 'None, int', 'end') | ||
|
||
def hpat_pandas_stringmethods_find_impl(self, sub, start=0, end=None): | ||
if start != 0: |
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.
Why we are not supporting start
and end
? UnicodeString doesn't?
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.
Numba 0.46 doesn't support str.find with extra parameters.
IntegerLiteral is inherited of Integer
78894d0
to
99f8f84
Compare
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
No description provided.