EHN: utils function only with np.array