Skip to content

Conversation

zyfncg
Copy link
Contributor

@zyfncg zyfncg commented Mar 14, 2022

PR types

Bug fixes

PR changes

Others

Describe

Change the exception throwing type of getitem from pybind type to PADDLE_ENFORCE.

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

std::to_string(-dim_len) + ", " + std::to_string(dim_len) + ")";
// py::index_error is corresponding to IndexError in Python
// Used to indicate out of bounds access in __getitem__, __setitem__
throw py::index_error(str_error_message);
Copy link
Contributor

Choose a reason for hiding this comment

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

框架还有几个 throw py::index_error() 建议也一起改下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

剩余的py::index_error()在另一个PR40538中移除

zhwesky2010
zhwesky2010 previously approved these changes Mar 14, 2022
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.

2 participants