[NumPy-Tickets] [NumPy] #2176: Add step parameter to linspace (or endpoint parameter to arange)
NumPy Trac
numpy-tickets@scipy....
Thu Jun 28 14:48:39 CDT 2012
#2176: Add step parameter to linspace (or endpoint parameter to arange)
-------------------------+--------------------------------------------------
Reporter: endolith | Owner: somebody
Type: enhancement | Status: new
Priority: normal | Milestone: Unscheduled
Component: numpy.core | Version: 1.6.1
Keywords: |
-------------------------+--------------------------------------------------
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`.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/2176>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list