numpy.
RankWarning
Issued bypolyfit when the Vandermonde matrix is rank deficient.
polyfit
For more information, a way to suppress the warning, and an example ofRankWarning being issued, seepolyfit.
numpy.polysub
Random sampling (numpy.random)
numpy.random