gotch/ts/print_test.go
Goncalves Henriques, Andre (UG - Computer Science) 9257404edd Move the name of the module
2024-04-21 15:15:00 +01:00

22 lines
457 B
Go

package ts_test
import (
"fmt"
"testing"
"git.andr3h3nriqu3s.com/andr3/gotch"
"git.andr3h3nriqu3s.com/andr3/gotch/ts"
)
func TestTensor_Format(t *testing.T) {
shape := []int64{8, 8, 8}
numels := int64(8 * 8 * 8)
x := ts.MustArange(ts.IntScalar(numels), gotch.Float, gotch.CPU).MustView(shape, true)
fmt.Printf("%0.1f", x) // print truncated data
fmt.Printf("%i", x) // print truncated data
// fmt.Printf("%#0.1f", x) // print full data
}