Skip to content

Commit ff2a962

Browse files
committed
heatmap: --low bugfix
1 parent 8863001 commit ff2a962

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

heatmap/heatmap.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ def slice_columns(columns, low_freq, high_freq):
238238
start_col, stop_col = slice_columns(columns, args.low_freq, args.high_freq)
239239
f_key = (columns[start_col], columns[stop_col], step)
240240
zs = line[6+start_col:6+stop_col+1]
241+
if not zs:
242+
continue
241243
if f_key not in f_cache:
242244
freq2 = list(frange(*f_key))[:len(zs)]
243245
freqs.update(freq2)
@@ -320,7 +322,10 @@ def collate_row(x_size):
320322
start_col, stop_col = slice_columns(columns, args.low_freq, args.high_freq)
321323
if args.high_freq and columns[start_col] > args.high_freq:
322324
continue
323-
x_start = freqs.index(columns[start_col])
325+
try:
326+
x_start = freqs.index(columns[start_col])
327+
except ValueError:
328+
continue
324329
zs = floatify(line[6+start_col:6+stop_col+1])
325330
if t != old_t:
326331
yield old_t, row

0 commit comments

Comments
 (0)