Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

gather_nd: check bound and wrap negative indices #17208

Merged
merged 3 commits into from
Jan 10, 2020

Conversation

Alicia1529
Copy link
Contributor

@Alicia1529 Alicia1529 commented Jan 3, 2020

  1. check if indices are out of bound

  2. wrap negative indices

  3. move NormalizeError out of c_api_error.h

Copy link
Contributor

@reminisce reminisce left a comment

Choose a reason for hiding this comment

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

Please add unit tests for catching IndexError exception.

src/operator/tensor/indexing_op.cc Outdated Show resolved Hide resolved
src/operator/tensor/indexing_op.cu Outdated Show resolved Hide resolved
@haojin2 haojin2 added the Numpy label Jan 6, 2020
@haojin2 haojin2 added this to In progress in numpy via automation Jan 6, 2020
@haojin2
Copy link
Contributor

haojin2 commented Jan 6, 2020

Maybe also add some tests to verify this new checking.

gather_nd: increase the interpretability of the error msg

gather_nd: update test
Copy link
Contributor

@haojin2 haojin2 left a comment

Choose a reason for hiding this comment

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

LGTM

numpy automation moved this from In progress to Reviewer approved Jan 10, 2020
@haojin2 haojin2 merged commit 4ed14e2 into apache:master Jan 10, 2020
numpy automation moved this from Reviewer approved to Done Jan 10, 2020
@eric-haibin-lin
Copy link
Member

@szha we should not mix commits in a PR. It makes it hard to search for the commit that fixes " NormalizeError" APIs

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
No open projects
numpy
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants