Commit graph

156 commits

Author SHA1 Message Date
Jeff Epler
6b9ea24b2e remove unused and unneeded file 2020-02-27 10:14:53 -06:00
Jeff Epler
a5ac422f33 Merge remote-tracking branch 'upstream/master' into merge-upstream-3 2020-02-27 10:14:40 -06:00
Jeff Epler
badeee48df
Merge pull request #47 from jepler/local-build-script
a script to build and run tests locally
2020-02-27 10:12:03 -06:00
Jeff Epler
e370e56a15 a script to build and run tests locally 2020-02-27 10:11:34 -06:00
Jeff Epler
db5f1f85bb
Merge pull request #46 from jepler/ndarray-properties-sort
Ndarray properties sort
2020-02-27 10:11:17 -06:00
Jeff Epler
2bddc94df5
Merge pull request #45 from jepler/move-ones-zeros
Move zeros(), ones() to base ulab module
2020-02-27 10:08:29 -06:00
Jeff Epler
aa5ef4afb9 Enable sort method in circuitpython 2020-02-27 10:06:33 -06:00
Jeff Epler
d99d834d87 Enable properties in circuitpython
I verified that these work for us as coded.
2020-02-27 10:06:27 -06:00
Jeff Epler
83479f115b Move zeros(), ones() to base ulab module 2020-02-27 10:05:50 -06:00
924dc7012a
Merge pull request #44 from jepler/circuitpy-fixes
Circuitpy fixes
2020-02-27 09:29:43 -06:00
Jeff Epler
daaacac16f Remove CIRCUITPY special cases 2020-02-27 08:56:07 -06:00
Jeff Epler
aa4d53e292 Use circuitpy-compat for none 2020-02-27 08:56:04 -06:00
3febd79aa0
Merge pull request #41 from v923z/2dim
Split ulab into multiple modules
2020-02-26 11:29:17 -06:00
Zoltán Vörös
7e2be88dff Merge branch '2dim' of github.com:v923z/micropython-ulab into 2dim
added circuitpython-related stuff to code and manual
2020-02-26 18:06:19 +01:00
Zoltán Vörös
e0e840f6d5 added circuitpython-related stuff to the manual 2020-02-26 18:05:49 +01:00
102ba5032e add missing expected-file 2020-02-18 21:40:31 -06:00
b83ed3e2ca add more tests 2020-02-18 21:36:49 -06:00
1e5ebe739d numerical: add __name__ 2020-02-18 21:27:05 -06:00
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
8300de7f11 backup commit, absolutely nothing essential 2020-02-16 19:53:30 +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
Jeff Epler
cf0180e05e
Merge pull request #9 from jepler/merge-upstream-2
Merge upstream
2020-02-13 13:31:11 -06:00
4e5947afe1 Merge remote-tracking branch 'upstream/master' 2020-02-13 13:27:54 -06: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
Jeff Epler
72025550d1
Merge pull request #8 from jepler/fix-undef-errors
Fix some define-guards
2020-02-11 10:44:05 -06:00
1beddec7bb 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 10:42:58 -06:00