Commit Graph

15 Commits

Author SHA1 Message Date
lyken 0fd29f8121
core/ndstrides: implement np_transpose() (no axes argument) 2024-08-21 12:56:20 +08:00
lyken 6f7cebf826
core/ndstrides: implement np_reshape() 2024-08-21 12:56:20 +08:00
lyken 04e67fd5e7
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]]`. Previously it was a todo of
`np_array()`.
2024-08-21 12:56:20 +08:00
lyken 924ce828ea
core/irrt: add List
Needed for implementing np_array()
2024-08-21 12:56:20 +08:00
lyken 01ee4164e9
core/ndstrides: implement general ndarray indexing
`...`, `none` are now also supported.
2024-08-21 12:56:20 +08:00
lyken c7563bbc72
core/irrt: rename NDIndex to NDIndexInt
The name `NDIndex` is used in later commits.
2024-08-21 12:56:20 +08:00
lyken 4acda9d405
core/irrt: add Slice and ResolvedSlice
Needed for implementing general ndarray indexing
2024-08-21 12:56:19 +08:00
lyken e20e661b66
core/ndstrides: add ndarray iterator (NDIter) 2024-08-21 11:40:35 +08:00
lyken f4987ba326
core/ndstrides: add basic ndarray utilities 2024-08-21 11:40:35 +08:00
lyken f5a546cd91
core/ndstrides: define ndarray with strides 2024-08-21 11:40:35 +08:00
lyken a26216f8cb
core/irrt/exceptions: add debug utils with exceptions 2024-08-21 11:39:20 +08:00
lyken 68e3d59aea
core/irrt/exceptions: allow irrt to raise exceptions 2024-08-21 11:39:20 +08:00
lyken f95dc35056
core/irrt: split irrt.cpp into headers 2024-08-21 11:39:20 +08:00
lyken b17a8bc6e1
core/irrt: reformat 2024-08-21 11:39:20 +08:00
lyken e979d84ca5
core/irrt: comment build.rs & move irrt to its own dir
To prepare for future IRRT implementations, and to also make cargo
only have to watch a single directory.
2024-08-21 11:39:20 +08:00