code: def calculateEntropy(activeColumns, type='binary'):
    
    activationProb   = np.mean(activeColumns, 0)
    if type == 'binary':
      totalEntropy     = np.sum(binaryEntropyVectorized(activationProb))
    elif type == 'renyi':
      totalEntropy = np.sum(renyiEntropyVectorized(activationProb))
    else:
      raise ValueError('unknown entropy type')
  
    numberOfColumns  = activeColumns.shape[1]
    # return mean entropy
    return totalEntropy/numberOfColumns
docs: calculate the mean entropy given activation history
    @param activeColumns (array) 2D numpy array of activation history
    @return entropy (float) mean entropy