66b8a5e01d
[core] codegen/ndarray: Reimplement matmul
...
Based on 73c2203b
: core/ndstrides: implement general matmul
2025-01-03 15:43:06 +08:00
43e440d2fd
[core] codegen/ndarray: Reimplement broadcasting
...
Based on 9359ed96
: core/ndstrides: implement broadcasting &
np_broadcast_to()
2025-01-03 15:14:59 +08:00
8d975b5ff3
[core] codegen/ndarray: Implement np_reshape
...
Based on 926e7e93
: core/ndstrides: implement np_reshape()
2025-01-03 14:56:16 +08:00
aae41eef6a
[core] toplevel: Add view functions category
...
Based on 9e0f636d
: core: categorize np_{transpose,reshape} as 'view
functions'
2025-01-03 14:47:59 +08:00
132ba1942f
[core] toplevel: Implement np_size
...
Based on 2c1030d1
: core/ndstrides: implement np_size()
2025-01-03 14:16:29 +08:00
12358c57b1
[core] codegen/ndarray: Implement np_{shape,strides}
...
Based on 40c24486
: core/ndstrides: implement np_shape() and np_strides()
These functions are not important, but they are handy for debugging.
`np.strides()` is not an actual NumPy function, but `ndarray.strides` is
used.
2025-01-03 13:58:47 +08:00
35e3042435
[core] Refactor/Remove redundant and unused constructs
...
- Use ProxyValue.name where necessary
- Remove NDArrayValue::ptr_to_{shape,strides}
- Remove functions made obsolete by ndstrides
- Remove use statement for ndarray::views as it only contain an impl
block.
- Remove class_names field in Resolvers of test sources
2024-12-30 14:13:48 +08:00
babc081dbd
core/toplevel: update tests
2024-11-27 14:31:57 +08:00
432c81a500
core: update insta after #489
2024-08-13 15:30:34 +08:00
00236f48bc
core: add np.transpose and np.reshape functions
2024-07-31 13:23:07 +08:00
c85e412206
core: Implement list::__mul__
2024-07-04 15:53:50 +08:00
2194dbddd5
core/type_annotation: Refactor List type to TObj
...
In preparation for operators on lists.
2024-07-04 15:32:18 +08:00
5b11a1dbdd
core: support tuple and int32 input for np_empty, np_ones, and more
2024-06-27 14:30:17 +08:00
f026b48e2a
core: refactor to use TypeVarId
and TypeVar
2024-06-13 16:59:10 +08:00
4730b595f3
core/builtins: Add np_array function
2024-06-11 16:42:08 +08:00
520e1adc56
core/builtins: Add np_minimum/np_maximum
2024-05-09 15:01:20 +08:00
73e81259f3
core/builtins: Add np_min/np_max
2024-05-09 15:01:20 +08:00
30c6cffbad
core/builtins: Refactored numpy builtins to accept scalar and ndarrays
2024-05-06 15:38:29 +08:00
64a3751fc2
core: Remove custom function type definitions for ndarray operators
2024-05-06 13:21:54 +08:00
a920fe0501
core: Implement elementwise comparison operators
2024-04-03 00:07:33 +08:00
727a1886b3
core: Implement elementwise unary operators
2024-04-03 00:07:33 +08:00
6af13a8261
core: Implement elementwise binary operators
...
Including immediate variants of these operators.
2024-04-03 00:07:33 +08:00
13f06f3e29
core: Refactor VarMap to IndexMap
...
This is the only Map I can find that preserves insertion order while
also deduplicating elements by key.
2024-03-22 15:51:23 +08:00
c3b122acfc
core: Implement ndarray.copy
2024-03-07 14:59:13 +08:00
2317516cf6
core: Use tvars from ndarray for class definition
2024-03-04 23:58:02 +08:00
234a6bde2a
core: Use TObj for NDArray
2024-03-01 15:41:55 +08:00
4f9a0110c4
meta: Update insta snapshots
2024-01-17 09:49:50 +08:00
10538b5296
core: Update insta snapshots
2023-11-09 13:00:27 +08:00
f5a6d29106
update insta snapshots
2022-04-12 09:56:49 +08:00
c3156afebd
nac3core: fix broken tests
2022-03-30 04:05:47 +08:00
80631fc92b
Option type support ( #224 )
...
Co-authored-by: ychenfo <yc@m-labs.hk>
Co-committed-by: ychenfo <yc@m-labs.hk>
2022-03-26 15:09:15 +08:00
24a26b53ae
nac3core/toplevel: fixed broken tests
...
We should not include class type variables in functions type variables.
2022-03-24 21:33:09 +08:00
d9cb506f6a
nac3core: refactored for better error messages
2022-02-21 18:24:19 +08:00
1288624218
lock insta version ( #179 )
2022-01-31 15:18:49 +08:00
de065cfa14
update dependencies
2022-01-31 12:28:40 +08:00
4d2fd9582a
nac3core: fix broken tests
2021-12-09 01:37:05 +08:00
d336200bf4
nac3core: fix broken tests due to the fix of rigid typevar handling
2021-11-21 06:11:55 +08:00
8dbb4ad58a
nac3core/toplevel: make test less fragile
...
test results should not depend on internal states if possible
2021-11-05 20:28:21 +08:00
47f563908a
basic string support ( #30 )
2021-11-02 23:22:49 +08:00
fb92b6d364
nac3core: supports range iterator
2021-10-23 23:53:36 +08:00
f5ce1afe0b
fix tests and switch to insta
...
Use a library called 'insta' to better organize those longer correct test outputs in toplevel tests. 'insta' creates `.snap` files as snapshots of the test output, and will automatically do the diff if the output is different. This makes maintaining test cases with larger outputs a lot easier.
Reviewed-on: M-Labs/nac3#42
Co-authored-by: ychenfo <yc@m-labs.hk>
Co-committed-by: ychenfo <yc@m-labs.hk>
2021-10-03 16:39:12 +08:00