Python Typeerror Numpy Float64 Objective Definition