Skip to content

Commit 6a567c1

Browse files
committed
linreg: Attempt to appease compiler on ARM
Not sure this is the right way...
1 parent 687bb70 commit 6a567c1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/emlearn_linreg/linreg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static mp_obj_t elasticnet_model_predict(mp_obj_fun_bc_t *self_obj,
142142
// Make prediction
143143
float prediction = predict_sample(self, features);
144144

145-
return mp_obj_new_float(prediction);
145+
return (mp_obj_t)mp_obj_new_float(prediction);
146146
}
147147

148148
// Get model weights
@@ -185,7 +185,7 @@ static mp_obj_t elasticnet_model_get_bias(mp_obj_t self_obj) {
185185
mp_obj_elasticnet_model_t *o = MP_OBJ_TO_PTR(self_obj);
186186
elastic_net_model_t *self = &o->model;
187187

188-
return mp_obj_new_float(self->bias);
188+
return (mp_obj_t)mp_obj_new_float(self->bias);
189189
}
190190
// Define a Python reference to the function above
191191
static MP_DEFINE_CONST_FUN_OBJ_1(elasticnet_model_get_bias_obj, elasticnet_model_get_bias);

0 commit comments

Comments
 (0)