ulab — numpy-compatible array library¶
ulab is a numpy-compatible numerical array library for MicroPython.
It provides the ndarray n-dimensional array type along with the
numpy and scipy submodules, which mirror a useful
subset of CPython’s numpy and scipy packages. Typical usage is
to import the submodules under their conventional aliases:
from ulab import numpy as np
from ulab import scipy as sp
The ndarray class itself is exposed both at the top level (as
ulab.ndarray) and through the numpy submodule (as
numpy.ndarray); both refer to the same type.
Submodules¶
The ndarray n-dimensional array class is documented under
numpy — numpy-compatible array operations. On the OpenMV build, ndarray.dtype
returns the underlying type-code integer (the integer constants
exposed at the numpy module level: numpy.uint8,
numpy.int8, numpy.uint16, numpy.int16, numpy.float,
numpy.bool).