projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Small bugfixes; also, add a new machine to the remote executor pool.
[python_utils.git]
/
histogram.py
diff --git
a/histogram.py
b/histogram.py
index 0368376434c3579014cf97974e3e6e381f494872..3391b0b3c51d33164b6d173d59a7b4a1b3c9788b 100644
(file)
--- a/
histogram.py
+++ b/
histogram.py
@@
-69,13
+69,15
@@
class SimpleHistogram(Generic[T]):
def __repr__(self,
label_formatter='%10s') -> str:
from text_utils import bar_graph
def __repr__(self,
label_formatter='%10s') -> str:
from text_utils import bar_graph
+
max_population: Optional[int] = None
for bucket in self.buckets:
pop = self.buckets[bucket]
if pop > 0:
max_population: Optional[int] = None
for bucket in self.buckets:
pop = self.buckets[bucket]
if pop > 0:
- last_bucket_start = bucket[0]
+ last_bucket_start = bucket[0]
# beginning of range
if max_population is None or pop > max_population:
if max_population is None or pop > max_population:
- max_population = pop
+ max_population = pop # bucket with max items
+
txt = ""
if max_population is None:
return txt
txt = ""
if max_population is None:
return txt