Added sp import

fixes a bug where scipy needs to be imported