def update(self, niter: int, x: np.ndarray, delta_x: np.ndarray) -> np.ndarray:
        """
        Update one iteration.

        :param niter: Number of current iteration.
        :param x: Current value.
        :param delta_x: Current first derivative at `x`.
        :return: Updated value.
        """
        # momentum
        self.m_dx = self.beta_1 * self.m_dx + (1 - self.beta_1) * delta_x

        # rms
        self.v_dx = self.beta_2 * self.v_dx + (1 - self.beta_2) * (delta_x**2)

        # bias
        m_dw_corr = self.m_dx / (1 - self.beta_1**niter)
        v_dw_corr = self.v_dx / (1 - self.beta_2**niter)

        # update
        x = x - self.alpha * (m_dw_corr / (np.sqrt(v_dw_corr) + self.epsilon))

        return x

        Update one iteration.

        :param niter: Number of current iteration.
        :param x: Current value.
        :param delta_x: Current first derivative at `x`.
        :return: Updated value.
        
art/optimizers.py