ndstrides: [2] {Any,Tuple,List}Object + Implement np_{zeros,ones,full,empty} and len() #512

Open
lyken wants to merge 9 commits from ndstrides-2-basic into ndstrides-1-model

9 Commits

Author SHA1 Message Date
lyken 54a842a93f core/ndstrides: implement len(ndarray) & refactor len() 2024-10-18 14:21:28 +08:00
lyken 792374fa9a core/ndstrides: implement np_{zeros,ones,full,empty} 2024-10-18 14:21:28 +08:00
lyken b41d091cac core/model: add util::gen_for_model 2024-10-18 14:21:27 +08:00
lyken 79eda92582 core/object: add ListObject and TupleObject
Needed for implementing other ndarray utils.
2024-10-18 14:21:27 +08:00
lyken 50f960abb5 core/ndstrides: implement ndarray iterator NDIter
A necessary utility to iterate through all elements in a possibly strided ndarray.
2024-10-18 14:21:27 +08:00
lyken a0a1f35b5d core/ndstrides: introduce NDArray
NDArray with strides.
2024-10-18 14:21:27 +08:00
lyken 45f590f238 core/irrt: fix exception.hpp C++ castings 2024-10-18 14:21:27 +08:00
lyken d51f45193f core/toplevel/helper: add {extract,create}_ndims 2024-10-18 14:21:26 +08:00
lyken 572ae116ec core/object: introduce object
A small abstraction to simplify implementations.
2024-10-18 14:21:26 +08:00