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 2020/07/10 18:18:58 UTC

[GitHub] [incubator-mxnet] leezu commented on a change in pull request #18319: [numpy] symbolic advanced indexing

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



##########
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:
       The `isinstance(key, (NDArray, _np.ndarray)` check here would be equivalent to the `isinstance(key, Symbol)` check in https://github.com/apache/incubator-mxnet/pull/18319/files#diff-e9b526dba36aa6f2e7dbb6c4d49e9822R159-R160
   
   Can you elaborate why you call the `self._get_index_nd` here instead of directly calling `_npi.advanced_indexing(self, key)` as in the Symbol case?




----------------------------------------------------------------
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:
users@infra.apache.org