Skip to content

Commit

Permalink
Matrix library, example RedHatOfficial#21
Browse files Browse the repository at this point in the history
  • Loading branch information
tisnik committed Dec 24, 2019
1 parent e5a50a3 commit 7c18200
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lesson7/gonum/mat21.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package main

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

func main() {
v := mat.NewSymDense(3, nil)
fmt.Printf("Value:\n%v\n\n", mat.Formatted(v))

cap1, cap2 := v.Caps()
fmt.Printf("Capacity: %dx%d\n", cap1, cap2)

dim1, dim2 := v.Dims()
fmt.Printf("Dimensions: %dx%d\n", dim1, dim2)
}

0 comments on commit 7c18200

Please sign in to comment.