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

[Ehance & Fix] Support any slice interval for indexing(__getitem__) in eager/static mode #69827

Conversation

HydrogenSulfate
Copy link
Contributor

@HydrogenSulfate HydrogenSulfate commented Nov 29, 2024

PR Category

User Experience

PR Types

Improvements

Description

Pcard-75624

使用统一的normalize_interval对切片左、右端点进行规范化,在给定任意的切片索引时(区间要求numpy下合法),能计算出正确的区间端点,从而解决了负数步长的切片结果错误/报错问题,以及支持了任意区间的indexing操作。

Related PR: data-apis/array-api-compat#206

Copy link

paddle-bot bot commented Nov 29, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@HydrogenSulfate HydrogenSulfate changed the title [Ehance & Fix] Support any slice interval for indexing(__getitem__) in eager/static mode [Ehance & Fix] Support any slice interval for indexing(__getitem__) in eager/static mode Nov 29, 2024
Copy link
Contributor

@zoooo0820 zoooo0820 left a comment

Choose a reason for hiding this comment

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

LGTM

@HydrogenSulfate HydrogenSulfate merged commit e704480 into PaddlePaddle:develop Dec 3, 2024
28 checks passed
@HydrogenSulfate HydrogenSulfate deleted the support_any_slice_interval branch December 3, 2024 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants