iarray.random.random_sample#

iarray.random.random_sample(shape: Sequence, cfg: Optional[Config] = None, **kwargs) IArray#

Return random floats in the half-open interval [0.0, 1.0).

Results are from the “continuous uniform” distribution.

Parameters
  • shape (Sequence) – The shape of the array to be created.

  • cfg (iarray.Config) – The configuration for running the expression. If None (default), global defaults are used. In particular, cfg.seed and cfg.random_gen are honored in this context.

  • kwargs (dict) – A dictionary for setting some or all of the fields in the iarray.Config dataclass that should override the current configuration. In particular, seed= and random_gen= arguments are honored in this context.

Returns

The new array.

Return type

IArray container

References

np.random-random_sample