INNER CODE UNIT · Python

list_check

mszell/geospatialdatascience · unit11_mobilityindividual/stats_utils.py:42

def list_check(lista):
    """
    If a list has only one element, return that element. Otherwise return the whole list.
    """
    try:
        e2 = lista[1]
        return lista
    except IndexError:
        return lista[0]


        #______________________________________#
        #                                      #
        #      Probability distributions       #
        #______________________________________#
        #                                      #

def pdf(binsize, input, out='no', normalize=True, include_zeros=False, vmin='NA', vmax='NA',start_from='NA', closing_bin=False):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…