def _set_duals_if_necessary(self, y): if not np.array_equal(y, self._cached_y): self._nlp.set_duals(y) self._cached_y = y.copy()
def _set_primals_if_necessary(self, x): if not np.array_equal(x, self._cached_x): self._nlp.set_primals(x) self._cached_x = x.copy()