[Numpy-discussion] Problem with concatenate and object arrays

A. M. Archibald peridot.faceted at gmail.com
Wed Sep 6 22:18:39 EDT 2006


On 06/09/06, Charles R Harris <charlesr.harris at gmail.com> wrote:
> On 9/6/06, Charles R Harris <charlesr.harris at gmail.com> wrote:
>
> >       order  - Specify the order of the array.  If order is 'C', then the
> >                 array will be in C-contiguous order (last-index varies the
> >                 fastest).  If order is 'FORTRAN', then the returned array
> >                 will be in Fortran-contiguous order (first-index varies
> the
> >                 fastest).  If order is None, then the returned array may
> >                 be in either C-, or Fortran-contiguous order or even
> >                 discontiguous.

This one's a bit complicated. If array() is passed a list of lists,
there are two different orders that are relevant - the output order of
the array, and the order used to interpret the input. I suppose that
if L is a lost of lists, array(L)[2,3]==L[2][3], that is, in some
sense the arrays are always logically C-ordered even if the underlying
representation is different. Does it make sense to specify this
somewhere in the docstring? At least it would be good to make it clear
that the order parameter affects only the underlying storage format,
and not the indexing of the array.

A. M. Archibald




More information about the NumPy-Discussion mailing list