WIP: use np.ascontiguousarray instead of array2d