|
3 | 3 | [](https://micropython-ulab-robert.readthedocs.io/en/latest/?badge=latest)
|
4 | 4 |
|
5 | 5 | `ulab` is a `numpy`-like array manipulation library for [micropython](http://micropython.org/) and [CircuitPython](https://circuitpython.org/).
|
6 |
| -The module is written in C, defines compact containers for numerical data of one to four |
| 6 | +The module is written in C, defines compact containers (`ndarray`s) for numerical data of one to four |
7 | 7 | dimensions, and is fast. The library is a software-only standard `micropython` user module,
|
8 |
| -i.e., it has no hardware dependencies, and can be compiled for any platform. |
9 |
| -The `float` implementation of `micropython` (`float`, or `double`) is automatically detected. |
| 8 | +i.e., it has no hardware dependencies, and can be compiled for any platform. 8-, and 16-bit signed |
| 9 | +and unsigned integer `dtypes`, as well as `float`, and, optionally, ` complex` are supported. |
| 10 | +The `float` implementation of `micropython` (32-bit `float`, or 64-bit `double`) is automatically |
| 11 | +detected and handled. |
10 | 12 |
|
11 | 13 | 1. [Supported functions and methods](#supported-functions-and-methods)
|
12 | 14 | 1. [ndarray methods](#ndarray-methods)
|
@@ -38,15 +40,19 @@ iterables via the `array` constructor, or by means of the `arange`, `concatenate
|
38 | 40 | `frombuffer`, `full`, `linspace`, `logspace`, `ones`, or `zeros` functions.
|
39 | 41 |
|
40 | 42 | `ndarray`s can be sliced, and iterated on, and have a number of their own methods, and properties, such as `flatten()`, `itemsize`, `reshape()`,
|
41 |
| -`shape`, `size`, `strides`, `tobytes()`, and `transpose()` and `T`. |
| 43 | +`shape`, `size`, `strides`, `tobytes()`, `tolist()`, and `transpose()` and `T`. If the firmware is compiled with `complex` support, |
| 44 | +the `imag`, and `real` properties are automatically included. |
42 | 45 |
|
43 | 46 | ## `numpy` and `scipy` functions
|
44 | 47 |
|
45 | 48 | In addition, `ulab` includes [universal functions](https://micropython-ulab.readthedocs.io/en/latest/numpy-universal.html), [many `numpy` functions](https://micropython-ulab.readthedocs.io/en/latest/numpy-functions.html), and functions from the [`numpy.fft`](https://micropython-ulab.readthedocs.io/en/latest/numpy-fft.html), [`numpy.linalg`](https://micropython-ulab.readthedocs.io/en/latest/numpy-linalg.html), [`scipy.linalg`](https://micropython-ulab.readthedocs.io/en/latest/scipy-linalg.html), [`scipy.optimize`](https://micropython-ulab.readthedocs.io/en/latest/scipy-optimize.html), [`scipy.signal`](https://micropython-ulab.readthedocs.io/en/latest/scipy-signal.html), and [`scipy.special`](https://micropython-ulab.readthedocs.io/en/latest/scipy-special.html) modules. A complete list of available routines can be found under [micropython-ulab](https://micropython-ulab.readthedocs.io/en/latest).
|
46 | 49 |
|
47 | 50 | ## `ulab` utilities
|
48 | 51 |
|
49 |
| -The [`utils`](https://micropython-ulab.readthedocs.io/en/latest/ulab-utils.html) module contains functions for interfacing with peripheral devices supporting the buffer protocol. |
| 52 | +The [`utils`](https://micropython-ulab.readthedocs.io/en/latest/ulab-utils.html) module contains functions for |
| 53 | +interfacing with peripheral devices supporting the buffer protocol. These functions do not have an obvious |
| 54 | +`numpy` equivalent, but share a similar programming interface, and allow direct data input-output between |
| 55 | +numerical arrays and hardware components. |
50 | 56 |
|
51 | 57 | ## `user` module
|
52 | 58 |
|
@@ -84,6 +90,8 @@ Documentation can be found on [readthedocs](https://readthedocs.org/) under
|
84 | 90 | as well as at [circuitpython-ulab](https://circuitpython.readthedocs.io/en/latest/shared-bindings/ulab/__init__.html).
|
85 | 91 | A number of practical examples are listed in Jeff Epler's excellent
|
86 | 92 | [circuitpython-ulab](https://learn.adafruit.com/ulab-crunch-numbers-fast-with-circuitpython/overview) overview.
|
| 93 | +The [tricks](https://micropython-ulab.readthedocs.io/en/latest/ulab-tricks.html) chapter of the user manual discusses |
| 94 | +methods by which RAM and speed can be leveraged in particular numerical problems. |
87 | 95 |
|
88 | 96 | # Benchmarks
|
89 | 97 |
|
|
0 commit comments