code: def unionIntoArray(self, inputVector, outputVector, forceOutput=False):
      
      if isinstance(inputVector, numpy.ndarray):
        if inputVector.size == self._numInputs:
          activeBits = numpy.where(inputVector)[0]
        else:
          raise ValueError(
            "Input vector dimensions don't match. Expecting %s but got %s" % (
              self._numInputs, inputVector.size))
      elif isinstance(inputVector, list):
        if len(inputVector) > 0:
          if max(inputVector) >= self._numInputs:
            raise ValueError(
              "Non-zero entry indices exceed input dimension of union pooler. "
              "Expecting %s but got %s" % (self._numInputs, max(inputVector)))
        activeBits = inputVector
      else:
        raise TypeError("Unsuported input types")
  
      if len(outputVector) != self._numInputs:
        raise ValueError(
          "Output vector dimension does match dimension of union pooler "
          "Expecting %s but got %s" % (self._numInputs, len(outputVector)))
  
      unionSDR = self.updateHistory(activeBits, forceOutput)
  
      numpy.copyto(outputVector, unionSDR, casting="unsafe")
docs: Create a union of the inputVector and copy the result into the outputVector
      Parameters:
      ----------------------------
      @param inputVector: The inputVector can be either a full numpy array
                          containing 0's and 1's, or a list of non-zero entry
                          indices
  
      @param outputVector: A numpy array that matches the length of the
                           union pooler.
  
      @param forceOutput: if True, a union will be created without regard to
                          minHistory