add tests for dist_matrix(), improve documentation
be consistent on docstring format
use doctest and be consistent on docstring format
minor output change
add module docstring
distinguish variable name from function in the same module