MCPcopy Create free account
hub / github.com/grantjenks/python-sortedcontainers / frame

Function frame

tests/plot_lengths_histogram_add.py:51–64  ·  view source on GitHub ↗

Draw frame.

(num)

Source from the content-addressed store, hash-verified

49
50
51def frame(num):
52 "Draw frame."
53 values.update(func() for func in it.repeat(random.random, LOAD))
54 data = np.array([len(sublist) for sublist in values._lists])
55 hist, bins = np.histogram(data, bins=BINS, normed=True)
56 hist_line.set_data(bins[:-1], hist)
57 norm = scipy.stats.norm
58 params = norm.fit(data)
59 norm_line.set_data(LENGTHS, norm.pdf(LENGTHS, *params))
60
61 if DISPLAY_FIT:
62 print('Normal', '%10.3f %10.3f' % params)
63
64 return hist_line, norm_line
65
66
67if __name__ == '__main__':

Callers

nothing calls this directly

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected