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

Chris Colbert sccolbert at gmail.com
Sat Oct 31 09:02:14 EDT 2009


Great!

Thanks for the help David!



On Sat, Oct 31, 2009 at 1:58 PM, David Cournapeau <cournape at gmail.com> wrote:
> On Sat, Oct 31, 2009 at 9:45 PM, Chris Colbert <sccolbert at 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 at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>



More information about the NumPy-Discussion mailing list