* Fix missing comma in type definition Signed-off-by: Damien George <damien@micropython.org> * Make sure all files have a new-line at the end Some very old compilers don't like files without a new-line at the end. Signed-off-by: Damien George <damien@micropython.org> * Use math.isclose for universal_functions expm1 test Signed-off-by: Damien George <damien@micropython.org> Signed-off-by: Damien George <damien@micropython.org>
36 lines
808 B
C
36 lines
808 B
C
|
|
/*
|
|
* This file is part of the micropython-ulab project,
|
|
*
|
|
* https://github.com/v923z/micropython-ulab
|
|
*
|
|
* The MIT License (MIT)
|
|
*
|
|
* Copyright (c) 2020 Jeff Epler for Adafruit Industries
|
|
* 2020-2021 Zoltán Vörös
|
|
*/
|
|
|
|
#ifndef _NDARRAY_ITER_
|
|
#define _NDARRAY_ITER_
|
|
|
|
#include "py/runtime.h"
|
|
#include "py/binary.h"
|
|
#include "py/obj.h"
|
|
#include "py/objarray.h"
|
|
|
|
#include "../../ulab.h"
|
|
#include "../../ndarray.h"
|
|
|
|
// TODO: take simply mp_obj_ndarray_it_t from ndarray.c
|
|
typedef struct _mp_obj_ndarray_flatiter_t {
|
|
mp_obj_base_t base;
|
|
mp_fun_1_t iternext;
|
|
mp_obj_t ndarray;
|
|
size_t cur;
|
|
} ndarray_flatiter_t;
|
|
|
|
mp_obj_t ndarray_get_flatiterator(mp_obj_t , mp_obj_iter_buf_t *);
|
|
mp_obj_t ndarray_flatiter_make_new(mp_obj_t );
|
|
mp_obj_t ndarray_flatiter_next(mp_obj_t );
|
|
|
|
#endif
|