Uh oh!
There was an error while loading. Please reload this page.
impl loc callable - #501
Conversation
| return hpat_pandas_series_loc_callable_impl | ||
| raise TypingError('{} The index must be an Number, Slice, String, List, Array or a callable.\ |
There was a problem hiding this comment.
Looks like we need to remove the exception raising.
| @skip_sdc_jit('Not impl in old style') | ||
| def test_series_loc_callable(self): | ||
| def test_impl(S): | ||
| return S.loc[(lambda a: a)] |
There was a problem hiding this comment.
Do you exactly need round brackets around of lambda?
There was a problem hiding this comment.
Maybe to complicate lambda, e.g. a -> a ** 2?
| @skip_sdc_jit('Not impl in old style') | ||
| def test_series_loc_callable(self): | ||
| def test_impl(S): | ||
| return S.loc[(lambda a: a)] |
There was a problem hiding this comment.
Maybe to complicate lambda, e.g. a -> a ** 2?
| pd.testing.assert_series_equal(hpat_func(S), test_impl(S)) | ||
| @unittest.skip('Loc callable return float Series') | ||
| def test_series_loc_callable2(self): |
There was a problem hiding this comment.
What do you think about merging of test_series_loc_callable and test_series_loc_callable2?
There was a problem hiding this comment.
Because implementation has limit and always return float Series. In that case pandas return int Series, and we return float Series. I wrote about it in notes in loc.
Test skips with expected failure
No description provided.