MCPcopy Index your code
hub / github.com/glamp/bashplotlib / read_numbers

Function read_numbers

bashplotlib/histogram.py:37–47  ·  view source on GitHub ↗

Read the input data in the most optimal way

(numbers)

Source from the content-addressed store, hash-verified

35
36
37def read_numbers(numbers):
38 """
39 Read the input data in the most optimal way
40 """
41 if isiterable(numbers):
42 for number in numbers:
43 yield float(str(number).strip())
44 else:
45 with open(numbers) as fh:
46 for number in fh:
47 yield float(number.strip())
48
49
50def run_demo():

Callers 1

plot_histFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected