(rontolisp) docs
← Functions

linalg:permutation

(linalg:permutation n)

Returns the integers 0..n-1 in a Fisher-Yates shuffle (numpy's np.random.permutation of an integer), as a packed double vector of integer values -- the epoch-shuffling idiom, typically fed to linalg:take-rows. Seed with linalg:seed for a backend-identical shuffle; for indices with replacement, use linalg:choice.