@@ -56,7 +56,7 @@ static mp_obj_t tensor_get_value(mp_obj_t self_in, mp_obj_t index_obj) {
5656 }
5757 // Otherwise, raise an error
5858 else {
59- mp_raise_TypeError ("Unsupported Tensor Type" );
59+ mp_raise_TypeError (MP_ERROR_TEXT ( "Unsupported Tensor Type" ) );
6060 }
6161
6262 // Return none
@@ -91,7 +91,7 @@ static mp_obj_t tensor_set_value (mp_obj_t self_in, mp_obj_t index_obj, mp_obj_t
9191 }
9292 // Otherwise, raise an error
9393 else {
94- mp_raise_TypeError ("Unsupported Tensor Type" );
94+ mp_raise_TypeError (MP_ERROR_TEXT ( "Unsupported Tensor Type" ) );
9595 }
9696
9797 // Return our tensor object
@@ -120,7 +120,7 @@ static mp_obj_t tensor_quantize_float_to_int8(mp_obj_t self_in, mp_obj_t float_o
120120 // Check that the object received is a float
121121 if (!mp_obj_is_float (float_obj )) {
122122 // Raise an error
123- mp_raise_TypeError ("Expecting Parameter of float type" );
123+ mp_raise_TypeError (MP_ERROR_TEXT ( "Expecting Parameter of float type" ) );
124124 }
125125
126126 // Get our tensor object
@@ -148,7 +148,7 @@ static mp_obj_t tensor_quantize_int8_to_float (mp_obj_t self_in, mp_obj_t int_ob
148148
149149 // Check that the object received is an int
150150 if (!mp_obj_is_integer (int_obj )) {
151- mp_raise_TypeError ("Expecting Parameter of float type" );
151+ mp_raise_TypeError (MP_ERROR_TEXT ( "Expecting Parameter of float type" ) );
152152 }
153153
154154 // Get our tensor object
@@ -157,7 +157,7 @@ static mp_obj_t tensor_quantize_int8_to_float (mp_obj_t self_in, mp_obj_t int_ob
157157
158158 // Check that the tensor is of type int8
159159 if (tensor -> type != kTfLiteInt8 ) {
160- mp_raise_TypeError ("Expected Tensor to be of type ktfLiteInt8." );
160+ mp_raise_TypeError (MP_ERROR_TEXT ( "Expected Tensor to be of type ktfLiteInt8." ) );
161161 }
162162
163163 // Get the int8 value from the object
0 commit comments