Re: [Numpy-discussion] weird indexing

2008-01-04 Thread Pearu Peterson
On Fri, January 4, 2008 2:16 am, Mathew Yeates wrote: Hi Okay, here's a weird one. In Fortran you can specify the upper/lower bounds of an array e.g. REAL A(3:7) What would be the best way to translate this to a Numpy array? I would like to do something like A=numpy.zeros(shape=(5,)) and

Re: [Numpy-discussion] weird indexing

2008-01-04 Thread Sebastian Haase
On Jan 4, 2008 1:16 AM, Mathew Yeates [EMAIL PROTECTED] wrote: Hi Okay, here's a weird one. In Fortran you can specify the upper/lower bounds of an array e.g. REAL A(3:7) What would be the best way to translate this to a Numpy array? I would like to do something like

Re: [Numpy-discussion] weird indexing

2008-01-04 Thread Gael Varoquaux
On Thu, Jan 03, 2008 at 04:16:39PM -0800, Mathew Yeates wrote: Hi Okay, here's a weird one. In Fortran you can specify the upper/lower bounds of an array e.g. REAL A(3:7) What would be the best way to translate this to a Numpy array? I would like to do something like

Re: [Numpy-discussion] weird indexing

2008-01-04 Thread Robert Kern
Mathew Yeates wrote: Hi Okay, here's a weird one. In Fortran you can specify the upper/lower bounds of an array e.g. REAL A(3:7) What would be the best way to translate this to a Numpy array? I would like to do something like A=numpy.zeros(shape=(5,)) and have the expression A[3]

[Numpy-discussion] weird indexing

2008-01-03 Thread Mathew Yeates
Hi Okay, here's a weird one. In Fortran you can specify the upper/lower bounds of an array e.g. REAL A(3:7) What would be the best way to translate this to a Numpy array? I would like to do something like A=numpy.zeros(shape=(5,)) and have the expression A[3] actually return A[0]. Or