linalg:choice
(linalg:choice n size)
Returns size uniform indices in [0, n), drawn with replacement (numpy's np.random.choice default for an integer argument), as a packed double vector of integer values -- the mini-batch sampling idiom, typically fed to linalg:take-rows. Seed with linalg:seed for a backend-identical sequence; for indices without replacement, use linalg:permutation.