Commit Graph

20 Commits

Author SHA1 Message Date
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