fix uppercase mp_obj_is_type macro calls

This commit is contained in:
Zoltán Vörös 2021-11-23 20:03:11 +01:00
parent 8db5ee897e
commit 08313e3f02
3 changed files with 5 additions and 5 deletions

View file

@ -24,7 +24,7 @@
#if ULAB_SUPPORTS_COMPLEX
STATIC mp_obj_t carray_real(mp_obj_t _source) {
if(MP_OBJ_IS_TYPE(_source, &ulab_ndarray_type)) {
if(mp_obj_is_type(_source, &ulab_ndarray_type)) {
ndarray_obj_t *source = MP_OBJ_TO_PTR(_source);
if(source->dtype != NDARRAY_COMPLEX) {
ndarray_obj_t *target = ndarray_new_dense_ndarray(source->ndim, source->shape, source->dtype);
@ -44,7 +44,7 @@ STATIC mp_obj_t carray_real(mp_obj_t _source) {
MP_DEFINE_CONST_FUN_OBJ_1(carray_real_obj, carray_real);
STATIC mp_obj_t carray_imag(mp_obj_t _source) {
if(MP_OBJ_IS_TYPE(_source, &ulab_ndarray_type)) {
if(mp_obj_is_type(_source, &ulab_ndarray_type)) {
ndarray_obj_t *source = MP_OBJ_TO_PTR(_source);
if(source->dtype != NDARRAY_COMPLEX) { // if not complex, then the imaginary part is zero
ndarray_obj_t *target = ndarray_new_dense_ndarray(source->ndim, source->shape, source->dtype);

View file

@ -151,11 +151,11 @@ mp_obj_t poly_polyval(mp_obj_t o_p, mp_obj_t o_x) {
}
#if ULAB_SUPPORTS_COMPLEX
ndarray_obj_t *input;
if(MP_OBJ_IS_TYPE(o_p, &ulab_ndarray_type)) {
if(mp_obj_is_type(o_p, &ulab_ndarray_type)) {
input = MP_OBJ_TO_PTR(o_p);
COMPLEX_DTYPE_NOT_IMPLEMENTED(input->dtype)
}
if(MP_OBJ_IS_TYPE(o_x, &ulab_ndarray_type)) {
if(mp_obj_is_type(o_x, &ulab_ndarray_type)) {
input = MP_OBJ_TO_PTR(o_x);
COMPLEX_DTYPE_NOT_IMPLEMENTED(input->dtype)
}

View file

@ -70,7 +70,7 @@ mp_obj_t signal_sosfilt(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_ar
mp_raise_TypeError(translate("sosfilt requires iterable arguments"));
}
#if ULAB_SUPPORTS_COMPLEX
if(MP_OBJ_IS_TYPE(args[1].u_obj, &ulab_ndarray_type)) {
if(mp_obj_is_type(args[1].u_obj, &ulab_ndarray_type)) {
ndarray_obj_t *ndarray = MP_OBJ_TO_PTR(args[1].u_obj);
COMPLEX_DTYPE_NOT_IMPLEMENTED(ndarray->dtype)
}