gitee.com/quant1x/num@v0.3.2/ones.go (about) 1 package num 2 3 // Ones v -> shape 4 func Ones[T Number](v []T) []T { 5 return Repeat[T](T(1), len(v)) 6 }