Maybe this warning "The parameter constrain_e0" must be set to true could be checked in the code and through a ValueError exception in the case that pos_grid > 0 and constrain_e0 is False