Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR types
Others
PR changes
Others
Describe
Pcard-66985
Motivation
In Numpy, the behavior of non-tuple sequence for multidimensional indexing has been changed since 1.23. This incompatible upgrade caused our unittests of indexing to fail, which preventing our CI environment from upgrading to new numpy versions. (see PR #49556)
In a word, currently, the numpy versions are different between CI and user's environment.
This PR makes indexing unit test works well at numpy version >=1.23 and < 1.23, both.
What Numpy changed
In fact, numpy already gave warnings in version <1.23:
For List case, the outermost
[]
will be treated as tuple()
in version less than 1.23, which is used to wrap index elements for multiple axes. And from 1.23, this will be treat as a whole and only works on one axis.For future Paddle
Whether the paddle behavior in this case will change is still up for debate. Currently, we still keep the same behavior.