Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-09 Thread David Goldsmith
On Wed, Jun 9, 2010 at 9:00 AM, David Cournapeau wrote: > On Thu, Jun 10, 2010 at 12:09 AM, Benjamin Root wrote: > >> I think that arrays are just syntax on pointer is indeed the key > >> reason for how C works here. Since a[b] really means a + b (which is > >> why 5[a] and a[5] are the same), I

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-09 Thread David Cournapeau
On Thu, Jun 10, 2010 at 12:09 AM, Benjamin Root wrote: >> I think that arrays are just syntax on pointer is indeed the key >> reason for how C works here. Since a[b] really means a + b (which is >> why 5[a] and a[5] are the same), I don't see how to do it differently. > > Holy crap!  You can do th

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-09 Thread Benjamin Root
> > I think that arrays are just syntax on pointer is indeed the key > reason for how C works here. Since a[b] really means a + b (which is > why 5[a] and a[5] are the same), I don't see how to do it differently. > Holy crap! You can do that in C?! ___

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-09 Thread David Cournapeau
On Wed, Jun 9, 2010 at 4:16 PM, Francesc Alted wrote: > A Tuesday 08 June 2010 23:34:09 Anne Archibald escrigué: >> > But the issue isn't one of efficiency, it's merely an arbitrarily chosen >> > convention.  (Does anyone know the history of the choices for FORTRAN and >> > C, esp. why K&R chose t

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-09 Thread Francesc Alted
A Tuesday 08 June 2010 23:34:09 Anne Archibald escrigué: > > But the issue isn't one of efficiency, it's merely an arbitrarily chosen > > convention. (Does anyone know the history of the choices for FORTRAN and > > C, esp. why K&R chose the opposite of what was already in common usage in > > FORTR

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-08 Thread David Goldsmith
On Tue, Jun 8, 2010 at 3:49 PM, Friedrich Romstedt < friedrichromst...@gmail.com> wrot > 2010/6/8 Anne Archibald : > > Numpy arrays can have any configuration of memory strides, including > > some that are zero; C and Fortran contiguous arrays are simply those > > that have special arrangements of

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-08 Thread Friedrich Romstedt
2010/6/8 Anne Archibald : > Numpy arrays can have any configuration of memory strides, including > some that are zero; C and Fortran contiguous arrays are simply those > that have special arrangements of the strides. The actual stride > values is normally almost irrelevant to python code. First, I

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-08 Thread Anne Archibald
On 8 June 2010 17:17, David Goldsmith wrote: > On Tue, Jun 8, 2010 at 1:56 PM, Benjamin Root wrote: >> >> On Tue, Jun 8, 2010 at 1:36 PM, Eric Firing wrote: >>> >>> On 06/08/2010 08:16 AM, Eric Firing wrote: >>> > On 06/08/2010 05:50 AM, Charles R Harris wrote: >>> >> >>> >> On Tue, Jun 8, 2010

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-08 Thread David Goldsmith
On Tue, Jun 8, 2010 at 1:56 PM, Benjamin Root wrote: > > On Tue, Jun 8, 2010 at 1:36 PM, Eric Firing wrote: > >> On 06/08/2010 08:16 AM, Eric Firing wrote: >> > On 06/08/2010 05:50 AM, Charles R Harris wrote: >> >> >> >> On Tue, Jun 8, 2010 at 9:39 AM, David Goldsmith< >> d.l.goldsm...@gmail.com

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-08 Thread Benjamin Root
On Tue, Jun 8, 2010 at 1:36 PM, Eric Firing wrote: > On 06/08/2010 08:16 AM, Eric Firing wrote: > > On 06/08/2010 05:50 AM, Charles R Harris wrote: > >> > >> > >> On Tue, Jun 8, 2010 at 9:39 AM, David Goldsmith >> > wrote: > >> > >> On Tue, Jun 8, 2010 at 8:2

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-08 Thread David Goldsmith
On Tue, Jun 8, 2010 at 12:05 PM, Anne Archibald wrote: > On 8 June 2010 14:16, Eric Firing wrote: > > On 06/08/2010 05:50 AM, Charles R Harris wrote: > >> > >> > >> On Tue, Jun 8, 2010 at 9:39 AM, David Goldsmith < > d.l.goldsm...@gmail.com > >> > wrote: > >> > >>

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-08 Thread Anne Archibald
On 8 June 2010 14:16, Eric Firing wrote: > On 06/08/2010 05:50 AM, Charles R Harris wrote: >> >> >> On Tue, Jun 8, 2010 at 9:39 AM, David Goldsmith > > wrote: >> >> On Tue, Jun 8, 2010 at 8:27 AM, Pavel Bazant > > wrote: >> >> >>

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-08 Thread Eric Firing
On 06/08/2010 08:16 AM, Eric Firing wrote: > On 06/08/2010 05:50 AM, Charles R Harris wrote: >> >> >> On Tue, Jun 8, 2010 at 9:39 AM, David Goldsmith> > wrote: >> >> On Tue, Jun 8, 2010 at 8:27 AM, Pavel Bazant> > wrote: >> >>

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-08 Thread Eric Firing
On 06/08/2010 05:50 AM, Charles R Harris wrote: > > > On Tue, Jun 8, 2010 at 9:39 AM, David Goldsmith > wrote: > > On Tue, Jun 8, 2010 at 8:27 AM, Pavel Bazant > wrote: > > > > > Correct me if I am wrong, but the paragra

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-08 Thread Charles R Harris
On Tue, Jun 8, 2010 at 9:39 AM, David Goldsmith wrote: > On Tue, Jun 8, 2010 at 8:27 AM, Pavel Bazant wrote: > >> >> > > Correct me if I am wrong, but the paragraph >> > > >> > > Note to those used to IDL or Fortran memory order as it relates to >> > > indexing. Numpy uses C-order indexing. That

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-08 Thread David Goldsmith
On Tue, Jun 8, 2010 at 8:27 AM, Pavel Bazant wrote: > > > > Correct me if I am wrong, but the paragraph > > > > > > Note to those used to IDL or Fortran memory order as it relates to > > > indexing. Numpy uses C-order indexing. That means that the last index > > > usually (see xxx for exceptions)

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-08 Thread Charles R Harris
On Tue, Jun 8, 2010 at 9:27 AM, Pavel Bazant wrote: > > > > Correct me if I am wrong, but the paragraph > > > > > > Note to those used to IDL or Fortran memory order as it relates to > > > indexing. Numpy uses C-order indexing. That means that the last index > > > usually (see xxx for exceptions)

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-08 Thread Pavel Bazant
> > Correct me if I am wrong, but the paragraph > > > > Note to those used to IDL or Fortran memory order as it relates to > > indexing. Numpy uses C-order indexing. That means that the last index > > usually (see xxx for exceptions) represents the most rapidly changing memory > > location, unlike

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-08 Thread Charles R Harris
On Mon, Jun 7, 2010 at 5:52 AM, Pavel Bazant wrote: > Correct me if I am wrong, but the paragraph > > Note to those used to IDL or Fortran memory order as it relates to > indexing. Numpy uses C-order indexing. That means that the last index > usually (see xxx for exceptions) represents the most r

Re: [Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-07 Thread David Goldsmith
On Mon, Jun 7, 2010 at 4:52 AM, Pavel Bazant wrote: > Correct me if I am wrong, but the paragraph > > Note to those used to IDL or Fortran memory order as it relates to > indexing. Numpy uses C-order indexing. That means that the last index > usually (see xxx for exceptions) represents the most r

[Numpy-discussion] C vs. Fortran order -- misleading documentation?

2010-06-07 Thread Pavel Bazant
Correct me if I am wrong, but the paragraph Note to those used to IDL or Fortran memory order as it relates to indexing. Numpy uses C-order indexing. That means that the last index usually (see xxx for exceptions) represents the most rapidly changing memory location, unlike Fortran or IDL, wher