Did I find the right examples for you? yes no

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)
Returns the positions of ascents in a permutation, ie, the location
where p[i] < p[i+1]

Examples
========

>>> from sympy.combinatorics.permutations import Permutation
>>> p = Permutation([4,0,1,3,2])
>>> p.ascents()
[1, 2](more...)

src/s/y/sympy-0.7.5/sympy/combinatorics/tests/test_permutations.py   sympy(Download)
    q = Permutation([[1, 2, 3, 5, 6], [0, 4]])
 
    assert p.ascents() == [0, 3, 4]
    assert q.ascents() == [1, 2, 4]
    assert r.ascents() == []

src/s/y/sympy-HEAD/sympy/combinatorics/tests/test_permutations.py   sympy(Download)
    q = Permutation([[1, 2, 3, 5, 6], [0, 4]])
 
    assert p.ascents() == [0, 3, 4]
    assert q.ascents() == [1, 2, 4]
    assert r.ascents() == []