Refactoring to change namespace for numpy.