code: def computeEntropy(spikeTrains):
    
    MIN_ACTIVATION_PROB = 0.000001
    activationProb = np.mean(spikeTrains, 1)
    activationProb[activationProb < MIN_ACTIVATION_PROB] = MIN_ACTIVATION_PROB
    activationProb = activationProb / np.sum(activationProb)
    entropy = -np.dot(activationProb, np.log2(activationProb))
    return entropy
docs: Estimates entropy in spike trains.
    
    @param spikeTrains (array) matrix of spike trains
    @return entropy (float) entropy