Merge pull request #4533 from jepler/upgrade-ulab

update ulab to 2.1.5 (+ a doc building fix in ulab)
This commit is contained in:
Dan Halbert 2021-04-02 15:08:41 -04:00 committed by GitHub
commit c4a90d8857
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 82 additions and 89 deletions

@ -1 +1 @@
Subproject commit b64fa6d4c73287edef9ccf09cfd6ec5009f9628b Subproject commit 2aae6464856e5213e45c72681dbb20c708fb3c6c

View File

@ -929,11 +929,11 @@ msgstr ""
msgid "Extended advertisements with scan response not supported." msgid "Extended advertisements with scan response not supported."
msgstr "" msgstr ""
#: extmod/ulab/code/fft/fft.c #: extmod/ulab/code/numpy/fft/fft_tools.c
msgid "FFT is defined for ndarrays only" msgid "FFT is defined for ndarrays only"
msgstr "" msgstr ""
#: extmod/ulab/code/fft/fft.c #: extmod/ulab/code/numpy/fft/fft_tools.c
msgid "FFT is implemented for linear arrays only" msgid "FFT is implemented for linear arrays only"
msgstr "" msgstr ""
@ -2387,11 +2387,11 @@ msgstr ""
msgid "arg is an empty sequence" msgid "arg is an empty sequence"
msgstr "" msgstr ""
#: extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/numerical/numerical.c
msgid "argsort argument must be an ndarray" msgid "argsort argument must be an ndarray"
msgstr "" msgstr ""
#: extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/numerical/numerical.c
msgid "argsort is not implemented for flattened arrays" msgid "argsort is not implemented for flattened arrays"
msgstr "" msgstr ""
@ -2399,7 +2399,7 @@ msgstr ""
msgid "argument has wrong type" msgid "argument has wrong type"
msgstr "" msgstr ""
#: extmod/ulab/code/linalg/linalg.c #: extmod/ulab/code/numpy/linalg/linalg.c
msgid "argument must be ndarray" msgid "argument must be ndarray"
msgstr "" msgstr ""
@ -2412,7 +2412,8 @@ msgstr ""
msgid "argument should be a '%q' not a '%q'" msgid "argument should be a '%q' not a '%q'"
msgstr "" msgstr ""
#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/linalg/linalg.c
#: extmod/ulab/code/numpy/numerical/numerical.c
msgid "arguments must be ndarrays" msgid "arguments must be ndarrays"
msgstr "" msgstr ""
@ -2425,11 +2426,11 @@ msgstr ""
msgid "array/bytes required on right side" msgid "array/bytes required on right side"
msgstr "" msgstr ""
#: extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/numerical/numerical.c
msgid "attempt to get (arg)min/(arg)max of empty sequence" msgid "attempt to get (arg)min/(arg)max of empty sequence"
msgstr "" msgstr ""
#: extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence" msgid "attempt to get argmin/argmax of an empty sequence"
msgstr "" msgstr ""
@ -2437,15 +2438,15 @@ msgstr ""
msgid "attributes not supported yet" msgid "attributes not supported yet"
msgstr "" msgstr ""
#: extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/numerical/numerical.c
msgid "axis is out of bounds" msgid "axis is out of bounds"
msgstr "" msgstr ""
#: extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/numerical/numerical.c
msgid "axis must be None, or an integer" msgid "axis must be None, or an integer"
msgstr "" msgstr ""
#: extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/numerical/numerical.c
msgid "axis too long" msgid "axis too long"
msgstr "" msgstr ""
@ -2746,19 +2747,19 @@ msgstr ""
msgid "conversion to object" msgid "conversion to object"
msgstr "" msgstr ""
#: extmod/ulab/code/filter/filter.c #: extmod/ulab/code/numpy/filter/filter.c
msgid "convolve arguments must be linear arrays" msgid "convolve arguments must be linear arrays"
msgstr "" msgstr ""
#: extmod/ulab/code/filter/filter.c #: extmod/ulab/code/numpy/filter/filter.c
msgid "convolve arguments must be ndarrays" msgid "convolve arguments must be ndarrays"
msgstr "" msgstr ""
#: extmod/ulab/code/filter/filter.c #: extmod/ulab/code/numpy/filter/filter.c
msgid "convolve arguments must not be empty" msgid "convolve arguments must not be empty"
msgstr "" msgstr ""
#: extmod/ulab/code/poly/poly.c #: extmod/ulab/code/numpy/poly/poly.c
msgid "could not invert Vandermonde matrix" msgid "could not invert Vandermonde matrix"
msgstr "" msgstr ""
@ -2766,15 +2767,15 @@ msgstr ""
msgid "couldn't determine SD card version" msgid "couldn't determine SD card version"
msgstr "" msgstr ""
#: extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/numerical/numerical.c
msgid "cross is defined for 1D arrays of length 3" msgid "cross is defined for 1D arrays of length 3"
msgstr "" msgstr ""
#: extmod/ulab/code/approx/approx.c #: extmod/ulab/code/scipy/optimize/optimize.c
msgid "data must be iterable" msgid "data must be iterable"
msgstr "" msgstr ""
#: extmod/ulab/code/approx/approx.c #: extmod/ulab/code/scipy/optimize/optimize.c
msgid "data must be of equal length" msgid "data must be of equal length"
msgstr "" msgstr ""
@ -2811,18 +2812,14 @@ msgstr ""
msgid "dict update sequence has wrong length" msgid "dict update sequence has wrong length"
msgstr "" msgstr ""
#: extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/numerical/numerical.c
msgid "diff argument must be an ndarray" msgid "diff argument must be an ndarray"
msgstr "" msgstr ""
#: extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/numerical/numerical.c
msgid "differentiation order out of range" msgid "differentiation order out of range"
msgstr "" msgstr ""
#: extmod/ulab/code/linalg/linalg.c
msgid "dimensions do not match"
msgstr ""
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c #: shared-bindings/math/__init__.c
msgid "division by zero" msgid "division by zero"
@ -2938,11 +2935,11 @@ msgstr ""
msgid "filesystem must provide mount method" msgid "filesystem must provide mount method"
msgstr "" msgstr ""
#: extmod/ulab/code/vector/vectorise.c #: extmod/ulab/code/numpy/vector/vector.c
msgid "first argument must be a callable" msgid "first argument must be a callable"
msgstr "" msgstr ""
#: extmod/ulab/code/approx/approx.c #: extmod/ulab/code/scipy/optimize/optimize.c
msgid "first argument must be a function" msgid "first argument must be a function"
msgstr "" msgstr ""
@ -2950,11 +2947,7 @@ msgstr ""
msgid "first argument must be a tuple of ndarrays" msgid "first argument must be a tuple of ndarrays"
msgstr "" msgstr ""
#: extmod/ulab/code/ndarray.c #: extmod/ulab/code/numpy/vector/vector.c
msgid "first argument must be an iterable"
msgstr ""
#: extmod/ulab/code/vector/vectorise.c
msgid "first argument must be an ndarray" msgid "first argument must be an ndarray"
msgstr "" msgstr ""
@ -2966,7 +2959,7 @@ msgstr ""
msgid "flattening order must be either 'C', or 'F'" msgid "flattening order must be either 'C', or 'F'"
msgstr "" msgstr ""
#: extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/numerical/numerical.c
msgid "flip argument must be an ndarray" msgid "flip argument must be an ndarray"
msgstr "" msgstr ""
@ -2999,7 +2992,7 @@ msgstr ""
msgid "function got multiple values for argument '%q'" msgid "function got multiple values for argument '%q'"
msgstr "" msgstr ""
#: extmod/ulab/code/approx/approx.c #: extmod/ulab/code/scipy/optimize/optimize.c
msgid "function has the same sign at the ends of interval" msgid "function has the same sign at the ends of interval"
msgstr "" msgstr ""
@ -3074,7 +3067,7 @@ msgstr ""
msgid "index is out of bounds" msgid "index is out of bounds"
msgstr "" msgstr ""
#: extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
msgid "index out of range" msgid "index out of range"
@ -3088,7 +3081,7 @@ msgstr ""
msgid "indices must be integers, slices, or Boolean lists" msgid "indices must be integers, slices, or Boolean lists"
msgstr "" msgstr ""
#: extmod/ulab/code/approx/approx.c #: extmod/ulab/code/scipy/optimize/optimize.c
msgid "initial values must be iterable" msgid "initial values must be iterable"
msgstr "" msgstr ""
@ -3108,7 +3101,7 @@ msgstr ""
msgid "input argument must be an integer, a tuple, or a list" msgid "input argument must be an integer, a tuple, or a list"
msgstr "" msgstr ""
#: extmod/ulab/code/fft/fft.c #: extmod/ulab/code/numpy/fft/fft_tools.c
msgid "input array length must be power of 2" msgid "input array length must be power of 2"
msgstr "" msgstr ""
@ -3116,15 +3109,15 @@ msgstr ""
msgid "input arrays are not compatible" msgid "input arrays are not compatible"
msgstr "" msgstr ""
#: extmod/ulab/code/poly/poly.c #: extmod/ulab/code/numpy/poly/poly.c
msgid "input data must be an iterable" msgid "input data must be an iterable"
msgstr "" msgstr ""
#: extmod/ulab/code/linalg/linalg.c #: extmod/ulab/code/numpy/linalg/linalg.c
msgid "input matrix is asymmetric" msgid "input matrix is asymmetric"
msgstr "" msgstr ""
#: extmod/ulab/code/linalg/linalg.c #: extmod/ulab/code/numpy/linalg/linalg.c
msgid "input matrix is singular" msgid "input matrix is singular"
msgstr "" msgstr ""
@ -3140,23 +3133,23 @@ msgstr ""
msgid "input must be an ndarray" msgid "input must be an ndarray"
msgstr "" msgstr ""
#: extmod/ulab/code/filter/filter.c #: extmod/ulab/code/scipy/signal/signal.c
msgid "input must be one-dimensional" msgid "input must be one-dimensional"
msgstr "" msgstr ""
#: extmod/ulab/code/linalg/linalg.c #: extmod/ulab/code/numpy/linalg/linalg.c
msgid "input must be square matrix" msgid "input must be square matrix"
msgstr "" msgstr ""
#: extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/numerical/numerical.c
msgid "input must be tuple, list, range, or ndarray" msgid "input must be tuple, list, range, or ndarray"
msgstr "" msgstr ""
#: extmod/ulab/code/poly/poly.c #: extmod/ulab/code/numpy/poly/poly.c
msgid "input vectors must be of equal length" msgid "input vectors must be of equal length"
msgstr "" msgstr ""
#: extmod/ulab/code/poly/poly.c #: extmod/ulab/code/numpy/poly/poly.c
msgid "inputs are not iterable" msgid "inputs are not iterable"
msgstr "" msgstr ""
@ -3168,7 +3161,7 @@ msgstr ""
msgid "integer required" msgid "integer required"
msgstr "" msgstr ""
#: extmod/ulab/code/approx/approx.c #: extmod/ulab/code/numpy/approx/approx.c
msgid "interp is defined for 1D arrays of equal length" msgid "interp is defined for 1D arrays of equal length"
msgstr "" msgstr ""
@ -3257,11 +3250,7 @@ msgstr ""
msgid "issubclass() arg 2 must be a class or a tuple of classes" msgid "issubclass() arg 2 must be a class or a tuple of classes"
msgstr "" msgstr ""
#: extmod/ulab/code/ndarray.c #: extmod/ulab/code/numpy/linalg/linalg.c
msgid "iterables are not of the same length"
msgstr ""
#: extmod/ulab/code/linalg/linalg.c
msgid "iterations did not converge" msgid "iterations did not converge"
msgstr "" msgstr ""
@ -3329,7 +3318,11 @@ msgstr ""
msgid "math domain error" msgid "math domain error"
msgstr "" msgstr ""
#: extmod/ulab/code/linalg/linalg.c #: extmod/ulab/code/numpy/linalg/linalg.c
msgid "matrix dimensions do not match"
msgstr ""
#: extmod/ulab/code/numpy/linalg/linalg.c
msgid "matrix is not positive definite" msgid "matrix is not positive definite"
msgstr "" msgstr ""
@ -3351,15 +3344,15 @@ msgstr ""
msgid "maximum recursion depth exceeded" msgid "maximum recursion depth exceeded"
msgstr "" msgstr ""
#: extmod/ulab/code/approx/approx.c #: extmod/ulab/code/scipy/optimize/optimize.c
msgid "maxiter must be > 0" msgid "maxiter must be > 0"
msgstr "" msgstr ""
#: extmod/ulab/code/approx/approx.c #: extmod/ulab/code/scipy/optimize/optimize.c
msgid "maxiter should be > 0" msgid "maxiter should be > 0"
msgstr "" msgstr ""
#: extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/numerical/numerical.c
msgid "median argument must be an ndarray" msgid "median argument must be an ndarray"
msgstr "" msgstr ""
@ -3380,7 +3373,7 @@ msgstr ""
msgid "module not found" msgid "module not found"
msgstr "" msgstr ""
#: extmod/ulab/code/poly/poly.c #: extmod/ulab/code/numpy/poly/poly.c
msgid "more degrees of freedom than data points" msgid "more degrees of freedom than data points"
msgstr "" msgstr ""
@ -3498,7 +3491,7 @@ msgstr ""
msgid "non-zero timeout must be >= interval" msgid "non-zero timeout must be >= interval"
msgstr "" msgstr ""
#: extmod/ulab/code/linalg/linalg.c #: extmod/ulab/code/numpy/linalg/linalg.c
msgid "norm is defined for 1D and 2D arrays" msgid "norm is defined for 1D and 2D arrays"
msgstr "" msgstr ""
@ -3599,8 +3592,8 @@ msgstr ""
msgid "only slices with step=1 (aka None) are supported" msgid "only slices with step=1 (aka None) are supported"
msgstr "" msgstr ""
#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c #: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c
#: extmod/ulab/code/vector/vectorise.c #: extmod/ulab/code/numpy/vector/vector.c
msgid "operands could not be broadcast together" msgid "operands could not be broadcast together"
msgstr "" msgstr ""
@ -3608,7 +3601,7 @@ msgstr ""
msgid "operation is implemented for 1D Boolean arrays only" msgid "operation is implemented for 1D Boolean arrays only"
msgstr "" msgstr ""
#: extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/numerical/numerical.c
msgid "operation is not implemented on ndarrays" msgid "operation is not implemented on ndarrays"
msgstr "" msgstr ""
@ -3753,7 +3746,7 @@ msgstr ""
msgid "raw f-strings are not implemented" msgid "raw f-strings are not implemented"
msgstr "" msgstr ""
#: extmod/ulab/code/fft/fft.c #: extmod/ulab/code/numpy/fft/fft_tools.c
msgid "real and imaginary parts must be of equal length" msgid "real and imaginary parts must be of equal length"
msgstr "" msgstr ""
@ -3788,7 +3781,7 @@ msgstr ""
msgid "rgb_pins[%d] is not on the same port as clock" msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "" msgstr ""
#: extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/numerical/numerical.c
msgid "roll argument must be an ndarray" msgid "roll argument must be an ndarray"
msgstr "" msgstr ""
@ -3835,7 +3828,7 @@ msgstr ""
msgid "single '}' encountered in format string" msgid "single '}' encountered in format string"
msgstr "" msgstr ""
#: extmod/ulab/code/linalg/linalg.c #: extmod/ulab/code/numpy/linalg/linalg.c
msgid "size is defined for ndarrays only" msgid "size is defined for ndarrays only"
msgstr "" msgstr ""
@ -3843,10 +3836,6 @@ msgstr ""
msgid "sleep length must be non-negative" msgid "sleep length must be non-negative"
msgstr "" msgstr ""
#: extmod/ulab/code/ndarray.c
msgid "slice step can't be zero"
msgstr ""
#: py/objslice.c py/sequence.c #: py/objslice.c py/sequence.c
msgid "slice step cannot be zero" msgid "slice step cannot be zero"
msgstr "" msgstr ""
@ -3859,19 +3848,19 @@ msgstr ""
msgid "soft reboot\n" msgid "soft reboot\n"
msgstr "" msgstr ""
#: extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/numerical/numerical.c
msgid "sort argument must be an ndarray" msgid "sort argument must be an ndarray"
msgstr "" msgstr ""
#: extmod/ulab/code/filter/filter.c #: extmod/ulab/code/scipy/signal/signal.c
msgid "sos array must be of shape (n_section, 6)" msgid "sos array must be of shape (n_section, 6)"
msgstr "" msgstr ""
#: extmod/ulab/code/filter/filter.c #: extmod/ulab/code/scipy/signal/signal.c
msgid "sos[:, 3] should be all ones" msgid "sos[:, 3] should be all ones"
msgstr "" msgstr ""
#: extmod/ulab/code/filter/filter.c #: extmod/ulab/code/scipy/signal/signal.c
msgid "sosfilt requires iterable arguments" msgid "sosfilt requires iterable arguments"
msgstr "" msgstr ""
@ -3985,7 +3974,7 @@ msgstr ""
msgid "too many arguments provided with the given format" msgid "too many arguments provided with the given format"
msgstr "" msgstr ""
#: extmod/ulab/code/ulab_create.c #: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c
msgid "too many dimensions" msgid "too many dimensions"
msgstr "" msgstr ""
@ -3998,11 +3987,11 @@ msgstr ""
msgid "too many values to unpack (expected %d)" msgid "too many values to unpack (expected %d)"
msgstr "" msgstr ""
#: extmod/ulab/code/approx/approx.c #: extmod/ulab/code/numpy/approx/approx.c
msgid "trapz is defined for 1D arrays" msgid "trapz is defined for 1D arrays"
msgstr "" msgstr ""
#: extmod/ulab/code/approx/approx.c #: extmod/ulab/code/numpy/approx/approx.c
msgid "trapz is defined for 1D arrays of equal length" msgid "trapz is defined for 1D arrays of equal length"
msgstr "" msgstr ""
@ -4144,6 +4133,10 @@ msgstr ""
msgid "value_count must be > 0" msgid "value_count must be > 0"
msgstr "" msgstr ""
#: extmod/ulab/code/numpy/linalg/linalg.c
msgid "vectors must have same lengths"
msgstr ""
#: ports/esp32s2/common-hal/alarm/pin/__init__.c #: ports/esp32s2/common-hal/alarm/pin/__init__.c
msgid "wakeup conflict" msgid "wakeup conflict"
msgstr "" msgstr ""
@ -4173,7 +4166,7 @@ msgstr ""
msgid "window must be <= interval" msgid "window must be <= interval"
msgstr "" msgstr ""
#: extmod/ulab/code/numerical/numerical.c #: extmod/ulab/code/numpy/numerical/numerical.c
msgid "wrong axis index" msgid "wrong axis index"
msgstr "" msgstr ""
@ -4181,7 +4174,7 @@ msgstr ""
msgid "wrong axis specified" msgid "wrong axis specified"
msgstr "" msgstr ""
#: extmod/ulab/code/vector/vectorise.c #: extmod/ulab/code/numpy/vector/vector.c
msgid "wrong input type" msgid "wrong input type"
msgstr "" msgstr ""
@ -4197,7 +4190,7 @@ msgstr ""
msgid "wrong operand type" msgid "wrong operand type"
msgstr "" msgstr ""
#: extmod/ulab/code/vector/vectorise.c #: extmod/ulab/code/numpy/vector/vector.c
msgid "wrong output type" msgid "wrong output type"
msgstr "" msgstr ""
@ -4221,14 +4214,14 @@ msgstr ""
msgid "zero step" msgid "zero step"
msgstr "" msgstr ""
#: extmod/ulab/code/filter/filter.c #: extmod/ulab/code/scipy/signal/signal.c
msgid "zi must be an ndarray" msgid "zi must be an ndarray"
msgstr "" msgstr ""
#: extmod/ulab/code/filter/filter.c #: extmod/ulab/code/scipy/signal/signal.c
msgid "zi must be of float type" msgid "zi must be of float type"
msgstr "" msgstr ""
#: extmod/ulab/code/filter/filter.c #: extmod/ulab/code/scipy/signal/signal.c
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "" msgstr ""

