What is a NumPy array?
A NumPy array is a multidimensional array of objects all of the same type. In memory, it is an object which points to a block of memory, keeps track of the type of data stored in that memory, keeps track of how many dimensions there are and how large each one is, and – importantly – the spacing between elements along each axis. For example, you might have a NumPy array that represents the numbers from zero to nine, stored as 32-bit integers, one right after another, in a single block of memory. (for comparison, each Python integer needs to have some type information stored alongside it). You might also have the array of even numbers from zero to eight, stored in the same block of memory, but with a gap of four bytes (one 32-bit integer) between elements. This is called striding, and it means that you can often create a new array referring to a subset of the elements in an array without copying any data. Such subsets are called views. This is an efficiency gain, obviously, but it also a