Two changes: (1) fixed core functions for non-matrix object types (ndarrays), just wrapped sq_dist calls with atleast_2d() and (2) added the first round of tests for the core functions using nosetests.