code: def compute(self, inputVector, learn, activeArray):
          
          x = inputVector
          y = self.encode(x)
          active_units = np.where(y==1.)[0]
          
          if learn:
              self.update_statistics([y]) 
              self.update_weights([x],[y])
  
          activeArray[active_units] = 1.
          return active_units
docs: This method resembles the primary public method of the SpatialPooler class. 
          It takes a input vector and outputs the indices of the active columns. If 'learn' 
          is set to True, this method also performs weight updates and updates to the activity 
          statistics according to the respective methods implemented below.