View File

@ -106,9 +106,9 @@ $(BUILD)/extmod/modbtree.o: CFLAGS += $(BTREE_DEFS)
endif endif
ifeq ($(CIRCUITPY_ULAB),1) ifeq ($(CIRCUITPY_ULAB),1)
SRC_MOD += $(patsubst $(TOP)/%,%,$(wildcard $(TOP)/extmod/ulab/code/*.c)) ULAB_SRCS := $(shell find $(TOP)/extmod/ulab/code -type f -name "*.c")
SRC_MOD += $(patsubst $(TOP)/%,%,$(wildcard $(TOP)/extmod/ulab/code/*/*.c)) SRC_MOD += $(patsubst $(TOP)/%,%,$(ULAB_SRCS))
CFLAGS_MOD += -DCIRCUITPY_ULAB=1 -DMODULE_ULAB_ENABLED=1 CFLAGS_MOD += -DCIRCUITPY_ULAB=1 -DMODULE_ULAB_ENABLED=1 -iquote $(TOP)/extmod/ulab/code
$(BUILD)/extmod/ulab/code/%.o: CFLAGS += -Wno-missing-declarations -Wno-missing-prototypes -Wno-unused-parameter -Wno-float-equal -Wno-sign-compare -Wno-cast-align -Wno-shadow -DCIRCUITPY $(BUILD)/extmod/ulab/code/%.o: CFLAGS += -Wno-missing-declarations -Wno-missing-prototypes -Wno-unused-parameter -Wno-float-equal -Wno-sign-compare -Wno-cast-align -Wno-shadow -DCIRCUITPY
endif endif

