Merge pull request #1 from thouis/3e602eb39ba4f855cb6658ae76d7232e91fa2d30

fix case with a valley between two seeds, and speed up indexing using stride information
Merge pull request #2 from thouis/master

python wrapper
formatting
formatting
generalized to arbitrary dimension
add extra checks, improve error message