Commit graph

131 commits

Author SHA1 Message Date
70af1c8a77 fix test 2020-02-18 21:25:03 -06:00
a2962f0fe5 fix printing failure info when tests fail 2020-02-18 21:10:33 -06:00
cf057c4df9 roll back constness corrections 2020-02-18 21:00:30 -06:00
de6b7772e4 fix ci build 2020-02-18 20:50:01 -06:00
43551c9a7a Merge remote-tracking branch 'upstream/master' into 2dim 2020-02-18 20:46:43 -06:00
23adf6e4a7 Mark modules as 'extern const' 2020-02-18 20:32:33 -06:00
f6d123beb8 Don't export modules if CIRCUITPY
.. We are using the "shared bindings" method of circuitpython
2020-02-18 20:32:28 -06:00
27996c9003 Add MP_DELCARE_CONST_FUN declarations to headers 2020-02-18 20:32:22 -06:00
Zoltán Vörös
bec24fe4a4 Merge branch 'master' of github.com:v923z/micropython-ulab 2020-02-17 19:58:27 +01:00
Zoltán Vörös
e71f667114 temporary fix for issue #40 2020-02-17 19:57:55 +01:00
Zoltán Vörös
017c1c2c46 added extras.h/extras.c 2020-02-16 19:49:28 +01:00
Zoltán Vörös
6fe015f134 properties are now defined in ndarray_properties.h 2020-02-16 19:49:01 +01:00
Zoltán Vörös
3727c38182
Merge pull request #39 from jepler/github-actions
Perform continuous integration using github actions
2020-02-16 16:22:14 +01:00
a75903efe5 Add github actions
This will build micropython's master branch with ulab support, and
then run the tests in tests/

At this time, there's only one test and it's not very useful.
2020-02-15 19:57:50 -06:00
Zoltán Vörös
d8bfe46bd8 added __name__ to all submodules 2020-02-14 19:51:28 +01:00
Zoltán Vörös
2e3a0b4483 separated sub-modules into proper python sub-modules 2020-02-13 21:49:09 +01:00
Zoltán Vörös
49db707a9f
Merge pull request #37 from jepler/portability
Make portable to CircuitPython within same codebase
2020-02-12 18:27:16 +01:00
Zoltán Vörös
f2aaab84cc
Merge pull request #36 from jepler/convolve-optimize
filter_convolve: fix build error
2020-02-12 18:24:26 +01:00
Jeff Epler
fc80a25685 Increase CircuitPython compatibility
- Adapt to signature of mp_make_new_fun_t for mpy and cpy by ifdef
 - Use MP_OBJ_IS_TYPE instead of mp_obj_is_type
 - Ditto MP_OBJ_IS_INT
 - Use mp_const_none instead of MP_ROM_NONE
 - Ditto mp_const_true, mp_const_false
2020-02-12 10:15:47 -06:00
Jeff Epler
f47abf90ac filter_convolve: fix build error
My earlier change introduced a build error.  I'm not sure why
I didn't find this before making the pull request.
2020-02-12 09:50:17 -06:00
Zoltán Vörös
5bf6e89a0a
Merge pull request #35 from jepler/convolve-optimize
convolve: Optimize and special-case floats
2020-02-12 08:16:18 +01:00
Jeff Epler
7846b0c469 convolve: Optimize and special-case floats
Special casing floats decreases runtime to about 50% (applying a 117-tap
filter to 512 points of data goes from 70ms to 32ms)

The top_n/bot_n calculations already meant that the a/c indices were
never out of range.  This decreases runtime further to about 15% of
original (11ms)

Timings done on an Adafruit Clue (nrf52840 at 64MHz)

It does of course increase code size somewhat.
2020-02-11 17:57:54 -06:00
Zoltán Vörös
9153fd8f8a added a short section to the manual on how to customise ulab 2020-02-11 21:36:12 +01:00
Zoltán Vörös
57cf52838c
Merge pull request #33 from jepler/fix-undef-errors-mpy
Fix some define-guards
2020-02-11 20:19:27 +01:00
Zoltán Vörös
c14eee1bd4 trying to fix ulab.h definitions 2020-02-11 20:15:45 +01:00
Zoltán Vörös
2c71467ced implemented ndarray properties 2020-02-11 20:08:37 +01:00
02d74a4d3e Fix some define-guards
These problems were found building in circuitpython:
../../extmod/ulab/code/numerical.c:671:5: error: "ULAB_NUMERICAL_ARGSORT" is not defined, evaluates to 0 [-Werror=undef]
  671 | #if ULAB_NUMERICAL_ARGSORT
      |     ^~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
