#NEWLINE# def cut_off_dataset( xy , cut_off , rng ) : #NEWLINE# #INDENT# ( x , y ) = xy #NEWLINE# n = x . shape [ 0 ] #NEWLINE# keep = ( n - ( xy % cut_off ) ) #NEWLINE# idx = rng . choice ( n , size = keep , replace = False ) #NEWLINE# return ( x [ idx , : ] , y [ idx ] )