riptable icon indicating copy to clipboard operation
riptable copied to clipboard

Use the numpy Generator API uniformly

Open jack-pappas opened this issue 4 years ago • 0 comments

riptable has a number of uses of the older numpy RNG APIs, e.g. np.random.randint(). The "new" Generator-based API is cleaner and often offers improved performance; it also avoids maintaining a global random state -- instead default_rng allows individual PRNG instances to be initialized with a seed value if desired.

riptable should uniformly use the new APIs; every method that uses these APIs should also be modified to accept an optional seed parameter (see Dataset.sample() for an example).

jack-pappas avatar Jul 02 '21 15:07 jack-pappas