The Wayback Machine - https://web.archive.org/web/20200911155924/https://github.com/IntelPython/sdc/pull/501
Skip to content
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

impl loc callable #501

Open
wants to merge 5 commits into
base: master
from
Open

impl loc callable #501

wants to merge 5 commits into from

Conversation

@1e-to
Copy link
Contributor

1e-to commented Jan 15, 2020

No description provided.

elena.totmenina
return new_series

return hpat_pandas_series_loc_callable_impl

raise TypingError('{} The index must be an Number, Slice, String, List, Array or a callable.\

This comment has been minimized.

@densmirn

densmirn Jan 15, 2020

Contributor

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)]

This comment has been minimized.

@densmirn

densmirn Jan 15, 2020

Contributor

Do you exactly need round brackets around of lambda?

This comment has been minimized.

@densmirn

densmirn Jan 15, 2020

Contributor

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)]

This comment has been minimized.

@densmirn

densmirn Jan 15, 2020

Contributor

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):

This comment has been minimized.

@densmirn

densmirn Jan 15, 2020

Contributor

What do you think about merging of test_series_loc_callable and test_series_loc_callable2?

This comment has been minimized.

@densmirn

densmirn Jan 16, 2020

Contributor

Why not do that?

This comment has been minimized.

@1e-to

1e-to Jan 16, 2020

Author Contributor

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

elena.totmenina and others added 4 commits Jan 15, 2020
elena.totmenina
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.