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

Enforces NDArray type in get_symbol #16871

Merged
merged 1 commit into from
Nov 20, 2019
Merged

Conversation

Kh4L
Copy link
Contributor

@Kh4L Kh4L commented Nov 20, 2019

Description

Giving a Python object different than NDArray to get_symbol causes a Segfault, we need to enforce the type.
Add an assert for type checking.

Checklist

Essentials

  • Changes are complete (i.e. I finished coding on this PR)
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

  • Add type check

@Kh4L Kh4L requested a review from szha as a code owner November 20, 2019 13:45
@ptrendx
Copy link
Member

ptrendx commented Nov 20, 2019

Could you make the error message a little bit more clear (like adding "Incorrect type of the argument" or something like that?)

@Kh4L
Copy link
Contributor Author

Kh4L commented Nov 20, 2019

Could you make the error message a little bit more clear (like adding "Incorrect type of the argument" or something like that?)

Done

Copy link
Member

@ptrendx ptrendx left a comment

Choose a reason for hiding this comment

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

LGTM

@ptrendx ptrendx merged commit 95c3d03 into apache:master Nov 20, 2019
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.

None yet

2 participants