INNER CODE UNIT · Python
bin
mszell/geospatialdatascience · unit11_mobilityindividual/stats_utils.py:89
bin = 1.0*binsize
d.sort()
lend = len(d)
hist = []
if out != 'no' and out != 'stdout': f = open(out,'wb')
j = 0
if not isinstance(start_from, str):
i = int(start_from / bin)+ 1.0 * segno(start_from)
else:
i = int(d[j] / bin) + 1.0 *segno(d[j])
while True:
cont = 0
average = 0.0
if i>=0: ii = i-1
else: ii = i
# To include the lower end in the previous bin, substitute "<" with "<="