I'm trying to use catboost to predict for one array of floats.
In the documentation for CalcModelPredictionSingle
it takes as param "floatFeatures - array of float features"
:
https://github.com/catboost/catboost/blob/master/catboost/libs/model_interface/c_api.h#L175
However when I try to pass an array of floats, I get this error:
Cannot use type []*_Ctype_float as *_Ctype_float in assignment.
Indicating it's expecting a single float. Am I using the wrong function?
I am using cgo and this is part of my code:
```
floats := []float32{}
//gets populated
floatsC := make([]*C.float, len(floats))
for i, v := range floats {
floatsC[i] = (*C.float)(&v)
}
if !C.CalcModelPredictionSingle(
model.Handle,
([]*C.float)(floatsC),
...
) {
return
}