Make peak_local_max return indices sorted, always #2435

Merged
merged 3 commits into from Jan 12, 2017

Projects

None yet

5 participants

@b52
Contributor
b52 commented Jan 7, 2017 edited

This is a fix for scikit-image/scikit-image#2432

b52 added some commits Jan 7, 2017
@b52 b52 Make peak_local_max return indices sorted, always
5fb0d7e
@b52 b52 Fix doctests that manifested a specific order
9fc7876
@codecov-io
codecov-io commented Jan 7, 2017 edited

Current coverage is 90.69% (diff: 100%)

Merging #2435 into master will increase coverage by 0.01%

@@             master      #2435   diff @@
==========================================
  Files           304        304          
  Lines         21417      21429    +12   
  Methods           0          0          
  Messages          0          0          
  Branches       1838       1838          
==========================================
+ Hits          19421      19435    +14   
+ Misses         1655       1654     -1   
+ Partials        341        340     -1   

Powered by Codecov. Last update 42f2e7d...d39b9e4

+ image[1, 1] = 20
+ image[3, 3] = 10
+ peaks = peak.peak_local_max(image, min_distance=1)
+ assert peaks.tolist() == [[1, 1], [3, 3]]
@soupault
soupault Jan 9, 2017 Member

Maybe test something more interesting here? For example,

image = np.zeros((3, 10))
image[1, (1, 3, 5, 7)] = (1, 3, 2, 4)
@b52
b52 Jan 9, 2017 Contributor

@soupault Done.

@soupault

In general, LGTM, but I'd prefer to see the test more complicated.

@b52 b52 Add one more (more complex) test case
d39b9e4
@jni
jni approved these changes Jan 12, 2017 View changes

LGTM!

@jni jni merged commit 3e34e9d into scikit-image:master Jan 12, 2017

4 checks passed

codecov/patch 100% of diff hit (target 90.68%)
Details
codecov/project 90.69% (+0.01%) compared to 42f2e7d
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@b52 b52 deleted the b52:issue-2432-peak-sorted branch Jan 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment