updated readme

This commit is contained in:
Zoltán Vörös 2020-10-17 09:14:22 +02:00
parent 511bb5f6c9
commit e947baddd7

View file

@ -1,8 +1,8 @@
# ulab
`ulab` is a `numpy`-like array manipulation library for `micropython` and `CircuitPython`.
The module is written in C, defines compact containers for numerical
data, and is fast. The library is a software-only standard `micropython` user module,
The module is written in C, defines compact containers for numerical data of one to four
dimensions, and is fast. The library is a software-only standard `micropython` user module,
i.e., it has no hardware dependencies, and can be compiled for any platform.
The `float` implementation of `micropython` (`float`, or `double`) is automatically detected.
@ -11,18 +11,20 @@ The `float` implementation of `micropython` (`float`, or `double`) is automatica
## ndarray
`ulab` implements `numpy`'s `ndarray` with the `==`, `!=`, `<`, `<=`, `>`, `>=`, `+`, `-`, `/`, `*`, and `**` binary
operators, and the `len`, `~`, `-`, `+`, `abs` unary operators that operate element-wise. Type-aware `ndarray`s can
be initialised from any `micropython` iterable, lists of iterables, or by means of the `arange`, `eye`, `linspace`,
`ones`, or `zeros` functions.
`ulab` implements `numpy`'s `ndarray` with the `==`, `!=`, `<`, `<=`, `>`, `>=`, `+`, `-`, `/`, `*`, `**`,
`+=`, `-=`, `*=`, `/=`, `**=` binary operators, and the `len`, `~`, `-`, `+`, `abs` unary operators that
operate element-wise. Type-aware `ndarray`s can be initialised from any `micropython` iterable, lists of
iterables, or by means of the `arange`, `concatenate`, `eye`, `full`, `linspace`, `logspace`, `ones`, or
`zeros` functions.
`ndarray`s can be iterated on, and have a number of their own methods, such as `shape`, `reshape`, `transpose`, `size`, and `itemsize`.
`ndarray`s can be iterated on, and have a number of their own methods, such as `flatten`, `shape`,
`reshape`, `strides`, `transpose`, `size`, `tobytes`, and `itemsize`.
## Modules
## Customising the firmware
In addition to the `ndarray`'s operators and methods, seven modules define a great number of functions that can
take `ndarray`s or `micropython` iterables as their arguments. If flash space is a concern, unnecessary sub-modules
can be excluded from the compiled firmware with a pre-processor switch.
or even individual functions can be excluded from the compiled firmware with pre-processor switches.
### approx
@ -50,7 +52,7 @@ determinant, eigenvalues, eigenvectors, Cholesky decomposition, and trace.
### numerical
The `numerical` sub-module defines the `roll`, `flip`, `diff`, `sort` and `argsort` functions for `ndarray`s, and,
The `numerical` sub-module defines the `cross`, `diff`, `flip`, `roll`, `sort` and `argsort` functions for `ndarray`s, and,
in addition, the `min`, `max`, `argmin`, `argmax`, `sum`, `mean`, `std` functions that work with `ndarray`s, as
well as generic one-dimensional iterables.
@ -60,8 +62,8 @@ The `poly` sub-module defines the `polyval`, and `polyfit` functions from `numpy
### vector
The `vector` sub-module implements all functions of the `math` package (e.g., `acos`, `acosh`, ..., `tan`, `tanh`)
of `micropython` for `ndarray`s and iterables. In addition, it also provided tools for vectorising generic,
The `vector` sub-module implements all functions of `micropython`'s `math` package (e.g., `acos`, `acosh`, ..., `tan`, `tanh`),
and the `degrees` and `radians` for `ndarray`s and iterables. In addition, it also provided tools for vectorising generic,
user-defined `python` functions.
### user
@ -79,7 +81,7 @@ A number of practical examples are listed in the excellent
# Firmware
Compiled firmware for many hardware platforms can be downloaded from Roberto Colistete's
gitlab repository: for the [pyboad](https://gitlab.com/rcolistete/micropython-samples/-/tree/master/Pyboard/Firmware/), and
gitlab repository: for the [pyboard](https://gitlab.com/rcolistete/micropython-samples/-/tree/master/Pyboard/Firmware/), and
for [ESP8266](https://gitlab.com/rcolistete/micropython-samples/-/tree/master/ESP8266/Firmware).
Since a number of features can be set in the firmware (threading, support for SD card, LEDs, user switch etc.), and it is
impossible to create something that suits everyone, these releases should only be used for
@ -93,6 +95,7 @@ in question.
1. `MicroPython for K210` https://github.com/loboris/MicroPython_K210_LoBo
1. `MaixPy` https://github.com/sipeed/MaixPy
1. `OpenMV` https://github.com/openmv/openmv
1. `pycom` https://pycom.io/
## Compiling