(rontolisp) docs
← Functions

linalg:rand

(linalg:rand shape &optional element-type)

Returns an array of uniform draws in [0, 1) (numpy's np.random.rand, but taking a shape designator like linalg:zeros: an integer for a vector, a list for a matrix). Double-float by default; pass 'single-float for a packed #f result. Draws come from the shared generator, so a program that calls linalg:seed first gets the same values on every backend.