Python TypeError: range() integer end argument expected, got float -
i apologize in advance, saw answers given similar kind of error couldn't make out out of case. python quite basic , trying run little piece of code:
mybox = (17.0, -13.0, 489.0644700903291, 566.0) # 'box' input these values vary xmin, ymin, xmax, ymax = mybox yvalue = range(ymin, ymax, 30) running it, error:
typeerror: range() integer end argument expected, got float. is there way use float in range that?
thanks,
you're looking arange, can found in numpy (or pylab).
import numpy ... yvalue = numpy.arange(ymin, ymax, 30.0)
Comments
Post a Comment