Dear all,
Is there a way to give an integer value to j when using a[i:j:-1] so that the
first element of the array can be included in the slice ?
I would like to use some code like a[i:i-k:-1] to get a slice of length k.
The numpy documentation seems to suggest that j=-1 should work:
Assume
Jerome Esteve wrote:
Dear all,
Is there a way to give an integer value to j when using a[i:j:-1] so
that the first element of the array can be included in the slice ?
I would like to use some code like a[i:i-k:-1] to get a slice of
length k.
The numpy documentation seems to suggest
Warren Weckesser wrote:
Jerome Esteve wrote:
Dear all,
Is there a way to give an integer value to j when using a[i:j:-1] so
that the first element of the array can be included in the slice ?
I would like to use some code like a[i:i-k:-1] to get a slice of
length k.
The numpy
On Wed, Mar 10, 2010 at 10:19 AM, Warren Weckesser
warren.weckes...@enthought.com wrote:
Warren Weckesser wrote:
Jerome Esteve wrote:
Dear all,
Is there a way to give an integer value to j when using a[i:j:-1] so
that the first element of the array can be included in the slice ?
I would
Jerome Esteve wrote:
Is there a way to give an integer value to j when using a[i:j:-1] so
that the first element of the array can be included in the slice ?
Is this what you are looking for?
In [11]: a = np.arange(10)
In [12]: a[6::-1]
Out[12]: array([6, 5, 4, 3, 2, 1, 0])
I know it's not