reminisce commented on issue #9772: ndarray indexing issues
URL: 
https://github.com/apache/incubator-mxnet/issues/9772#issuecomment-365816759
 
 
   @anirudh2290 Have you tried the following?
   ```python
   Python 2.7.14 |Anaconda custom (64-bit)| (default, Oct  5 2017, 02:28:52) 
   [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
   Type "help", "copyright", "credits" or "license" for more information.
   >>> import mxnet as mx
   /Users/jwum/anaconda2/lib/python2.7/site-packages/h5py/__init__.py:34: 
FutureWarning: Conversion of the second argument of issubdtype from `float` to 
`np.floating` is deprecated. In future, it will be treated as `np.float64 == 
np.dtype(float).type`.
     from ._conv import register_converters as _register_converters
   
/Users/jwum/anaconda2/lib/python2.7/site-packages/mxnet-1.1.0-py2.7.egg/mxnet/optimizer.py:136:
 UserWarning: WARNING: New optimizer mxnet.optimizer.NAG is overriding existing 
optimizer mxnet.optimizer.NAG
     Optimizer.opt_registry[name].__name__))
   
imp/Users/jwum/anaconda2/lib/python2.7/site-packages/urllib3/contrib/pyopenssl.py:46:
 DeprecationWarning: OpenSSL.rand is deprecated - you should use os.urandom 
instead
     import OpenSSL.SSL
   >>> import numpy as np
   >>> a = np.array([0], dtype='int32')
   >>> b = mx.nd.array(a)
   >>> b[a[0]]
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File 
"/Users/jwum/anaconda2/lib/python2.7/site-packages/mxnet-1.1.0-py2.7.egg/mxnet/ndarray/ndarray.py",
 line 504, in __getitem__
       % (str(key), str(type(key))))
   ValueError: Indexing NDArray with index=0 and type=<type 'numpy.int32'> is 
not supported
   ```

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

Reply via email to