How are non-contiguous arrays created?
![](https://secure.gravatar.com/avatar/ad12e59ec9f0ca842b3019c77c13dc05.jpg?s=120&d=mm&r=g)
Hi All, In the "Copy on demand" discussion, the differences between ravel and flat were discussed with regards to contiguous/non-contiguous arrays. I want to experiment, but after looking/researching I can't figure it out: How is a non-contiguous array created? Thanks. Norman Davis Space Data Corporation
![](https://secure.gravatar.com/avatar/5dde29b54a3f1b76b2541d0a4a9b232c.jpg?s=120&d=mm&r=g)
Norman Davis wrote:
How is a non-contiguous array created?
By slicing an array. Since slicing created a "view" into the same data, it may not represent a contiguous portion of memory. Example:
-Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov
![](https://secure.gravatar.com/avatar/5dde29b54a3f1b76b2541d0a4a9b232c.jpg?s=120&d=mm&r=g)
Norman Davis wrote:
How is a non-contiguous array created?
By slicing an array. Since slicing created a "view" into the same data, it may not represent a contiguous portion of memory. Example:
-Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov
participants (2)
-
Chris Barker
-
Norman Davis