-
Notifications
You must be signed in to change notification settings - Fork 61
Series str contains #793
Series str contains #793
Conversation
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.
I would also add test to check parameters with invalid values.
@@ -82,7 +82,7 @@ def hpat_pandas_stringmethods_upper_impl(self): | |||
|
|||
import numba | |||
from numba.types import (Boolean, Integer, NoneType, | |||
Omitted, StringLiteral, UnicodeType) | |||
Omitted, StringLiteral, UnicodeType, Number, Set) |
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.
I don't see usage of Number
and Set
.
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.
Again, I don't see usage of Number
and Set
.
…ies_str_contains
|
||
def hpat_pandas_stringmethods_contains_impl(self, pat, case=True, flags=0, na=None, regex=True): | ||
if flags != 0: | ||
raise ValueError('Parameter flags can be only 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.
I propose to do something like that.
raise ValueError('Parameter flags can be only 0.') | |
raise SDCLimitation("Method contains(). Unsupported parameter. Given 'flags' != 0") |
@@ -82,7 +82,7 @@ def hpat_pandas_stringmethods_upper_impl(self): | |||
|
|||
import numba | |||
from numba.types import (Boolean, Integer, NoneType, | |||
Omitted, StringLiteral, UnicodeType) | |||
Omitted, StringLiteral, UnicodeType, Number, Set) |
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.
Again, I don't see usage of Number
and Set
.
sdc/tests/test_series.py
Outdated
|
||
with self.assertRaises(TypingError) as raises: | ||
hpat_func(s, pat, na=0) | ||
msg = 'Method contains(). The object na' |
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.
Please provide full error message.
No description provided.