fix serializing ordering issue wrt to "C" and "F" for ndarrays.