p_entropy.py
def s_entropy(freq_list):
    ''' This function computes the shannon entropy of a given frequency distribution.
    USAGE: shannon_entropy(freq_list)
    ARGS: freq_list = Numeric vector representing the frequency distribution
    OUTPUT: A numeric value representing shannon's entropy'''
    freq_list = [element for element in freq_list if element != 0]
    sh_entropy = 0.0
    for freq in freq_list:
        sh_entropy += freq * np.log(freq)
    sh_entropy = -sh_entropy
    return(sh_entropy)
 This function computes the shannon entropy of a given frequency distribution.
    USAGE: shannon_entropy(freq_list)
    ARGS: freq_list = Numeric vector representing the frequency distribution
    OUTPUT: A numeric value representing shannon's entropy
This function computes the shannon entropy of a given frequency distribution.
USAGE: shannon_entropy(freq_list)
ARGS: freq_list = Numeric vector representing the frequency distribution
OUTPUT: A numeric value representing shannon's entropy
This function computes the shannon entropy of a given frequency distribution . USAGE : shannon_entropy ( freq_list ) ARGS : freq_list = Numeric vector representing the frequency distribution OUTPUT : A numeric value representing shannon ' s entropy
def s_entropy(freq_list):
    freq_list = [element for element in freq_list if element != 0]
    sh_entropy = 0.0
    for freq in freq_list:
        sh_entropy += freq * np.log(freq)
    sh_entropy = -sh_entropy
    return(sh_entropy)
def s_entropy ( freq_list ) : freq_list = [ element for element in freq_list if element != 0 ] sh_entropy = 0.0 for freq in freq_list : sh_entropy += freq * np . log ( freq ) sh_entropy = - sh_entropy return ( sh_entropy )
This function computes the shannon entropy of a given frequency distribution.
This function computes the shannon entropy of a given frequency distribution .
''' This function computes the shannon entropy of a given frequency distribution.
    USAGE: shannon_entropy(freq_list)
    ARGS: freq_list = Numeric vector representing the frequency distribution
    OUTPUT: A numeric value representing shannon's entropy'''
freq_list