A numpy-like fast vector module for MicroPython and CircuitPython, written in C for embedded systems.
ulab is a numpy-like array manipulation library for MicroPython and CircuitPython, written in C for performance. It provides fast numerical operations and compact data structures (ndarrays) for embedded systems, enabling scientific computing on microcontrollers with limited resources.
Developers working with MicroPython or CircuitPython on embedded platforms who need efficient numerical computing, such as data processing, signal analysis, or machine learning on microcontrollers.
It offers a numpy-compatible API optimized for microcontrollers, with C-level performance, minimal memory footprint, and the ability to customize firmware by excluding unused functions to save flash space.
a numpy-like fast vector module for micropython, circuitpython, and their derivatives
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Written in C for speed, enabling fast numerical operations on resource-constrained microcontrollers, as highlighted in benchmarks and the focus on efficiency.
Provides a numpy-like API with ndarrays and common functions, making it straightforward to port existing Python code to MicroPython or CircuitPython environments.
Allows excluding unnecessary functions via pre-processor switches to save flash space, with options to trade execution speed for size, as detailed in the customization section.
Includes utilities for direct data input-output between arrays and peripherals via the buffer protocol, facilitating embedded applications without extra overhead.
Supports adding user-defined functions via the user module without modifying the core, enabling custom extensions while maintaining compatibility.
Not all numpy and scipy functions are implemented; users may encounter gaps when porting code that relies on advanced or less common routines.
Requires compiling custom firmware for different boards (e.g., ESP32, STM), with detailed, platform-specific steps that can be error-prone and time-consuming.
Only works with MicroPython and CircuitPython, so it's not usable in standard CPython projects, restricting its applicability to embedded contexts.
Even with customization, the library can be too large for some microcontrollers, necessitating partition table adjustments as noted in the ESP32 section.
micropython-ulab is an open-source alternative to the following products: