Skip to content

Commit

Permalink
Matrix library, example #13
Browse files Browse the repository at this point in the history
  • Loading branch information
tisnik committed Dec 23, 2019
1 parent e5512c7 commit 8b5cb89
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lesson7/gonum/mat13.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package main

import (
"fmt"
"gonum.org/v1/gonum/mat"
)

func main() {
v := mat.NewVecDense(10, []float64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10})
t := v.T()
fmt.Printf("Value:\n%v\n", mat.Formatted(t))
dim1, dim2 := t.Dims()
fmt.Printf("Dimensions: %dx%d\n", dim1, dim2)
}

0 comments on commit 8b5cb89

Please sign in to comment.