reminisce commented on a change in pull request #10434: [MXNET-155] Add support for np.int32 and np.int64 as basic index types URL: https://github.com/apache/incubator-mxnet/pull/10434#discussion_r179672250
########## File path: python/mxnet/ndarray/ndarray.py ########## @@ -102,6 +103,11 @@ _NDARRAY_BASIC_INDEXING = 0 _NDARRAY_ADVANCED_INDEXING = 1 +if sys.version_info[0] == 3: + _index_types = (int, np.int32, np.int64) Review comment: sparse is using `integer_types` and I was afraid this change would break the use case there. Anyway, I finally removed this `_index_types` and added `np.int32` and `np.int64` directly to `integer_types`. Unit test for sparse use case is also added. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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