Skip to content

Commit dd33068

Browse files
authored
Fix idx out of range
Mod operator precedes add
1 parent ddc8f9c commit dd33068

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mprof

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ def plot_file(filename, index=0, timestamps=True, children=True, options=None):
413413
cmem = np.asarray([item[0] for item in data])
414414

415415
# Plot the line to the figure
416-
pl.plot(cts, cmem, "+-" + mem_line_colors[idx+1 % len(mem_line_colors)],
416+
pl.plot(cts, cmem, "+-" + mem_line_colors[(idx+1) % len(mem_line_colors)],
417417
label="child {}".format(proc))
418418

419419
# Detect the maximal child memory point

0 commit comments

Comments
 (0)