leezu commented on a change in pull request #18319:
URL: https://github.com/apache/incubator-mxnet/pull/18319#discussion_r453039531



##########
File path: python/mxnet/numpy/multiarray.py
##########
@@ -720,6 +720,28 @@ def __getitem__(self, key):
                 key = (_np.newaxis,) + key
             return self._get_np_basic_indexing(key)
         elif indexing_dispatch_code == _NDARRAY_ADVANCED_INDEXING:
+            if prepend == _NDARRAY_NO_ZERO_DIM_BOOL_ARRAY and isinstance(key, 
(NDArray, _np.ndarray)):

Review comment:
       Yes. My question is that it appears that 
`indexing_key_expand_implicit_axes` messes up the `key` as it supports a much 
more generic case. It may be easier to have the `if` condition and call to 
`_npi.advanced_indexing` prior to the `indexing_key_expand_implicit_axes`. In 
that case the code may be simply
   
   ```
   if isinstance(key, (NDArray, _np.ndarray) and key.dtype is not _np.bool:
      return  _npi.advanced_indexing(self, key)
   ```
   
   But maybe I'm missing something, so clarification is appreciated. Thanks




----------------------------------------------------------------
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


Reply via email to