Fix numpy.ndarray creation so result is a c-contiguous array