support np.amax and np.amin