With numpy and scipy