Customization
I have a Fortran sorted numpy array with one dimensional size
In [1]: import numpy as np
In [2]: x = np.array([[1, 2, 3]], order='F')
In [3]: x.strides
Out[3]: (8, 8)
I am considering this array with a smaller dtype
In [4]: y = x.view('i2')
In [5]: y
Out[5]: array([[1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0]], dtype=int16)
In [6]: y.strides
Out[6]: (8, 2)
Questions
First, should I be concerned about the outcome of these steps? The next line contains more than eight bytes.
Secondly, I really wanted this array form to be (4, 3), not (12, 3). Typically, with arrays installed, Fortran .viewwill expand the first dimension, not the second.
Thirdly, how can I rotate the array above (or any array created using a similar process into an array (4, 3)) so that in this case three of the four lines are zeros. Am I missing a smart transposition trick?
Version
In [3]: sys.version_info
Out[3]: sys.version_info(major=3, minor=4, micro=3, releaselevel='final', serial=0)
In [4]: numpy.__version__
Out[4]: '1.10.1'