bandito90 opened a new issue #20651: URL: https://github.com/apache/incubator-mxnet/issues/20651
## Description According to the documentation of nd.random.uniform(): "Samples are uniformly distributed over the half-open interval [low, high) (includes low, but excludes high). low (float or 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 or NDArray, optional) – Upper boundary of the output interval. All values generated will be less than high. The default value is 1.0." However, when sampling a random uniform with bi-dimensional shape for instance, we can have some entries equal to 1. See example below to reproduce the error. ## To Reproduce ``` import mxnet as mx from mxnet import nd mx.random.seed(0) shape = (233, 45) u = nd.max(nd.random.uniform(shape=shape)) count = 0 while u != 1.: u = nd.max(nd.random.uniform(shape=shape)) count += 1 print(f"Got {u} after {count} iterations") ``` -- 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. To unsubscribe, e-mail: issues-unsubscr...@mxnet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@mxnet.apache.org For additional commands, e-mail: issues-h...@mxnet.apache.org