There's no simple way to make a sequence based on step size that includes both endpoints. For instance, to produce the sequence [1.0, 1.1, 1.2, 1.3, 1.4, 1.5], you'd have to do something clunky like:
linspace(1.0, 1.5, (1.5-1.0)/0.1+1)
or
arange(1.0, 1.5+0.01, 0.1)
it would be more convenient if you could just say
linspace(1.0, 1.5, step=0.1)
or maybe
arange(1.0, 1.5, 0.1, endpoint=True)
Of course, step could not be specified at the same time as num.
Original ticket http://projects.scipy.org/numpy/ticket/2176 on 2012-06-28 by atmention:endolith, assigned to unknown.
There's no simple way to make a sequence based on step size that includes both endpoints. For instance, to produce the sequence [1.0, 1.1, 1.2, 1.3, 1.4, 1.5], you'd have to do something clunky like:
or
it would be more convenient if you could just say
or maybe
Of course,
step
could not be specified at the same time asnum
.