INNER CODE UNIT · Python
m
mszell/geospatialdatascience · unit11_mobilityindividual/stats_utils.py:38
m = 1.0 * sum(list)/ll
return ( sum([(elem-m)**2.0 for elem in list]) / ll )**0.5
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 #