code: def update(self, d):
          
          # update output layer
          e = d - self.y
          error = np.copy(e)
          if self.outputs == 1:
              dw = self.mu * e * self.x   
              w = np.copy(self.w)[1:]
          else:
              dw = self.mu * np.outer(e, self.x)
              w = np.copy(self.w)[:,1:]
          self.w += dw
          # update hidden layers
          for l in reversed(self.layers):
              w, e = l.update(w, e) 
          return error
docs: This function make update according provided target
          and the last used input vector.
  
          **Args:**
  
          * `d` : target (float or 1-dimensional array).
              Size depends on number of MLP outputs.
  
          **Returns:**
          
          * `e` : error used for update (float or 1-diemnsional array).
              Size correspond to size of input `d`.