sxjscience commented on a change in pull request #17452: Fix indexing with zero 
dim array
URL: https://github.com/apache/incubator-mxnet/pull/17452#discussion_r372226596
 
 

 ##########
 File path: python/mxnet/ndarray/ndarray.py
 ##########
 @@ -3055,6 +3060,8 @@ def get_indexing_dispatch_code(key):
                 return _NDARRAY_EMPTY_TUPLE_INDEXING
             if getattr(idx, 'dtype', None) == np.bool_:
                 num_bools += 1
+            if getattr(idx, 'ndim', None) == 0:  # zero-dim array as index 
treated as integer
 
 Review comment:
   I think we should raise an error if it's float32. So it should be good if 
the new implementation also raises an error.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to