AdvancedPhotonSource / tike

Repository for ptychography software
http://tike.readthedocs.io
Other
29 stars 15 forks source link

BUG: Test and handle edge cases for wobbly_center #172

Closed carterbox closed 2 years ago

carterbox commented 2 years ago

Purpose

Adds tests which handle when the number of requested clusters is 1 or fewer and greater than the total population.

Approach

Realized while running unrelated tests that wobbly_center was not working for all valid cluster sizes. Added tests to check all of the edge cases, then updated the docs/source accordingly.

Pre-Merge Checklists

Submitter

Reviewer

pep8speaks commented 2 years ago

Hello @carterbox! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2021-11-09 20:31:49 UTC
stevehenke commented 2 years ago

These changes handle edge cases for the wobbly centers algorithm. The updated tests pass without issue. Thanks for your contribution!