[Numpy-discussion] just how 'discontiguous' can a numpy array become?
David Cournapeau
cournape at gmail.com
Sat Oct 31 08:32:17 EDT 2009
On Sat, Oct 31, 2009 at 9:22 PM, Chris Colbert <sccolbert at gmail.com> wrote:
>
> Will there ever be a situation where a discontiguous array owns its
> own data? Or more generally, will discontiguous data alway have a
> contiguous parent?
Yes to Q1 and No to Q2.
Discontiguous arrays are very easy to create: for example, if you say
np.empty((10, 50), order="F"), you have a discontiguous array. I use
this quite often when I need to interoperate with C or Fortran
libraries - interoperation with other libraries/formats is another
common source of discontiguous arrays, compared to memory views.
David
More information about the NumPy-Discussion
mailing list