[Numpy-discussion] array, asarray as contiguous and friends

Sasha ndarray at mac.com
Thu Mar 23 17:31:16 CST 2006


On 3/23/06, Travis Oliphant <oliphant at ee.byu.edu> wrote:
> At any rate, if the fortran flag is there, we need to specify the
> contiguous case as well.   So, either propose a better interface (we
> could change it still --- the fortran flag doesn't have that much
> history) to handle the situation or accept what I do ;-)

Let me try. I propose to eliminate the fortran flag in favor of a more
general "strides" argument.  This argument can be either a sequence of
integers that becomes the strides, or a callable object that takes
shape and dtype arguments and return a sequence that becomes the
strides.  For fortran and c order functions that generate appropriate
stride sequences should be predefined to enable array(...,
strides=fortran, ...) and array(..., strides=contiguous).




More information about the Numpy-discussion mailing list