Re: [Numpy-discussion] missing array type
by Travis Oliphant other posts by this author
Feb 27 2006 4:29PM messages near this date
Re: [Numpy-discussion] missing array type
|
Re: [Numpy-discussion] missing array type
Sasha wrote:
> It looks like what you want is a zero-stride array that I proposed
> some time ago. See "zeros in strides" thread
> <http://sourceforge.net/mailarchive/forum.php?thread_id=9629046&forum_id=4890>.
>
> I've posted a patch to the list, but it was met with a mild opposition
> from Travis, so I've never committed it to SVN. The final word was:
>
> """
> I would also like to get more opinions about Sasha's proposal for
> zero-stride arrays.
>
> -Travis
> """
>
> If you agree that zero-stride array would provide the functionality
> that you need, it may tip the ballance towards accepting that patch.
>
>
Actually, I think it does. I think 0-stride arrays are acceptable (I
think you can make them now but you have to provide your own memory,
right?)
From one perspective, all we are proposing to do is allow numpy to
create the memory *and* allow differently strided arrays, right? Now,
if it creates the memory, the strides must be C-contiguous or
fortran-contiguous. We are going to allow user-specified strides, now,
even on memory creation.
Sasha, your initial patch was pretty good but I was concerned about the
speed of array creation being changed for other cases. If you can speed
up PyArray_NewFromDescr (probably by only changing the branch that
currently raises an error), then I think your proposed changes should be
O.K.
The check on the provided strides argument needs to be thought through
so that we don't accept strides that will allow walking outside the
memory that *is* or *will be* allocated.
I have not reviewed your code for this, but I'm assuming you've thought
that through?
-Travis
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@[...].net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion
Thread:
Alan G Isaac
Sasha
David M. Cooke
Sasha
Tim Hochberg
Colin J. Williams
Sasha
Travis Oliphant
Sasha
Travis Oliphant
Christopher Barker
Sasha
Sasha
Travis Oliphant
Sasha
Alan G Isaac
|