You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/06/26 00:14:01 UTC

[GitHub] toddsundsted opened a new pull request #11397: Check Shape

toddsundsted opened a new pull request #11397: Check Shape
URL: https://github.com/apache/incubator-mxnet/pull/11397
 
 
   ## Description ##
   The `NDArray` constructors do not ensure that shape dimensions are all positive numbers. In Python, at least, expressions like `nd.random_uniform(shape=[5, 5, -2])` and `nd.random_uniform(shape=[5, 5, 0])` cause the runtime to crash.
   
   ## Checklist ##
   ### Essentials ###
   - [X] Changes are complete (i.e. I finished coding on this PR)
   - [X] Code is well-documented: 
   - [X] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
   
   ### Changes ###
   - Create a method `CheckShape()` and invoke it in every constructor.
   
   ## Comments ##
   I didn't see unit tests for `NDArray`. I'd be happy to use or create unit tests, if that is desired.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services