Esempio n. 1
0
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
Esempio n. 2
0
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
Esempio n. 3
0
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
Esempio n. 4
0
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