View File

@ -13,7 +13,7 @@ import rgbmatrix
import ulab import ulab
ReadableBuffer = Union[ ReadableBuffer = Union[
bytes, bytearray, memoryview, array.array, ulab.array, rgbmatrix.RGBMatrix bytes, bytearray, memoryview, array.array, ulab.ndarray, rgbmatrix.RGBMatrix
] ]
"""Classes that implement the readable buffer protocol """Classes that implement the readable buffer protocol
@ -21,19 +21,19 @@ ReadableBuffer = Union[
- `bytearray` - `bytearray`
- `memoryview` - `memoryview`
- `array.array` - `array.array`
- `ulab.array` - `ulab.ndarray`
- `rgbmatrix.RGBMatrix` - `rgbmatrix.RGBMatrix`
""" """
WriteableBuffer = Union[ WriteableBuffer = Union[
bytearray, memoryview, array.array, ulab.array, rgbmatrix.RGBMatrix bytearray, memoryview, array.array, ulab.ndarray, rgbmatrix.RGBMatrix
] ]
"""Classes that implement the writeable buffer protocol """Classes that implement the writeable buffer protocol
- `bytearray` - `bytearray`
- `memoryview` - `memoryview`
- `array.array` - `array.array`
- `ulab.array` - `ulab.ndarray`
- `rgbmatrix.RGBMatrix` - `rgbmatrix.RGBMatrix`
""" """

View File

@ -43,7 +43,7 @@
//| per row is a multiple of 4, then the resulting memoryview will correspond directly with the bitmap's contents. Otherwise, //| per row is a multiple of 4, then the resulting memoryview will correspond directly with the bitmap's contents. Otherwise,
//| the bitmap data is packed into the memoryview with unspecified padding. //| the bitmap data is packed into the memoryview with unspecified padding.
//| //|
//| A read-only buffer can be used e.g., with `ulab.frombuffer` to efficiently create an array with the same content as a Bitmap; //| A read-only buffer can be used e.g., with ``ulab.numpy.frombuffer`` to efficiently create an array with the same content as a Bitmap;
//| to move data efficiently from ulab back into a Bitmap, use `bitmaptools.arrayblit`. //| to move data efficiently from ulab back into a Bitmap, use `bitmaptools.arrayblit`.
//| """ //| """
//| //|

View File

@ -164,7 +164,7 @@ STATIC void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_
//| "RGB565" means that it is organized as a series of 16-bit numbers //| "RGB565" means that it is organized as a series of 16-bit numbers
//| where the highest 5 bits are interpreted as red, the next 6 as //| where the highest 5 bits are interpreted as red, the next 6 as
//| green, and the final 5 as blue. The object can be any buffer, but //| green, and the final 5 as blue. The object can be any buffer, but
//| `array.array` and `ulab.array` objects are most often useful. //| `array.array` and ``ulab.ndarray`` objects are most often useful.
//| To update the content, modify the framebuffer and call refresh. //| To update the content, modify the framebuffer and call refresh.
//| //|
//| If a framebuffer is not passed in, one is allocated and initialized //| If a framebuffer is not passed in, one is allocated and initialized