Using numpy, I have this definition of a function:
def powellBadlyScaled(X): f1 = 10**4 * X[0] * X[1] - 1 f2 = numpy.exp(-numpy.float(X[0])) + numpy
I had the same problem. If precision can be ignored to some degree, use np.round(my_float_array, decimals=) to overcome this runtime warning.
np.round(my_float_array, decimals=)