2024-08-28 16:37:03 +08:00
|
|
|
#include "irrt/exception.hpp"
|
|
|
|
#include "irrt/list.hpp"
|
|
|
|
#include "irrt/math.hpp"
|
|
|
|
#include "irrt/ndarray.hpp"
|
2024-08-24 15:37:45 +08:00
|
|
|
#include "irrt/range.hpp"
|
2024-08-28 16:37:03 +08:00
|
|
|
#include "irrt/slice.hpp"
|
2024-11-25 15:46:56 +08:00
|
|
|
#include "irrt/ndarray/basic.hpp"
|
|
|
|
#include "irrt/ndarray/def.hpp"
|
2024-12-10 16:32:44 +08:00
|
|
|
#include "irrt/ndarray/iter.hpp"
|
|
|
|
#include "irrt/ndarray/indexing.hpp"
|
[core] codegen/ndarray: Reimplement np_array()
Based on 8f0084ac: core/ndstrides: implement np_array()
It also checks for inconsistent dimensions if the input is a list.
e.g., rejecting `[[1.0, 2.0], [3.0]]`.
However, currently only `np_array(<input>, copy=False)` and `np_array
(<input>, copy=True)` are supported. In NumPy, copy could be false,
true, or None. Right now, NAC3's `np_array(<input>, copy=False)` behaves
like NumPy's `np.array(<input>, copy=None)`.
2024-08-20 14:51:40 +08:00
|
|
|
#include "irrt/ndarray/array.hpp"
|