advanced numpy ndarray object internals the numpy ndarray provides means to interpret block of homogeneous data (either contiguous or stridedmore on this lateras multidimensional array object as you've seenthe data typeor dtypedetermines how the data is interpreted as being floating pointintegerbooleanor any of the other types we've been looking at part of what makes ndarray powerful is that every array object is strided view on block of data you might wonderfor examplehow the array view arr[:: ::- does not copy any data simply putthe ndarray is more than just chunk of memory and dtypeit also has striding information which enables the array to move through memory with varying step sizes more preciselythe ndarray internally consists of the followinga pointer to datathat is block of system memory the data type or dtype tuple indicating the array' shapefor examplea by array would have shape ( in [ ]np ones(( )shape out[ ]( tuple of stridesintegers indicating the number of bytes to "stepin order to advance one element along dimensionfor examplea typical ( ordermore on this later array of float ( -bytevalues has strides ( in [ ]np ones(( )dtype=np float strides out[ ]( while it is rare that typical numpy user would be interested in the array stridesthey are the critical ingredient in constructing copyless array views strides can even be negative which enables an array to move backward through memorywhich would be the case in slice like obj[::- or obj[:::- www it-ebooks info