59cc5ed6c6
circuitpython compatibility
2020-04-06 07:38:12 -05:00
Zoltán Vörös
ae7cadee8a
Merge pull request #84 from v923z/equal
2020-04-06 09:14:42 +02:00
Zoltán Vörös
1001ed44f5
fixed small glitch in == and !=
2020-04-06 09:08:44 +02:00
Zoltán Vörös
c69f2d9256
implemented the ==, and != binary operators
2020-04-04 22:14:36 +02:00
Zoltán Vörös
8b072b7c0d
Merge pull request #83 from v923z/trace
...
This PR adds the trace function to linalg, and fixes a couple of glitches in the documentation.
2020-04-03 22:31:40 +02:00
Zoltán Vörös
acfd1d0760
added documentation to the trace function, and cleaned up other bits
2020-04-03 13:01:04 +02:00
Zoltán Vörös
ceaede8cb8
added trace to linalg, trimmed other code
2020-04-03 12:07:11 +02:00
Zoltán Vörös
034cdaf7e3
Merge pull request #82 from v923z/sort
...
another attempt at fixing issue #79
2020-04-02 21:27:57 +02:00
Zoltán Vörös
32e0bf5bde
Merge branch 'master' into sort
2020-04-02 21:26:06 +02:00
Zoltán Vörös
89d73974e3
another attempt at fixing issue #79
2020-04-02 21:22:45 +02:00
Zoltán Vörös
89579b6e36
Merge pull request #75 from v923z/power
...
adds an implementation of the `**` binary operator, and the reversed binary operators
2020-04-02 19:10:06 +02:00
Zoltán Vörös
b4f83997e7
Merge branch 'master' into power
2020-04-02 19:08:00 +02:00
Jeff Epler
0d5dc6b0d4
Merge pull request #78 from v923z/argmax
...
contraction returns scalar, if dimension is 0
2020-04-02 08:56:08 -05:00
Zoltán Vörös
411a5ffbd2
Merge pull request #81 from v923z/unistd
...
added unistd.h to ndarray.c to fix issue #73
2020-04-02 11:06:56 +02:00
Zoltán Vörös
2e27a356f5
added unistd.h to ndarray.c to fix issue #73
2020-04-02 11:04:23 +02:00
Zoltán Vörös
26d740ef77
Merge pull request #80 from v923z/copy
...
added fast initialisation option to ndarray_make_new_core, and updated docs
2020-04-02 09:55:33 +02:00
Zoltán Vörös
a3d77a3fa1
updated docs for ndarray_make_new_core
2020-04-02 09:52:04 +02:00
Zoltán Vörös
1648325d69
added fast ndarray initialisation option
2020-04-02 09:41:13 +02:00
Zoltán Vörös
272685dc50
Merge pull request #79 from v923z/sort
...
fixed indexing error in sort function
2020-04-01 23:46:38 +02:00
Zoltán Vörös
04422f3da5
fixed indexing error in sort function
2020-04-01 23:43:31 +02:00
Zoltán Vörös
c2c525247c
contraction returns scalar, if dimension is 0
2020-04-01 22:56:07 +02:00
Zoltán Vörös
2517d8be25
incremented version number, modified change log
2020-03-31 23:14:54 +02:00
Zoltán Vörös
3153c86f09
fixed empty array error
2020-03-31 23:02:14 +02:00
Zoltán Vörös
ae0dfbc126
fixed binary error with empty arrays
2020-03-31 22:52:06 +02:00
Zoltán Vörös
a2d52b6454
implemented the ** operator, and the reversed binary operators
2020-03-31 21:38:47 +02:00
Zoltán Vörös
ac3f03c3ba
Merge pull request #70 from v923z/testfix
...
added slicing2.py.exp to the test suite
2020-03-30 23:34:13 +02:00
Zoltán Vörös
d55df3d4a0
added slicing2.py.exp to the test suite
2020-03-30 23:31:14 +02:00
Zoltán Vörös
3ec9f5a5bb
Merge pull request #69 from jepler/boolean-cpy
...
Add to #68 for CircuitPython compatibility
2020-03-30 22:36:54 +02:00
c66509f66e
add test of boolean slicing
2020-03-30 15:34:26 -05:00
53c158bde3
ndarray.c: circuitpython needs translate() for mp_raise
2020-03-30 15:34:01 -05:00
cbe41034a3
ndarray.h: provide mp_obj_is_bool for circuitpython
2020-03-30 15:33:45 -05:00
Zoltán Vörös
b3562ae78c
Boolean indexing raises TypeError, if index is not of Boolean type
2020-03-30 12:58:04 +02:00
Zoltán Vörös
ea4a7422ef
fixing Boolean indexing issue
2020-03-30 12:45:54 +02:00
Zoltán Vörös
97f23da0c1
removed warning about missing roundf.c
...
The file has been appended to the makefile upstream.
2020-03-25 08:57:00 +01:00
Zoltán Vörös
84558f9447
added a workaround for a linker error
2020-03-20 22:14:58 +01:00
Zoltán Vörös
a91b36986d
Merge pull request #65 from jepler/slice-length-crash
...
slice_length: avoid implementation-defined division by negative number
2020-03-17 08:15:48 +01:00
3dc52575f0
slice_length: avoid implementation-defined division by negative number
...
In CircuitPython (only), a the slice assignment to [-1👎 -3] of an
ndarray of length 1 caused a crash. This appears to be because in
CircuitPython, the internal pointer of an empty array was NULL rather than
pointing at some memory which happened to be valid and assignable.
This appears to be a corner case of how integer promotion rules work in C.
The expression `slice.stop - slice.start + (slice.step + correction)`
is type `unsigned long` and on a LP64 platform its value is
18446744073709551614. This led to the function returning that this slice
had length 1 instead, during the automated tests.
By casting to signed types capable of holding indices and sizes, the
problem is corrected on both platforms.
2020-03-16 22:09:39 -05:00
Zoltán Vörös
155e6eea60
Merge pull request #63 from v923z/round
...
added around and arctan2 to the vector sub-module, and extended ndarray initialisation options
2020-03-16 22:19:05 +01:00
Zoltán Vörös
94e5b304d2
added arctan2 to vectorise.c
2020-03-16 19:36:37 +01:00
Zoltán Vörös
49e2e68f9b
added around to vectorise.c, and implemented array initialiation from another ndarray
2020-03-12 17:28:23 +01:00
Zoltán Vörös
3e53136a93
ndarrays can now be initialised from ndarrays
2020-03-12 07:17:54 +01:00
Zoltán Vörös
7ec399c58b
Merge pull request #62 from v923z/cholesky-test
...
added tests for linalg, and poly
2020-03-11 21:38:35 +01:00
Zoltán Vörös
47fd7964e8
generated .exp test files
2020-03-11 21:31:36 +01:00
Zoltán Vörös
e3a74453a8
trying to fix test routines
2020-03-11 18:53:06 +01:00
Zoltán Vörös
18d13e4252
added tests for inv, and det
2020-03-11 17:15:30 +01:00
Zoltán Vörös
cb1b1d352b
added test files for the poly sub-module
2020-03-11 07:31:00 +01:00
Zoltán Vörös
c354657eda
added test files for the Cholesky decomposition
2020-03-11 07:04:26 +01:00
Zoltán Vörös
037cd6e733
re-named spectrum->spectrogram, updated manual
2020-03-10 21:11:44 +01:00
Jeff Epler
1095994a4a
Merge pull request #59 from v923z/cholesky
...
added Cholesky decomposition to linalg.c, updated documentation
2020-03-10 14:51:48 -05:00
Jeff Epler
ea2bf3c236
Merge pull request #57 from v923z/spectrum
...
moved spectrum to extras module
2020-03-10 14:51:37 -05:00