Hi Omry!
You're looking for `.view()`:
In [1]: import numpy as np
In [2]: b = np.arange(1, 13).astype(np.uint8)
In [4]: y = b.view(np.uint16).reshape((3, 2))
In [5]: y
Out[5]:
array([[ 513, 1027],
[1541, 2055],
[2569, 3083]], dtype=uint16)
You can also change the endianness by replacing `np.
Hi All,
I know how to reshape arrays, my problem is a little more complicated than
that.
I am looking for the most efficient way to do the following and an example
will help:
1) I have a an array of bytes b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
This bytes array represents a width of 2 and a