Commit graph

211 commits

Author SHA1 Message Date
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
53bc8d6b0e
replace m_new with m_new0, wherever reasonable (#521)
replace m_new with m_new0, wherever reasonable, and remove dangling memory fragments created by m_new0
2022-04-22 22:10:01 +02:00
Zoltán Vörös
d2939dbf22 fix binary ops on empty arrays 2022-02-18 19:34:30 +01:00
Zoltán Vörös
607fd303bb remove printf 2022-02-12 18:40:44 +01:00
Zoltán Vörös
0ef2341386 fix complex slicing 2022-02-10 19:57:19 +01:00
Zoltán Vörös
e8c89935ab fix array dtype conversion, linalg float constants 2022-01-30 19:55:59 +01:00
Zoltán Vörös
4739e06473 fix ndarray_copy_view for Boolean dtypes 2022-01-18 16:42:03 +01: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
97b368412c fix complex printout for long arrays 2022-01-10 23:23:09 +01:00
Zoltán Vörös
969afdec7f implement ==, and != for complex dtypes 2022-01-07 14:05:38 +01:00
Zoltán Vörös
ad9e1e9950 fix linspace error, extend to complex dtype, factor out tests 2022-01-06 19:55:34 +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
dbd570a9fb implement complex scalar binary operations 2021-12-28 22:18:37 +01:00
Zoltán Vörös
235329c3fb fix itemsize glitch 2021-12-03 09:11:41 +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
78455afa5d simplify binary_get_size function 2021-12-03 09:06:49 +01:00
Zoltán Vörös
93409e759a implement iterator for complex arrays 2021-12-03 09:06:49 +01:00
Zoltán Vörös
3b3639a560 implement complex exponential 2021-12-03 09:06:49 +01:00
Zoltán Vörös
316f84174d rebasing with any/all fix 2021-12-03 09:04:04 +01:00
Zoltán Vörös
ef8989ecff implement unary operators for complex arrays 2021-12-03 08:59:23 +01:00
Zoltán Vörös
911fdb4587 ulab can now be compiled with complex support 2021-12-03 08:59:23 +01:00
Zoltán Vörös
175c7337bb fix ndarray_shape for arrays of zero length 2021-11-20 12:11:21 +01:00
Jeff Epler
d68171bb46
Merge pull request #439 from jepler/circuitpython-make-new-compat
ndarray: drop compat workaround for circuitpython
2021-10-16 16:02:16 -05: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
5ff8bd662f remove temporary workaround 2021-07-23 09:57:17 -05:00
Zoltán Vörös
3817d7698a fix compilation for 1D 2021-07-23 07:28:17 +02:00
Jeff Epler
cbe4c7499b docs: A workaround for the problem where ndarray can't be in two places
This allows the build to be green in ulab before the changes in
circuitpython. After circuitpython's _typing/__init__.py is fixed to
use the new canonical location, this temporary alias can be removed.
2021-07-22 08:15:23 -05:00
Jeff Epler
7032a92339 Fix documentation build
* Move most documentation out of the ulab base module.
 * float -> _float
 * ulab.ndarray -> ulab.numpy.ndarray

This still does not build unless it is taken together with a modification
to CircuitPython that _also_ moves references to ulab.numpy.
Because of this, this PR will continue to show red.  The suitability of
the changes can be gaged by looking at the related CircuitPython PR build
or by running locally the build-cp.sh script with the right ref checked
out in circuitpython/
2021-07-20 17:26:43 -05:00
Zoltán Vörös
6ed12969d3 implement flat iterator 2021-07-13 21:35:01 +02:00
Zoltán Vörös
7f38ad9315 implement ndarray.shape assigment 2021-06-19 15:58:56 +02:00
Zoltán Vörös
cd3d479b30 remove redudant cases from ndarray_set_value 2021-06-10 19:01:31 +02:00
Zoltán Vörös
f946abd2ee patch circuitpython 2021-06-09 07:34:18 +02:00
Zoltán Vörös
e01ddaca0b add ndarray_from_iterable to ndarray_from_mp_obj 2021-06-02 07:50:35 +02:00
Zoltán Vörös
53f644a44b factor out array creation from iterables 2021-06-02 07:37:15 +02:00
Zoltán Vörös
8979b8a67d fix endianness problem in ndarray_from_mp_obj 2021-06-01 18:17:19 +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
6420ec9c45 fix array initialisation with empty iterables 2021-05-18 22:02:42 +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
2407d5e289 fix trivial error in ndarray_from_mp_object 2021-03-31 07:24:52 +02:00
Zoltán Vörös
6668bb3060 add where implementation 2021-03-23 17:09:27 +01: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
54ff3f30dd fix ndarray_is_dense, eye, ones, full, and zeros for Boolean type 2021-02-21 18:02:40 +01:00
Zoltán Vörös
27bc5b2e79 implemented byteswap 2021-02-12 21:10:08 +01:00
Zoltán Vörös
8046888d99 simplified array contraction algorithm 2021-02-12 18:15:42 +01:00