code: def adapt(self, d, x):
          
          self.update_memory_x(x)
          m_d, m_x = self.read_memory()
          # estimate
          y = np.dot(self.w, x-m_x) + m_d
          e = d - y
          nu = self.mu / (self.eps + np.dot(x-m_x, x-m_x))
          dw = nu * e * (x-m_x)
          self.w += dw
          self.update_memory_d(d)
docs: Adapt weights according one desired value and its input.
  
          Args:
  
          * `d` : desired value (float)
  
          * `x` : input array (1-dimensional array)