converting from numpy array of one type to another by re-interpreting raw bytes converting from numpy array of one type to another by re-interpreting raw bytes arrays arrays

converting from numpy array of one type to another by re-interpreting raw bytes


Yes. When you view an array with a different dtype, you are reinterpreting the underlying data (zeros and ones) according to the different dtype.

In [85]: x.view('<i2')Out[85]: array([ 20329,  13764, -20329, -13765,    249,   1743], dtype=int16)