bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / matlib / rand
function
numpy.matlib:rand
source: build-install/usr/lib/python3.14/site-packages/numpy/matlib.py :233
Signature
def rand ( * args ) Summary
Return a matrix of random values with given shape.
Extended Summary
Create a matrix of the given shape and propagate it with random samples from a uniform distribution over [0, 1).
Parameters
\*args: ArgumentsShape of the output. If given as N integers, each integer specifies the size of one dimension. If given as a tuple, this tuple gives the complete shape.
Returns
out: ndarrayThe matrix of random values with shape given by \*args.
Examples
np.random.seed(123) import numpy.matlib np.matlib.rand(2, 3) np.matlib.rand((2, 3))✓
np.matlib.rand((2, 3), 4)
✓See also
Aliases
-
numpy.matlib.rand