Use `np.ascontiguousarray` instead of `astype` attribute