Fix numpy function calls