Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 2, 2024. It is now read-only.
/sdcPublic archive

impl loc callable#501

Open
1e-to wants to merge5 commits intoIntelPython:master
base:master
Choose a base branch
Loading
from1e-to:loc_callable
Open

Conversation

1e-to
Copy link
Contributor

No description provided.

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.\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Do you exactly need round brackets around of lambda?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

What do you think about merging oftest_series_loc_callable andtest_series_loc_callable2?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Why not do that?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@densmirndensmirndensmirn approved these changes

@kozlov-alexeykozlov-alexeyAwaiting requested review from kozlov-alexey

@AlexanderKalistratovAlexanderKalistratovAwaiting requested review from AlexanderKalistratov

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@1e-to@densmirn@AlexanderKalistratov

[8]ページ先頭

©2009-2025 Movatter.jp