szha commented on a change in pull request #14315: [numpy] Shape support scalar 
tensor
URL: https://github.com/apache/incubator-mxnet/pull/14315#discussion_r262744066
 
 

 ##########
 File path: include/mxnet/tuple.h
 ##########
 @@ -404,9 +452,11 @@ class TShape : public Tuple<dim_t> {
   }
   /*! \return total number of elements in the shape */
   inline size_t Size() const {
+    if (this->ndim() == -1) return 0;
 
 Review comment:
   Should this throw an error instead?

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


With regards,
Apache Git Services

Reply via email to