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

adding graceful exit for begin=end case for nd.slice#14103

Closed
mseth10 wants to merge 1 commit intoapache:masterfrom
mseth10:fix-issue-13760
Closed

adding graceful exit for begin=end case for nd.slice#14103
mseth10 wants to merge 1 commit intoapache:masterfrom
mseth10:fix-issue-13760

Conversation

@mseth10
Copy link
Copy Markdown
Contributor

@mseth10 mseth10 commented Feb 9, 2019

Description

nd.slice outputs unexpectedly (throws incorrect output/ error message) when begin=end. This PR allows graceful exit for this case. This PR fixes #13760 .

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

  • Adding graceful exit for begin=end case for nd.slice

Comments

  • If this change is a backward incompatible change, why must this change be made.
  • Interesting edge cases to note here

@wkcn
Copy link
Copy Markdown
Member

wkcn commented Feb 9, 2019

is it better to return a 0-shape tensor when begin == end?

@marcoabreu
Copy link
Copy Markdown
Contributor

Could you elaborate on " All changes have test coverage:"?

@mseth10
Copy link
Copy Markdown
Contributor Author

mseth10 commented Feb 9, 2019

Closing this PR, and submitting it as part of another PR #14107 .

@mseth10 mseth10 closed this Feb 9, 2019
@mseth10 mseth10 deleted the fix-issue-13760 branch March 12, 2019 19:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nd.slice does not return empty tensor when begin=end

3 participants