Based on 052b67c8: core/ndstrides: implement np_transpose() (no axes
argument)
The IRRT implementation knows how to handle axes. But the argument is
not in NAC3 yet.
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)`.
Based on 8f9d2d82: core/ndstrides: implement ndarray indexing
The functionality for `...` and `np.newaxis` is there in IRRT, but there
is no implementation of them for @kernel Python expressions because of
#486.
Unfortunately the name `NDIndex` is used in later commits. Renaming this
typedef to `NDIndexInt` to avoid amending. `NDIndexInt` will be removed
anyway when ndarray strides is completed.
Based on 01c96396: core/irrt: add Slice and Range and part of
8f9d2d82: core/ndstrides: implement ndarray indexing.
Needed for implementing general ndarray indexing.
Currently IRRT slice and range have nothing to do with NAC3's slice
and range. The IRRT slice and range are currently there to implement
ndarray specific features. However, in the future their definitions may
be used to replace that of NAC3's. (NAC3's range is a [i32 x 3], IRRT's
range is a proper struct. NAC3 does not have a slice struct).
Based on 50f960ab: core/ndstrides: implement ndarray iterator NDIter
A necessary utility to iterate through all elements in a possibly
strided ndarray.
- Change CSlice to use `void*` for better pointer compatibility
- Only include impl *.hpp files in irrt.cpp
- Refactor typedef to using declaration
- Add missing ``// namespace`