Skip to content

Commit 0851f93

Browse files
committed
ENH: left align output for stats and counts
1 parent 4852983 commit 0851f93

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/nib-ls

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,14 @@ def proc_file(f, opts):
227227
d = d[np.nonzero(d)]
228228
if opts.stats:
229229
# just # of elements
230-
row += ["[%d]" % np.prod(d.shape)]
230+
row += ["@l[%d]" % np.prod(d.shape)]
231231
# stats
232-
row += [len(d) and '[%.2g, %.2g]' % (np.min(d), np.max(d)) or '-']
232+
row += [len(d) and '@l[%.2g, %.2g]' % (np.min(d), np.max(d)) or '-']
233233
if opts.counts:
234234
counter = Counter()
235235
counter.update(d.flatten())
236236
# go through each entry and report only non-0 ones
237-
row += [" ".join("%g:%d" % (i, counter[i]) for i in sorted(counter))]
237+
row += ["@l" + " ".join("%g:%d" % (i, counter[i]) for i in sorted(counter))]
238238
except Exception as e:
239239
verbose(2, "Failed to obtain stats/counts -- %s" % str(e))
240240
row += ['error']

0 commit comments

Comments
 (0)