Skip to content

Add and test local_maxima function#3

Open
marinegor wants to merge 2 commits intoASPP:masterfrom
marinegor:testing-pb-xxx
Open

Add and test local_maxima function#3
marinegor wants to merge 2 commits intoASPP:masterfrom
marinegor:testing-pb-xxx

Conversation

@marinegor
Copy link

Implements local_maxima with list comprehensions and tests it with pytest

@pberkes
Copy link
Contributor

pberkes commented Sep 7, 2022

I think it would fail this test:

def test_local_maxima_not_a_plateau():
    values = [1, 2, 2, 3, 1]
    expected = [3]
    maxima = local_maxima(values)
    assert maxima == expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants