INNER CODE UNIT · Python
data
mszell/geospatialdatascience · unit11_mobilityindividual/stats_utils.py:69
data = np.random.pareto(a, 1000) + m
xy = pdf(10.0, data)
"""
# Detect input type:
if input == sys.stdin:
# the data come form standard input
d = [ list_check(map(float,l.split())) for l in sys.stdin ]
# d = [ float(l) for l in sys.stdin if l.strip() ]
elif isinstance(input, str):
# the data come from a file
d = [ list_check(map(float,l.split())) for l in open(input,'r') ]
# d = [ float(w) for w in open(input,'r') if w.split()]
else:
# the data are in a list
try:
iterator = iter(input)
d = list(input)
except TypeError: