code: def adapt(self, d, x):
          
          # create input matrix and target vector
          self.x_mem[:,1:] = self.x_mem[:,:-1]
          self.x_mem[:,0] = x
          self.d_mem[1:] = self.d_mem[:-1]
          self.d_mem[0] = d
          # estimate output and error
          self.y_mem = np.dot(self.x_mem.T, self.w)
          self.e_mem = self.d_mem - self.y_mem
          # update
          dw_part1 = np.dot(self.x_mem.T, self.x_mem) + self.ide_eps
          dw_part2 = np.linalg.solve(dw_part1, self.ide)
          dw = np.dot(self.x_mem, np.dot(dw_part2, self.e_mem))
          self.w += self.mu * dw
docs: Adapt weights according one desired value and its input.
  
          **Args:**
  
          * `d` : desired value (float)
  
          * `x` : input array (1-dimensional array)