mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-29 19:49:58 +02:00
[python/ulab] Updated ulab
This commit is contained in:
@@ -39,7 +39,7 @@ typedef struct _mp_obj_float_t {
|
||||
mp_float_t value;
|
||||
} mp_obj_float_t;
|
||||
|
||||
#if defined(MICROPY_VERSION_MAJOR) && MICROPY_VERSION_MAJOR == 1 && MICROPY_VERSION_MINOR == 12
|
||||
#if defined(MICROPY_VERSION_MAJOR) && MICROPY_VERSION_MAJOR == 1 && MICROPY_VERSION_MINOR == 11
|
||||
typedef struct _mp_obj_slice_t {
|
||||
mp_obj_base_t base;
|
||||
mp_obj_t start;
|
||||
@@ -49,6 +49,13 @@ typedef struct _mp_obj_slice_t {
|
||||
#define MP_ERROR_TEXT(x) x
|
||||
#endif
|
||||
|
||||
#if !defined(MP_TYPE_FLAG_EXTENDED)
|
||||
#define MP_TYPE_CALL call
|
||||
#define mp_type_get_call_slot(t) t->call
|
||||
#define MP_TYPE_FLAG_EXTENDED (0)
|
||||
#define MP_TYPE_EXTENDED_FIELDS(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#if !CIRCUITPY
|
||||
#define translate(x) MP_ERROR_TEXT(x)
|
||||
#define ndarray_set_value(a, b, c, d) mp_binary_set_val_array(a, b, c, d)
|
||||
@@ -96,15 +103,14 @@ typedef struct _dtype_obj_t {
|
||||
|
||||
void ndarray_dtype_print(const mp_print_t *, mp_obj_t , mp_print_kind_t );
|
||||
|
||||
#ifdef CIRCUITPY
|
||||
mp_obj_t ndarray_dtype_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args);
|
||||
#else
|
||||
mp_obj_t ndarray_dtype_make_new(const mp_obj_type_t *, size_t , size_t , const mp_obj_t *);
|
||||
#endif /* CIRCUITPY */
|
||||
#endif /* ULAB_HAS_DTYPE_OBJECT */
|
||||
|
||||
extern const mp_obj_type_t ndarray_flatiter_type;
|
||||
|
||||
mp_obj_t ndarray_new_ndarray_iterator(mp_obj_t , mp_obj_iter_buf_t *);
|
||||
|
||||
mp_obj_t ndarray_get_item(ndarray_obj_t *, void *);
|
||||
mp_float_t ndarray_get_float_value(void *, uint8_t );
|
||||
mp_float_t ndarray_get_float_index(void *, uint8_t , size_t );
|
||||
bool ndarray_object_is_array_like(mp_obj_t );
|
||||
@@ -135,11 +141,7 @@ ndarray_obj_t *ndarray_copy_view(ndarray_obj_t *);
|
||||
void ndarray_copy_array(ndarray_obj_t *, ndarray_obj_t *);
|
||||
|
||||
MP_DECLARE_CONST_FUN_OBJ_KW(ndarray_array_constructor_obj);
|
||||
#ifdef CIRCUITPY
|
||||
mp_obj_t ndarray_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args);
|
||||
#else
|
||||
mp_obj_t ndarray_make_new(const mp_obj_type_t *, size_t , size_t , const mp_obj_t *);
|
||||
#endif
|
||||
mp_obj_t ndarray_subscr(mp_obj_t , mp_obj_t , mp_obj_t );
|
||||
mp_obj_t ndarray_getiter(mp_obj_t , mp_obj_iter_buf_t *);
|
||||
bool ndarray_can_broadcast(ndarray_obj_t *, ndarray_obj_t *, uint8_t *, size_t *, int32_t *, int32_t *);
|
||||
|
||||
Reference in New Issue
Block a user