What it does#
Checks for the use of legacy
np.random function calls.
Why is this bad?#
According to the NumPy documentation's Legacy Random Generation:
RandomStateprovides access to legacy generators... This class should only be used if it is essential to have randoms that are identical to what would have been produced by previous versions of NumPy.
The members exposed directly on the
random module are convenience
functions that alias to methods on a global singleton
instance. NumPy recommends using a dedicated
rather than the random variate generation methods exposed directly on
random module, as the new
Generator is both faster and has
better statistical properties.