code: def infer(self, sensations, stats=None, objname=None):
      
      self.setLearning(False)
  
      prevLoc = [None] * self.numColumns
      numFeatures = len(sensations[0])
      for sensation in xrange(numFeatures):
        for col in xrange(self.numColumns):
          assert numFeatures == len(sensations[col])
  
          location, feature = sensations[col][sensation]
          # Compute displacement from previous location
          location = np.array(location)
          displacement = [0] * self.dimensions
          if prevLoc[col] is not None:
            displacement = location - prevLoc[col]
          prevLoc[col] = location
  
          self.motorInput[col].addDataToQueue(displacement)
          self.sensorInput[col].addDataToQueue(feature, False, 0)
  
        self.network.run(1)
        if stats is not None:
          self._updateInferenceStats(stats=stats, objectName=objname)
docs: Attempt to recognize the object given a list of sensations.
      You may use :meth:`getCurrentClassification` to extract the current object
      classification from the network
  
      :param sensations: Array of sensations, where each sensation is composed of
                         displacement vector and feature SDR for each column.
                         For example: [[[1,1,1],[101,205,523, ..., 1021]],...]
                         Note: Each column must have the same number of sensations
                         as the other columns.
  
      :type sensations: list[tuple[list[int], list[int]]]
      :param stats: Dictionary holding statistics information.
                    See '_updateInferenceStats' for information on the statistics
                    collected
      :type stats: defaultdict[str, list]
      :param objname: Name of the inferred object, if known
      :type objname: str or None