I am passing a floating exponent value to a python function and later using it:
def estimateFit(infile, fsrmin):
test=isfloat(fsrmin)
print "fsrmin test for isfloat: %s" %test
flimit = 30e9;
print "flimit = %.3e" %flimit
float(fsrmin)
print "fsrmin = %.3e" %fsrmin
I am calling this function from another python program as:
fsrmin = sys.argv[3]
R, I, w = srf.estimateFit(infile,fsrmin)
I am always getting this error:
> print "fsrmin = %.3e" %fsrmin
TypeError: float argument required, not str
As you can see I tried to convert to float in the program. Anything I am missing