removed numpy dependence using piio.minmax