mirror of
https://github.com/gonum/gonum.git
synced 2025-10-14 03:13:46 +08:00
Removed spaces in examples
This commit is contained in:
@@ -19,9 +19,9 @@ func ExampleAdd_simple() {
|
|||||||
|
|
||||||
Add(s1, s2, s3)
|
Add(s1, s2, s3)
|
||||||
|
|
||||||
fmt.Println("s1 = ", s1)
|
fmt.Println("s1 =", s1)
|
||||||
fmt.Println("s2 = ", s2)
|
fmt.Println("s2 =", s2)
|
||||||
fmt.Println("s3 = ", s3)
|
fmt.Println("s3 =", s3)
|
||||||
// Output:
|
// Output:
|
||||||
// s1 = [7 9 11 13]
|
// s1 = [7 9 11 13]
|
||||||
// s2 = [5 6 7 8]
|
// s2 = [5 6 7 8]
|
||||||
@@ -38,10 +38,10 @@ func ExampleAdd_newslice() {
|
|||||||
|
|
||||||
Add(dst, s1, s2, s3)
|
Add(dst, s1, s2, s3)
|
||||||
|
|
||||||
fmt.Println("dst = ", dst)
|
fmt.Println("dst =", dst)
|
||||||
fmt.Println("s1 = ", s1)
|
fmt.Println("s1 =", s1)
|
||||||
fmt.Println("s2 = ", s2)
|
fmt.Println("s2 =", s2)
|
||||||
fmt.Println("s3 = ", s3)
|
fmt.Println("s3 =", s3)
|
||||||
// Output:
|
// Output:
|
||||||
// dst = [7 9 11 13]
|
// dst = [7 9 11 13]
|
||||||
// s1 = [1 2 3 4]
|
// s1 = [1 2 3 4]
|
||||||
@@ -81,7 +81,7 @@ func ExampleAdd_sliceofslicesum() {
|
|||||||
result := make([]float64, len(s[0]))
|
result := make([]float64, len(s[0]))
|
||||||
Add(result, s...)
|
Add(result, s...)
|
||||||
|
|
||||||
fmt.Println("result = ", result)
|
fmt.Println("result =", result)
|
||||||
// Output:
|
// Output:
|
||||||
// result = [0 5 10]
|
// result = [0 5 10]
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,7 @@ func ExampleAddConst() {
|
|||||||
|
|
||||||
AddConst(c, s)
|
AddConst(c, s)
|
||||||
|
|
||||||
fmt.Println("s = ", s)
|
fmt.Println("s =", s)
|
||||||
// Output:
|
// Output:
|
||||||
// s = [6 3 8 1]
|
// s = [6 3 8 1]
|
||||||
}
|
}
|
||||||
@@ -103,8 +103,8 @@ func ExampleCumProd() {
|
|||||||
|
|
||||||
CumProd(dst, s)
|
CumProd(dst, s)
|
||||||
|
|
||||||
fmt.Println("dst = ", dst)
|
fmt.Println("dst =", dst)
|
||||||
fmt.Println("s = ", s)
|
fmt.Println("s =", s)
|
||||||
// Output:
|
// Output:
|
||||||
// dst = [1 -2 -6 24]
|
// dst = [1 -2 -6 24]
|
||||||
// s = [1 -2 3 -4]
|
// s = [1 -2 3 -4]
|
||||||
@@ -116,8 +116,8 @@ func ExampleCumSum() {
|
|||||||
|
|
||||||
CumSum(dst, s)
|
CumSum(dst, s)
|
||||||
|
|
||||||
fmt.Println("dst = ", dst)
|
fmt.Println("dst =", dst)
|
||||||
fmt.Println("s = ", s)
|
fmt.Println("s =", s)
|
||||||
// Output:
|
// Output:
|
||||||
// dst = [1 -1 2 -2]
|
// dst = [1 -1 2 -2]
|
||||||
// s = [1 -2 3 -4]
|
// s = [1 -2 3 -4]
|
||||||
|
Reference in New Issue
Block a user