This branch added the tests ported from scipy

Merging this into master, since current work depends on it