gitee.com/quant1x/num@v0.3.2/fillna_test.go (about)

     1  package num
     2  
     3  import (
     4  	"fmt"
     5  	"testing"
     6  )
     7  
     8  func TestFill(t *testing.T) {
     9  	s2 := []float64{1, 2, 3, 4, 3, 3, 2, 1, Float64NaN(), Float64NaN(), Float64NaN(), Float64NaN()}
    10  	fmt.Println(s2)
    11  	Fill(s2, 1.0)
    12  	fmt.Println(s2)
    13  	Fill(s2, 1.0, true)
    14  	fmt.Println(s2)
    15  }