../../extmod/ulab/code/ulab.c:150:9: error: "ULAB_VECTORISE_" is not defined, evaluates to 0 [-Werror=undef]
  150 |     #if ULAB_VECTORISE_
      |         ^~~~~~~~~~~~~~~
../../extmod/ulab/code/ulab.c:159:9: error: "ULAB_VECTORISE_TAHN" is not defined, evaluates to 0 [-Werror=undef]
  159 |     #if ULAB_VECTORISE_TAHN
      |         ^~~~~~~~~~~~~~~~~~~
../../extmod/ulab/code/ulab.c:198:9: error: "ULAB_NUMERICAL_ARGSORT" is not defined, evaluates to 0 [-Werror=undef]
  198 |     #if ULAB_NUMERICAL_ARGSORT
      |         ^~~~~~~~~~~~~~~~~~~~~~
2020-02-11 11:08:25 -06:00
Zoltán Vörös
4a0677fd14 removed extra ndarray_get_buffer 2020-02-10 19:54:49 +01:00
Zoltán Vörös
800bb3b872 Merge branch 'master' of github.com:v923z/micropython-ulab 2020-02-10 19:51:22 +01:00
Zoltán Vörös
89170a13a6 fixed error in filter.c, removed asbytearray, and added buffer protocol to ndarray.c 2020-02-10 19:50:49 +01:00
Zoltán Vörös
ca23263655
Merge pull request #31 from jepler/memoryview
ndarray: let memoryview(arr) work
2020-02-10 18:38:11 +01:00
Zoltán Vörös
936bb3bae5 corrected slicing error in issue #32 2020-02-09 19:56:32 +01:00
a90d18caf1 ndarray: let memoryview(arr) work
.. this makes ndarray.rawbytes redundant.  Circuitpython will remove it.
2020-02-08 10:29:45 -06:00
Zoltán Vörös
918075daaf fixed a couple of small issues in filter.c 2020-02-08 10:45:13 +01:00
Zoltán Vörös
fac3eb4099 fixed a couple of small issues in filter.c 2020-02-08 10:44:24 +01:00
Zoltán Vörös
76ccd1a118 the master branch is configurable now 2020-02-07 21:23:24 +01:00
Zoltán Vörös
0315408e05
Merge pull request #29 from jepler/convolve
convolve: implement and document
2020-02-06 19:53:51 +01:00
Jeff Epler
722401c2e4 Clean up and polish based on review comments
no functional change
2020-02-06 12:43:39 -06:00
Jeff Epler
efa4c148c9 convolve: implement and document 2020-02-05 16:33:48 -06:00
Zoltán Vörös
dcd65feb21 fixed indexing error in linalg.dot 2020-01-29 19:27:28 +01:00
Zoltán Vörös
b2c4749962 replaced MP_ROM_PTR macro, wherever it made sense 2020-01-20 19:55:38 +01:00
Zoltán Vörös
941ffceb1b replaced MP_ROM_PTR macro, wherever it made sense 2020-01-20 19:49:57 +01:00
Zoltán Vörös
ac1111c251 fixed glitch in std/mean functions 2020-01-07 21:53:23 +01:00
Zoltán Vörös
992e48b84e switched to version string 2020-01-07 21:02:20 +01:00
Zoltán Vörös
68e38bc6b8 backup commit 2020-01-06 07:43:27 +01:00
Zoltán Vörös
81acfc7da8 ulab_ndarray_type is extern now 2019-12-31 10:57:10 +01:00
Zoltán Vörös
107587de00 found and fixed macro error in vectorise.h 2019-11-29 08:02:48 +01:00
Zoltán Vörös
22f85e0d3b fixed indexing error in linalg.dot 2019-11-28 19:16:59 +01:00
Zoltán Vörös
84d2ce8a52 notebook backup 2019-11-14 20:33:11 +01:00
Zoltán Vörös
1df50af368 replaced fabs by platform-agnostic version 2019-11-14 20:27:32 +01:00