code: def encode(self, x):
          
          n = self._outputSize
          y = np.zeros(n)
          Q = self._Q
          W = self._W
          t = self._t
          lam = self._lambda
  
  
          try:
              
              y_star = np.random.sample(n)
              y_star = fixed_point(lambda p: expit(lam * ( np.dot(Q,x) + np.dot(W,p) - t)), 
                                   y_star, maxiter=2000, method='del2')
  
          except RuntimeError:
              pass
  
  
          winner = np.where(y_star > 0.5)[0]
          y[ winner ] = 1.
  
          return y
docs: Given an input array `x` it returns its associated encoding `y(x)`.
          Please cf. the paper for more details.
  
          Note that NO learning takes place.