leezu opened a new issue #18254:
URL: https://github.com/apache/incubator-mxnet/issues/18254


   `numpy.random.uniform` accepts 
   ```
   high : float or array_like of floats
           Upper boundary of the output interval.  All values generated will be
           less than high.  The default value is 1.0.
   ```
   
   but mxnet crashes when passed an array_like.
   
   ```
   >>> import mxnet as mx
   >>> mx.npx.set_np()
   >>> mx.np.random.uniform((64,512))
   terminate called after throwing an instance of 'dmlc::Error'
     what():  [02:56:06] include/mxnet/runtime/packed_func.h:521: Check failed: 
type_code_ == kNDArrayHandle (7 vs. 11) :  expected
   ```
   
   ```
   >>> import mxnet as mx
   >>> mx.np.random.uniform((64,512))
   terminate called after throwing an instance of 'dmlc::Error'
     what():  [02:56:06] include/mxnet/runtime/packed_func.h:521: Check failed: 
type_code_ == kNDArrayHandle (7 vs. 11) :  expected
   ```
   
   ```
   >>> import numpy as np
   >>> np.random.uniform((64,512))
   array([  5.60511983, 280.31067919])
   ```
   
   If array_like is unsupported in mxnet, at least there shouldn't be a crash 
but rather an error message explaining the lack of support.


----------------------------------------------------------------
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:
[email protected]


Reply via email to