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 2019/10/04 16:25:19 UTC

[GitHub] [incubator-mxnet] access2rohit commented on a change in pull request #16371: [WIP]Adding large tensor support and test for gather_nd

access2rohit commented on a change in pull request #16371: [WIP]Adding large tensor support and test for gather_nd
URL: https://github.com/apache/incubator-mxnet/pull/16371#discussion_r331584290
 
 

 ##########
 File path: python/mxnet/ndarray/ndarray.py
 ##########
 @@ -1048,7 +1048,10 @@ def _advanced_index_to_array(idx, ax_len, ctx):
 
         The ``ax_len`` is used to convert `slice` objects to integer arrays.
         """
-        idx_dtype = 'int32'
+        if sys.version_info[0] > 2 and _int64_enabled():
+            idx_dtype = 'int64'
+        else:
+            idx_dtype = 'int32'
 
 Review comment:
   Performing this check since idx can be an instance of NDArray, list, tuple, slice(python), integer_type etc. Also, earlier idx was hard coded to be 'int32' therefore with `Large Tensor enabled` it makes sense to use only 'int64'.

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


With regards,
Apache Git Services