[Numpy-discussion] just how 'discontiguous' can a numpy array become?

Chris Colbert sccolbert@gmail....
Sat Oct 31 08:02:14 CDT 2009


Great!

Thanks for the help David!



On Sat, Oct 31, 2009 at 1:58 PM, David Cournapeau <cournape@gmail.com> wrote:
> On Sat, Oct 31, 2009 at 9:45 PM, Chris Colbert <sccolbert@gmail.com> wrote:
>
>> Graphically can this every occur in hardware memory:
>>
>> |--- a portion of array A ---|--- python object foo ---|--- The rest
>> of array A ----|
>
> No, this can never happen in the current numpy memory model, the
> allocated block has to be contiguous, and you can get to any item of
> the array from the data pointer (address of the first item) by N *
> item_size. That's a fundamental feature to enable fast access (you
> only need to jump once).
>
> David
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>


More information about the NumPy-Discussion mailing list