From eacb0c9af47f85f5d4864b721c3b28661364e8e3 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 30 Oct 2023 09:54:14 +0100 Subject: [PATCH] fix some more translate()s --- code/ndarray_operators.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/ndarray_operators.c b/code/ndarray_operators.c index c9c65a22..b7d61f26 100644 --- a/code/ndarray_operators.c +++ b/code/ndarray_operators.c @@ -863,11 +863,11 @@ mp_obj_t ndarray_binary_logical(ndarray_obj_t *lhs, ndarray_obj_t *rhs, #if ULAB_SUPPORTS_COMPLEX if((lhs->dtype == NDARRAY_COMPLEX) || (rhs->dtype == NDARRAY_COMPLEX) || (lhs->dtype == NDARRAY_FLOAT) || (rhs->dtype == NDARRAY_FLOAT)) { - mp_raise_TypeError(translate("operation not supported for the input types")); + mp_raise_TypeError(MP_ERROR_TEXT("operation not supported for the input types")); } #else if((lhs->dtype == NDARRAY_FLOAT) || (rhs->dtype == NDARRAY_FLOAT)) { - mp_raise_TypeError(translate("operation not supported for the input types")); + mp_raise_TypeError(MP_ERROR_TEXT("operation not supported for the input types")); } #endif @@ -875,7 +875,7 @@ mp_obj_t ndarray_binary_logical(ndarray_obj_t *lhs, ndarray_obj_t *rhs, // numpy promotes the result to int32 if(((lhs->dtype == NDARRAY_INT16) && (rhs->dtype == NDARRAY_UINT16)) || ((lhs->dtype == NDARRAY_UINT16) && (rhs->dtype == NDARRAY_INT16))) { - mp_raise_TypeError(translate("dtype of int32 is not supported")); + mp_raise_TypeError(MP_ERROR_TEXT("dtype of int32 is not supported")); } ndarray_obj_t *results = NULL;