projects
/
lightning.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53f5c3e
)
Sort numpy output by label.
author
Tom Clegg <tom@tomclegg.ca>
Wed, 9 Sep 2020 20:55:13 +0000
(16:55 -0400)
committer
Tom Clegg <tom@tomclegg.ca>
Wed, 9 Sep 2020 20:55:13 +0000
(16:55 -0400)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>
exportnumpy.go
patch
|
blob
|
history
diff --git
a/exportnumpy.go
b/exportnumpy.go
index cad58b0ccbbc8fe9183421523fb14e4a3547610c..300093cbd968dd28c039afbc265e4b3a610b1037 100644
(file)
--- a/
exportnumpy.go
+++ b/
exportnumpy.go
@@
-10,6
+10,7
@@
import (
"net/http"
_ "net/http/pprof"
"os"
+ "sort"
"git.arvados.org/arvados.git/sdk/go/arvados"
"github.com/kshedden/gonpy"
@@
-92,6
+93,7
@@
func (cmd *exportNumpy) RunCommand(prog string, args []string, stdin io.Reader,
if err != nil {
return 1
}
+ sort.Slice(cgs, func(i, j int) bool { return cgs[i].Name < cgs[j].Name })
cols := 0
for _, cg := range cgs {
if cols < len(cg.Variants) {