Damien George
35b58d0037
Remove MICROPY_FLOAT_CONST from ULAB_DEFINE_FLOAT_CONST
...
A given use of ULAB_DEFINE_FLOAT_CONST may already have the correct form
of the float constant, so wrapping it in MICROPY_FLOAT_CONST may be the
wrong thing to do. So let the user of ULAB_DEFINE_FLOAT_CONST control how
the constant is formed.
Signed-off-by: Damien George <damien.p.george@gmail.com>
2022-07-11 15:27:49 +10:00
Damien George
1347694672
Fix build for MICROPY_OBJ_REPR_D configurations ( #531 )
...
* Fix use of object pointers so code builds with MICROPY_OBJ_REPR_D
Signed-off-by: Damien George <damien.p.george@gmail.com>
* Fix use of float constants so they work with MICROPY_OBJ_REPR_D
Signed-off-by: Damien George <damien.p.george@gmail.com>
* Use new float-const macros to simplify definitions of e,inf,nan,pi.
Signed-off-by: Damien George <damien.p.george@gmail.com>
* Add support for MICROPY_OBJ_REPR_C
Signed-off-by: Damien George <damien.p.george@gmail.com>
* Add unix-nanbox build to build.sh script
Building nanbox requires gcc-multilib because it forces 32-bit mode.
Signed-off-by: Damien George <damien.p.george@gmail.com>
* Bump version to 5.0.8
Signed-off-by: Damien George <damien.p.george@gmail.com>
2022-07-06 20:38:20 +02:00
Zoltán Vörös
d438344943
fix in-place assignment from slices ( #524 )
...
* fix in-place assignment from slices
2022-05-17 21:25:20 +02:00
Zoltán Vörös
74533d18ff
add asarray, and tests for asarray and size
2022-01-14 20:45:14 +01:00
Zoltán Vörös
2b578ae333
add tolist method to ndarray
2022-01-01 18:16:04 +01:00
Zoltán Vörös
c11dac322d
fix array initialisation from complex array
2022-01-01 09:20:00 +01:00
Zoltán Vörös
7e13fab911
support ones, zeros, and full for complex dtype
2021-12-31 23:39:58 +01:00
Zoltán Vörös
ce26a0d76b
implement slicing for complex dtype
2021-12-03 09:06:49 +01:00
Zoltán Vörös
911fdb4587
ulab can now be compiled with complex support
2021-12-03 08:59:23 +01:00
b913d064e5
ndarray: drop compat workaround for circuitpython
...
It's anticipated that circuitpython will no longer need this compat code
after merging 1.17.
2021-10-14 14:26:38 -05:00
Zoltán Vörös
6ed12969d3
implement flat iterator
2021-07-13 21:35:01 +02:00
Jeff Epler
e881ccb30c
Merge pull request #418 from jepler/split-type-objects
...
support circuitpython-style split type objects
2021-07-12 19:53:38 -05:00
9b8cd47640
Rename mp_type_call -> mp_type_get_call_slot
2021-07-12 08:47:15 -05:00
1214afd9ce
Rename EXTENDED_FIELDS -> MP_TYPE_EXTENDED_FIELDS
2021-07-12 08:47:15 -05:00
Jeff Epler
75c7e05eac
rename the type flag to EXTENDED for consistency
2021-07-09 14:56:20 -05:00
Jeff Epler
deda9d74d8
support circuitpython-style split type objects
2021-07-06 11:20:26 -05:00
Zoltán Vörös
7f38ad9315
implement ndarray.shape assigment
2021-06-19 15:58:56 +02:00
Zoltán Vörös
f946abd2ee
patch circuitpython
2021-06-09 07:34:18 +02:00
Zoltán Vörös
4edb6aa318
fix upcasting rules for ndarray + scalar
2021-06-01 17:32:18 +02:00
Zoltán Vörös
f1a2aadc6e
fix garbage collection problem
2021-05-13 21:54:50 +02:00
Scott Shawcroft
e3bf07cabb
Lowercase MP macros
2021-04-22 17:54:02 -07:00
4666bbd4de
Fix diagnostics in CircuitPython
2021-04-03 12:07:12 -05:00
Stephan Hartl
da9eb89e9a
Changed define OPENMV to micropython version check
...
The issue with is solved only coresponed to micropython v1.11
2021-04-01 09:49:42 +02:00
Stephan Hartl
04f6fd68f9
Readd some OPENMV code
...
I used the OPENMV define to get ulab 1.6.1 under ArduPy (Mircopython v1.11) running.
To update to 2.1.5 i have readded the missing code
2021-03-31 16:18:30 +02:00
Zoltán Vörös
6fb6f2383f
re-introduce ndarray_get_buffer, and buffer protocol
2021-02-21 21:06:02 +01:00
Zoltán Vörös
27bc5b2e79
implemented byteswap
2021-02-12 21:10:08 +01:00
Zoltán Vörös
06bb8348a0
updated docs, removed circuitpython stuff, and fixed diff code
2021-01-14 19:40:18 +01:00
CallumJHays
9dfc972180
Rename array to ndarray, replaced with constructor fn
2021-01-09 11:43:55 +10:00
Zoltán Vörös
aa649b28bb
factored out fft_fft_ifft_spectrogram
2020-11-27 07:42:20 +01:00
Zoltán Vörös
ea2ccdb914
removed OPENMV flags
2020-11-26 17:27:58 +01:00
Zoltán Vörös
42f20bcc67
added the frombuffer function
2020-11-26 17:26:15 +01:00
Zoltán Vörös
b35c1568f3
removed numpy_defs.h, scipy_defs.h
2020-11-25 21:03:35 +01:00
Zoltán Vörös
a30b1c2dc1
removed unused ndarray->dense member
2020-11-24 07:18:17 +01:00
Zoltán Vörös
2ec3a422ce
dtype is exposed in circuitpython, too
2020-11-11 07:23:59 +01:00
Zoltán Vörös
984ddf51b4
added dtype implementation
2020-11-02 18:06:29 +01:00
Taku Fukada
1d18ab0381
Update type hints for the new/modified functions
2020-10-23 06:00:38 +09:00
Zoltán Vörös
89801ab12c
restored circuitpython compatibility
2020-10-17 13:47:26 +02:00
Zoltán Vörös
511bb5f6c9
added in-place operators for 1, 3, and 4 dimensions
2020-10-16 22:14:13 +02:00
Zoltán Vörös
7af7042572
fixed in-place operators
2020-10-14 20:27:37 +02:00
Zoltán Vörös
d1c7af3cb5
implemented assignment into Boolean-indexed arrays
2020-10-13 18:15:45 +02:00
Zoltán Vörös
2e08b2566d
added in-place operators
2020-10-07 21:01:11 +02:00
Zoltán Vörös
ff8d260809
fixed the subscript method
2020-10-06 20:06:51 +02:00
Zoltán Vörös
8dec1328ab
added copy method to ndarray
2020-10-06 07:12:19 +02:00
Zoltán Vörös
b2465a7c16
simplified ndarray code a bit
2020-10-01 19:39:35 +02:00
Zoltán Vörös
501663e3fe
added function iterator to ndarray
2020-09-29 18:48:02 +02:00
Zoltán Vörös
9f917b23c2
added power to binary operators
2020-09-28 19:22:39 +02:00
Zoltán Vörös
2c8faf7680
split binary operators into separate functions
2020-09-26 19:15:43 +02:00
Zoltán Vörös
b7b54cba70
cosmetic changes
2020-09-25 21:12:01 +02:00
Zoltán Vörös
b7f11232ee
added logscale
2020-09-24 19:11:11 +02:00
Zoltán Vörös
86bed99394
added tobytes method
2020-09-23 20:07:42 +02:00