xfmToIdx add flag to optionally reshape