Numpy 1.9 compatibility issues

More numpy 1.9 compat fixes