rougier / from-python-to-numpy

An open-access book on numpy vectorization techniques, Nicolas P. Rougier, 2017
http://www.labri.fr/perso/nrougier/from-python-to-numpy
Other
2.06k stars 340 forks source link

Question on the content of the book #97

Open vstadnytskyi opened 4 years ago

vstadnytskyi commented 4 years ago

This is great stuff.

https://www.labri.fr/perso/nrougier/from-python-to-numpy/#memory-layout

you wrote "...Said differently, an array is mostly a contiguous block of memory..."

Why would you the word "mostly". Is it because OS might allocate non-contigues chunk of memory?

rougier commented 4 years ago

I think I was referring to view on array. For example if you have a array Z and create a view Z[::2], this new array (which is merely a view on Z in not contiguous).