Commit Graph

34 Commits

Author SHA1 Message Date
9e0f636d2a core: categorize np_{transpose,reshape} as 'view functions' 2024-10-18 14:55:18 +08:00
2c1030d158 core/ndstrides: implement np_size() 2024-10-18 14:54:40 +08:00
40c2448651 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.
2024-10-18 14:54:04 +08:00
63d2b49b09 core: remove np_linalg_matmul 2024-08-05 11:44:55 +08:00
1c72698d02 core: add np_linalg_det and np_linalg_matrix_power functions 2024-07-31 18:02:54 +08:00
4a6845dac6 standalone: add np.transpose and np.reshape functions 2024-07-31 13:23:07 +08:00
d6a4d0a634 standalone: add linalg methods and tests 2024-07-29 16:48:06 +08:00
44487b76ae standalone: interpret_demo.py remove duplicated section 2024-07-22 17:23:35 +08:00
1332f113e8 standalone: fix interpret_demo.py comments 2024-07-22 17:06:14 +08:00
c80378063a add np_argmin/argmax to interpret_demo environment 2024-07-12 13:27:52 +02:00
d656880e44 standalone: Fix missing implementation for output_range 2024-07-09 13:53:50 +08:00
9238a5e86e standalone: Rename output_str to output_strln and add output_str
output_str is for outputting strings without newline, and the newly
introduced output_strln now has the old behavior of ending with a
newline.
2024-07-09 04:44:40 +08:00
53d44b9595 standalone: Add np_array tests 2024-06-11 16:44:36 +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
140f8f8a08 core: Implement most ndarray-creation functions 2023-12-22 16:29:55 +08:00
27fcf8926e core: Implement ndarray constructor and numpy.empty 2023-12-22 16:29:54 +08:00
d47534e2ad interpret_demo: add typing.Literal 2023-12-18 08:50:49 +08:00
031e660f18 core: Initial implementation for const generics 2023-12-08 18:02:11 +08:00
5c5620692f core: Add np_{round,floor,ceil}
These functions are NumPy variants of round/floor/ceil, which returns
floats instead of ints.
2023-11-23 13:45:07 +08:00
0af1e37e99 core: Prefix all NumPy/SciPy functions with np_/sp_spec 2023-11-23 13:35:23 +08:00
4dbe07a0c0 core: Revert breaking changes to round-family functions
These functions should return ints as the math.* functions do instead of
following the convention of numpy.* functions.
2023-11-04 13:35:53 +08:00
2b635a0b97 core: Implement numpy and scipy functions 2023-11-01 18:03:29 +08:00
60ad100fbb core: Implement and expose {isinf,isnan} 2023-11-01 18:03:29 +08:00
c7de22287e core: Fix restoration of stack address
All allocas for temporary objects are now placed in the beginning of the
function. Allocas for on-temporary objects are not modified because
these variables may appear in a loop and thus must be uniquely
represented.
2023-10-06 11:34:23 +08:00
a79286113e standalone: Add output_bool in demo library 2023-10-06 10:19:22 +08:00
be3e8f50a2 standalone: Refactor demo library to C
Needed for use by lli.
2023-09-30 09:31:18 +08:00
b39831b388 standalone: Update demos
- Add `output_str` for printing a string
- Add demo_test.py to test interop
2023-09-28 19:58:53 +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
3f890f183c nac3standalone/demo: handle imports consistently 2022-03-19 09:14:27 +08:00
e9a17cf8f8 nac3standalone: add test for min function 2022-03-08 21:59:42 +08:00
f8e3f7a4ca add some basic list tests 2022-01-23 14:28:08 +08:00
64b94955fe nac3standalone: reorganize demos, compare against cpython 2022-01-23 10:35:06 +08:00