working genetics prototype
This commit is contained in:
9
internal/util/slice.go
Normal file
9
internal/util/slice.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package util
|
||||
|
||||
func Slice2Float32[T int | float64](s []T) (sf []float32) {
|
||||
sf = make([]float32, len(s))
|
||||
for i := range s {
|
||||
sf[i] = float32(s[i])
|
||||
}
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user