def test(): # get the package import gsl # make a permutation p = gsl.permutation(shape=100).init() # check that we got a valid permutation back assert p # and return it return p
def test(): # get the package import gsl # make a permutation p = gsl.permutation(shape=100).init() # verify we can access its elements for i in range(len(p)): assert i == p[i] # and return it return p
def test(): # get the package import gsl # make a permutation p = gsl.permutation(shape=100).init() # check that we got a valid permutation back assert p # clone it q = p.clone() # check that it is valid assert q # and return them return p, q