There was an error while loading. Please reload this page.
2 parents 02baad0 + c2cdc8a commit 0386d56Copy full SHA for 0386d56
bashplotlib/histogram.py
@@ -35,7 +35,7 @@ def read_numbers(numbers):
35
"""
36
Read the input data in the most optimal way
37
38
- if isinstance(numbers, list):
+ if isiterable(numbers):
39
for number in numbers:
40
yield float(str(number).strip())
41
else:
bashplotlib/utils/helpers.py
@@ -7,6 +7,8 @@
7
8
import sys
9
10
+isiterable = lambda x: hasattr(x, '__iter__') or hasattr(x, '__getitem__')
11
+
12
bcolours = {
13
"white": '\033[97m',
14
"aqua": '\033[96m',
0 commit comments