to_sparsemat now handles numpy matrices
Merge pull request #97 from wasade/to_sparsemat_bug

to_sparsemat now handles numpy matrices