code: def compute(self, inputs, outputs):
      
      # Handle reset first (should be sent with an empty signal)
      if "resetIn" in inputs:
        assert len(inputs["resetIn"]) == 1
        if inputs["resetIn"][0] != 0:
          # send empty output
          self.reset()
          outputs["feedForwardOutput"][:] = 0
          outputs["activeCells"][:] = 0
          return
  
      feedforwardInput = numpy.asarray(inputs["feedforwardInput"].nonzero()[0],
                                       dtype="uint32")
  
      if "feedforwardGrowthCandidates" in inputs:
        feedforwardGrowthCandidates = numpy.asarray(
          inputs["feedforwardGrowthCandidates"].nonzero()[0], dtype="uint32")
      else:
        feedforwardGrowthCandidates = feedforwardInput
  
      if "lateralInput" in inputs:
        lateralInputs = tuple(numpy.asarray(singleInput.nonzero()[0],
                                            dtype="uint32")
                              for singleInput
                              in numpy.split(inputs["lateralInput"],
                                             self.numOtherCorticalColumns))
      else:
        lateralInputs = ()
  
      if "predictedInput" in inputs:
        predictedInput = numpy.asarray(
          inputs["predictedInput"].nonzero()[0], dtype="uint32")
      else:
        predictedInput = None
  
      # Send the inputs into the Column Pooler.
      self._pooler.compute(feedforwardInput, lateralInputs,
                           feedforwardGrowthCandidates, learn=self.learningMode,
                           predictedInput = predictedInput)
  
      # Extract the active / predicted cells and put them into binary arrays.
      outputs["activeCells"][:] = 0
      outputs["activeCells"][self._pooler.getActiveCells()] = 1
  
      # Send appropriate output to feedForwardOutput.
      if self.defaultOutputType == "active":
        outputs["feedForwardOutput"][:] = outputs["activeCells"]
      else:
        raise Exception("Unknown outputType: " + self.defaultOutputType)
docs: Run one iteration of compute.
  
      Note that if the reset signal is True (1) we assume this iteration
      represents the *end* of a sequence. The output will contain the
      representation to this point and any history will then be reset. The output
      at the next compute will start fresh, presumably with bursting columns.