We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 687bb70 commit 6a567c1Copy full SHA for 6a567c1
1 file changed
src/emlearn_linreg/linreg.c
@@ -142,7 +142,7 @@ static mp_obj_t elasticnet_model_predict(mp_obj_fun_bc_t *self_obj,
142
// Make prediction
143
float prediction = predict_sample(self, features);
144
145
- return mp_obj_new_float(prediction);
+ return (mp_obj_t)mp_obj_new_float(prediction);
146
}
147
148
// Get model weights
@@ -185,7 +185,7 @@ static mp_obj_t elasticnet_model_get_bias(mp_obj_t self_obj) {
185
mp_obj_elasticnet_model_t *o = MP_OBJ_TO_PTR(self_obj);
186
elastic_net_model_t *self = &o->model;
187
188
- return mp_obj_new_float(self->bias);
+ return (mp_obj_t)mp_obj_new_float(self->bias);
189
190
// Define a Python reference to the function above
191
static MP_DEFINE_CONST_FUN_OBJ_1(elasticnet_model_get_bias_obj, elasticnet_model_get_bias);
0 commit comments