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/05/07 03:00:26 UTC
[GitHub] [incubator-mxnet] leezu opened a new issue #18254: np.random.uniform type_code_ == kNDArrayHandle (7 vs. 11)
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:
users@infra.apache.org
[GitHub] [incubator-mxnet] Tommliu edited a comment on issue #18254: np.random.uniform type_code_ == kNDArrayHandle (7 vs. 11)
Posted by GitBox <gi...@apache.org>.
Tommliu edited a comment on issue #18254:
URL: https://github.com/apache/incubator-mxnet/issues/18254#issuecomment-626506371
I think we don't support the array_like input for np.random.uniform. It is different from the official numpy. From the docs (mx.np.random.uniform).
>
low : float, ndarray, optional
Lower boundary of the output interval. All values generated will be
greater than or equal to low. The default value is 0.
high : float, ndarray, optional
Upper boundary of the output interval. All values generated will be
less than high. The default value is 1.0.
I will add an error message for that
----------------------------------------------------------------
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
[GitHub] [incubator-mxnet] Tommliu commented on issue #18254: np.random.uniform type_code_ == kNDArrayHandle (7 vs. 11)
Posted by GitBox <gi...@apache.org>.
Tommliu commented on issue #18254:
URL: https://github.com/apache/incubator-mxnet/issues/18254#issuecomment-626506371
In deepnumpy, we don't support the array_like input for np.random.uniform. It is different from the official numpy. You can refer from the docs (mx.np.random.uniform)
`----------
low : float, ndarray, optional
Lower boundary of the output interval. All values generated will be
greater than or equal to low. The default value is 0.
high : float, ndarray, optional
Upper boundary of the output interval. All values generated will be
less than high. The default value is 1.0.`
----------------------------------------------------------------
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
[GitHub] [incubator-mxnet] Tommliu edited a comment on issue #18254: np.random.uniform type_code_ == kNDArrayHandle (7 vs. 11)
Posted by GitBox <gi...@apache.org>.
Tommliu edited a comment on issue #18254:
URL: https://github.com/apache/incubator-mxnet/issues/18254#issuecomment-626506371
I think we don't support the array_like input for np.random.uniform. It is different from the official numpy. From the docs (mx.np.random.uniform)
>
low : float, ndarray, optional
Lower boundary of the output interval. All values generated will be
greater than or equal to low. The default value is 0.
high : float, ndarray, optional
Upper boundary of the output interval. All values generated will be
less than high. The default value is 1.0.
----------------------------------------------------------------
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
[GitHub] [incubator-mxnet] Tommliu edited a comment on issue #18254: np.random.uniform type_code_ == kNDArrayHandle (7 vs. 11)
Posted by GitBox <gi...@apache.org>.
Tommliu edited a comment on issue #18254:
URL: https://github.com/apache/incubator-mxnet/issues/18254#issuecomment-626506371
In deepnumpy, we don't support the array_like input for np.random.uniform. It is different from the official numpy. You can refer from the docs (mx.np.random.uniform)
> ----------
low : float, ndarray, optional
Lower boundary of the output interval. All values generated will be
greater than or equal to low. The default value is 0.
high : float, ndarray, optional
Upper boundary of the output interval. All values generated will be
less than high. The default value is 1.0.
----------------------------------------------------------------
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