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/03/16 18:33:32 UTC

[GitHub] [incubator-mxnet] JanuszL opened a new issue #17850: np.longlong is not supported by nd.empty while it is by nd.zeros

JanuszL opened a new issue #17850: np.longlong is not supported by nd.empty while it is by nd.zeros
URL: https://github.com/apache/incubator-mxnet/issues/17850
 
 
   ## Description
   nd.empty doesn't support type np.longlong while nd.zeros does. So it is a quite inconsistency.
   
   ### Error Message
   ```
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "/usr/local/lib/python3.6/dist-packages/mxnet/ndarray/utils.py", line 103, in empty
       return _empty_ndarray(shape, ctx, dtype)
     File "/usr/local/lib/python3.6/dist-packages/mxnet/ndarray/ndarray.py", line 3955, in empty
       return NDArray(handle=_new_alloc_handle(shape, ctx, False, dtype))
     File "/usr/local/lib/python3.6/dist-packages/mxnet/ndarray/ndarray.py", line 140, in _new_alloc_handle
       ctypes.c_int(int(_DTYPE_NP_TO_MX[np.dtype(dtype).type])),
   KeyError: <class 'numpy.longlong'>
   ```
   
   ## To Reproduce
   It works:
   ```
   import mxnet as mx
   import numpy as np
   mx.nd.zeros([2,1,3], dtype=np.longlong)
   ```
   while it doesn't
   ```
   import mxnet as mx
   import numpy as np
   mx.nd.empty([2,1,3], dtype=np.longlong)
   ```
   
   
   ### Steps to reproduce
   As above
   
   ## What have you tried to solve it?
   
   Nothing
   
   ## Environment
   mxnet-cu100==1.5.1.post0
   
   We recommend using our script for collecting the diagnositc information. Run the following command and paste the outputs below:
   ```
   curl --retry 10 -s https://raw.githubusercontent.com/dmlc/gluon-nlp/master/tools/diagnose.py | python
   
   # paste outputs here
   ```
   

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