Zoltán Vörös
434211d401
updated README.md
...
added a short comment on the `numerical` sub-module
2020-04-18 11:45:41 +02:00
Zoltán Vörös
778c7e9bd8
Merge pull request #99 from v923z/compile
...
fixed compilation error in issue #98
2020-04-18 09:08:27 +02:00
Zoltán Vörös
d1f2d80581
fixed compilation error in issue #98
2020-04-18 09:05:47 +02:00
Zoltán Vörös
a746bd8e09
Merge pull request #96 from v923z/dot
...
fix indexing error in linalg.dot
2020-04-14 09:08:11 +02:00
Zoltán Vörös
2b7d96f25d
fix indexing error in linalg.dot
2020-04-14 09:05:22 +02:00
Jeff Epler
22813d6736
Merge pull request #91 from v923z/argmax
...
fixed argmin/argmax function for iterables
2020-04-13 15:33:48 -05:00
470ea6578a
add expected-output of tests
2020-04-13 15:29:45 -05:00
5fefea4871
add test
2020-04-13 15:28:49 -05:00
Zoltán Vörös
e83ef7a31d
fixed another indexing error in argmin/argmax
2020-04-13 21:56:55 +02:00
Zoltán Vörös
1a4ac564d4
fixed indexing error in argmin/argmax
2020-04-13 21:27:41 +02:00
Zoltán Vörös
78ae57005c
argmin/argmax raises ValueError with empty iterables
2020-04-12 19:32:08 +02:00
Zoltán Vörös
12d2c9127e
Merge pull request #92 from v923z/transpose
...
fix transpose function to conform to numpy
2020-04-09 21:27:43 +02:00
Zoltán Vörös
84150d4166
fix transpose function to conform to numpy
2020-04-09 12:38:19 +02:00
Zoltán Vörös
7b8d894413
extended readme
2020-04-09 10:18:52 +02:00
Zoltán Vörös
7ec8a25a84
fixed argmin/argmax function for iterables
2020-04-07 23:06:41 +02:00
Zoltán Vörös
a09c5f4c25
Merge pull request #90 from v923z/argsort
...
fix error in argsort
2020-04-07 22:35:59 +02:00
Zoltán Vörös
ab9a26dc98
fix error in argsort
2020-04-07 22:34:00 +02:00
Zoltán Vörös
55fb2e073b
Merge pull request #88 from jepler/fix-compiler-diagnostics
...
Fix compiler diagnostics normally enabled in CircuitPython; fix arg parsing bugs
2020-04-06 23:54:54 +02:00
86e7155ab7
generate_slice: Properly fix -Wsign-compare diagnostic
...
Instead of making the local unsigned--it must be permitted to
contain negative values--make the function parameter signed.
2020-04-06 16:38:51 -05:00
Zoltán Vörös
280f04660e
Merge pull request #86 from jepler/mp-flags-compat
...
Restore circuitpython compatibility after #84
2020-04-06 21:07:00 +02:00
f1f10c27a8
Fix -Wsign-compare diagnostics
...
.. by adding casts or changing the type of a local variable.
2020-04-06 08:38:43 -05:00
d41fb86fd0
add test of linspace
2020-04-06 08:36:25 -05:00
daf4b07ef7
Fix -Wunused-parameter diagnostics
...
Here we actually get bugs fixed! At many sites, mp_parse_arg_all's
first argument was the number of positional arguments required, rather
than the number actually supplied.
This fixes e.g., the bug where the linspace third positional argument
was not used as the "num" argmuent, and where too many positional args
were not treated as an error:
>>> ulab.linspace(0, 1, 9)
array([0.0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1.0], dtype=float)
>>> ulab.linspace(0, 1, 1, 1)
TypeError: extra positional arguments given
In the case of argmin/argmax of an iterable, it is now signaled to the user
that only the axis=None case is supported, instead of giving a wrong
result.
2020-04-06 08:33:18 -05:00
22605c6fe9
Fix -Wshadow diagnostics
...
A declaration of a local variable can "shadow" a parameter or another
local variable declared in an outer scope.
Since this can create confusion about which variable is referred to, it
is better to fix these diagnostics.
A variety of changes were made:
- Add curly braces to reduce the scope of a variable (ndarray_unary_op)
so that its scope has ended before the next scope where it is used
- be consistent about whether a variable is declared with for-loop scope
or not (ndarray_print_row)
- remove a declaration so that the outer variable is used, after verifying
this will function properly (insert_slice_list)
- rename a variable introduced by a macro (RUN_SUM, RUN_STD) so it does
not shadow another variable
2020-04-06 08:12:47 -05:00
8aebfd9f4e
remove unused function get_nditerable_len
2020-04-06 08:06:33 -05:00
be1e2b28e0
Fix -Wmissing-prototypes diagnostics
...
These functions need prototypes in a header, as they are defined in one
source file and used in another.
2020-04-06 08:05:43 -05:00
11ed69dacf
Fix -Wmissing-prototypes diagnostics
...
This diagnostic flag, enabled by default in CircuitPython, requires that
nonstatic functions have a previous prototype. Since placing prototypes
in header files is the only way that mismatched arguments between function
definition and use sites can be detected, this is a valuable warning.
In the case of ulab, the majority of the changes required were to mark
functions as "static" that were used only in a single C source file.
2020-04-06 08:05:20 -05:00
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