I have defined a Fortran contiguous array:
import numpy as np
hp = np.zeros([number_fragments, max(length_fragments_list), 6], order='F')
Slices of this array are not Fortran contiguous. How can I fix that?
hn = hp[0,0:Length-1,:]
hn.flags
C_CONTIGUOUS : False
F_CONTIGUOUS : False
also
hn = hp[0,0:Length-1,:].copy()
hn.flags
C_CONTIGUOUS : True
F_CONTIGUOUS : False
How can I get, easily, Fortran contiguous arrays after slicing?