From c592bd612ad8231f61681aa40cd51b6bbfcb307f Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 14 Feb 2020 15:12:20 -0500 Subject: Implement to_bytes(..., signed=True) --- tests/basics/int_bytes.py | 12 +++++++++++- tests/basics/int_bytes_intbig.py | 8 +++++++- tests/basics/int_longint_bytes.py | 1 + 3 files changed, 19 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/basics/int_bytes.py b/tests/basics/int_bytes.py index aaf440081..d42afac1f 100644 --- a/tests/basics/int_bytes.py +++ b/tests/basics/int_bytes.py @@ -1,8 +1,11 @@ print((10).to_bytes(1, "little")) +print((-10).to_bytes(1, "little", signed=True)) # Test fitting in length that's not a power of two. print((0x10000).to_bytes(3, 'little')) print((111111).to_bytes(4, "little")) +print((-111111).to_bytes(4, "little", signed=True)) print((100).to_bytes(10, "little")) +print((-100).to_bytes(10, "little", signed=True)) # check that extra zero bytes don't change the internal int value print(int.from_bytes(bytes(20), "little") == 0) @@ -10,7 +13,9 @@ print(int.from_bytes(b"\x01" + bytes(20), "little") == 1) # big-endian conversion print((10).to_bytes(1, "big")) +print((-10).to_bytes(1, "big", signed=True)) print((100).to_bytes(10, "big")) +print((-100).to_bytes(10, "big", signed=True)) print(int.from_bytes(b"\0\0\0\0\0\0\0\0\0\x01", "big")) print(int.from_bytes(b"\x01\0", "big")) @@ -26,8 +31,13 @@ try: except OverflowError: print("OverflowError") -# negative numbers should raise an error +# negative numbers should raise an error if signed=False try: (-256).to_bytes(2, "little") except OverflowError: print("OverflowError") + +try: + (-256).to_bytes(2, "little", signed=False) +except OverflowError: + print("OverflowError") diff --git a/tests/basics/int_bytes_intbig.py b/tests/basics/int_bytes_intbig.py index b19c8ae53..a9f069902 100644 --- a/tests/basics/int_bytes_intbig.py +++ b/tests/basics/int_bytes_intbig.py @@ -2,7 +2,9 @@ import skip_if skip_if.no_bigint() print((2**64).to_bytes(9, "little")) +print((-2**64).to_bytes(9, "little", signed=True)) print((2**64).to_bytes(9, "big")) +print((-2**64).to_bytes(9, "big", signed=True)) b = bytes(range(20)) @@ -22,8 +24,12 @@ try: except OverflowError: print("OverflowError") -# negative numbers should raise an error +# negative numbers should raise an error if signed=False try: (-2**64).to_bytes(9, "little") except OverflowError: print("OverflowError") +try: + (-2**64).to_bytes(9, "little", signed=False) +except OverflowError: + print("OverflowError") diff --git a/tests/basics/int_longint_bytes.py b/tests/basics/int_longint_bytes.py index 42e445f53..90cbff2f8 100644 --- a/tests/basics/int_longint_bytes.py +++ b/tests/basics/int_longint_bytes.py @@ -3,6 +3,7 @@ import skip_if skip_if.no_bigint() print((2**64).to_bytes(9, "little")) +print((-2**64).to_bytes(9, "little", signed=True)) print(int.from_bytes(b"\x00\x01\0\0\0\0\0\0", "little")) print(int.from_bytes(b"\x01\0\0\0\0\0\0\0", "little")) print(int.from_bytes(b"\x00\x01\0\0\0\0\0\0", "little")) -- cgit v1.2.3 From fa3b9eba926525751d0968aef88317ce5ad25003 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 4 Feb 2020 10:24:37 -0600 Subject: ulab: Incorporate it --- .gitmodules | 3 + extmod/ulab | 1 + locale/ID.po | 209 +++++++++- locale/circuitpython.pot | 209 +++++++++- locale/de_DE.po | 209 +++++++++- locale/en_US.po | 209 +++++++++- locale/en_x_pirate.po | 209 +++++++++- locale/es.po | 209 +++++++++- locale/fil.po | 209 +++++++++- locale/fr.po | 209 +++++++++- locale/it_IT.po | 209 +++++++++- locale/ko.po | 209 +++++++++- locale/pl.po | 209 +++++++++- locale/pt_BR.po | 209 +++++++++- locale/zh_Latn_pinyin.po | 209 +++++++++- .../boards/kicksat-sprite/mpconfigboard.mk | 2 + ports/atmel-samd/mpconfigport.mk | 6 + ports/nrf/mpconfigport.mk | 1 + ports/unix/mpconfigport.mk | 2 + py/builtin.h | 7 + py/circuitpy_defns.mk | 13 + py/circuitpy_mpconfig.h | 6 + py/mpconfig.h | 4 + py/objmodule.c | 8 + py/py.mk | 15 + shared-bindings/audiocore/RawSample.c | 2 +- shared-bindings/ulab/__init__.rst | 459 +++++++++++++++++++++ tests/run-tests | 2 +- tests/ulab/smoke.py | 84 ++++ tests/ulab/smoke.py.exp | 0 30 files changed, 3304 insertions(+), 28 deletions(-) create mode 160000 extmod/ulab create mode 100644 shared-bindings/ulab/__init__.rst create mode 100644 tests/ulab/smoke.py create mode 100644 tests/ulab/smoke.py.exp (limited to 'tests') diff --git a/.gitmodules b/.gitmodules index 88d46f69d..a8748efbe 100644 --- a/.gitmodules +++ b/.gitmodules @@ -114,3 +114,6 @@ [submodule "frozen/Adafruit_CircuitPython_Register"] path = frozen/Adafruit_CircuitPython_Register url = https://github.com/adafruit/Adafruit_CircuitPython_Register.git +[submodule "extmod/ulab"] + path = extmod/ulab + url = https://github.com/adafruit/circuitpython-ulab diff --git a/extmod/ulab b/extmod/ulab new file mode 160000 index 000000000..6b9ea24b2 --- /dev/null +++ b/extmod/ulab @@ -0,0 +1 @@ +Subproject commit 6b9ea24b2e57e200d9e2e0f41f6836b1fd73c348 diff --git a/locale/ID.po b/locale/ID.po index 01f461392..07d224104 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-19 08:44+0000\n" +"POT-Creation-Date: 2020-02-27 11:02-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -684,6 +684,10 @@ msgstr "" msgid "Extended advertisements with scan response not supported." msgstr "" +#: extmod/ulab/code/fft.c +msgid "FFT is defined for ndarrays only" +msgstr "" + #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." msgstr "" @@ -1133,6 +1137,7 @@ msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" +#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/stm32f4/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" @@ -1593,6 +1598,10 @@ msgstr "" msgid "arg is an empty sequence" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "argsort argument must be an ndarray" +msgstr "" + #: py/runtime.c msgid "argument has wrong type" msgstr "" @@ -1606,6 +1615,10 @@ msgstr "argumen num/types tidak cocok" msgid "argument should be a '%q' not a '%q'" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "arguments must be ndarrays" +msgstr "" + #: py/objarray.c shared-bindings/nvm/ByteArray.c msgid "array/bytes required on right side" msgstr "" @@ -1614,6 +1627,18 @@ msgstr "" msgid "attributes not supported yet" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, None, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be None, 0, or 1" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "mode compile buruk" @@ -1857,6 +1882,10 @@ msgstr "" msgid "cannot perform relative import" msgstr "tidak dapat melakukan relative import" +#: extmod/ulab/code/ndarray.c +msgid "cannot reshape array (incompatible input/output shape)" +msgstr "" + #: py/emitnative.c msgid "casting" msgstr "" @@ -1913,6 +1942,30 @@ msgstr "" msgid "conversion to object" msgstr "" +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be linear arrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must not be empty" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "could not broadast input array from shape" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "could not invert Vandermonde matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "ddof must be smaller than length of data set" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "" @@ -1938,6 +1991,10 @@ msgstr "" msgid "dict update sequence has wrong length" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "diff argument must be an ndarray" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -1951,6 +2008,10 @@ msgstr "" msgid "empty heap" msgstr "heap kosong" +#: extmod/ulab/code/ndarray.c +msgid "empty index range" +msgstr "" + #: py/objstr.c msgid "empty separator" msgstr "" @@ -2017,6 +2078,10 @@ msgstr "" msgid "filesystem must provide mount method" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "first argument must be an iterable" +msgstr "" + #: py/objtype.c msgid "first argument to super() must be type" msgstr "" @@ -2025,6 +2090,14 @@ msgstr "" msgid "firstbit must be MSB" msgstr "bit pertama(firstbit) harus berupa MSB" +#: extmod/ulab/code/ndarray.c +msgid "flattening order must be either 'C', or 'F'" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "flip argument must be an ndarray" +msgstr "" + #: py/objint.c msgid "float too big" msgstr "" @@ -2041,6 +2114,10 @@ msgstr "" msgid "full" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "function defined for ndarrays only" +msgstr "" + #: py/argcheck.c msgid "function does not take keyword arguments" msgstr "fungsi tidak dapat mengambil argumen keyword" @@ -2117,6 +2194,10 @@ msgstr "" msgid "incorrect padding" msgstr "lapisan (padding) tidak benar" +#: extmod/ulab/code/ndarray.c +msgid "index is out of bounds" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c @@ -2127,10 +2208,46 @@ msgstr "index keluar dari jangkauan" msgid "indices must be integers" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "indices must be integers, slices, or Boolean lists" +msgstr "" + #: py/compile.c msgid "inline assembler must be a function" msgstr "inline assembler harus sebuah fungsi" +#: extmod/ulab/code/linalg.c +msgid "input argument must be an integer or a 2-tuple" +msgstr "" + +#: extmod/ulab/code/fft.c +msgid "input array length must be power of 2" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input data must be an iterable" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is asymmetric" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is singular" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input must be square matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "input must be tuple, list, range, or ndarray" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input vectors must be of equal length" +msgstr "" + #: py/parsenum.c msgid "int() arg 2 must be >= 2 and <= 36" msgstr "" @@ -2209,6 +2326,14 @@ msgstr "" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "iterables are not of the same length" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "iterations did not converge" +msgstr "" + #: py/objstr.c msgid "join expects a list of str/bytes objects consistent with self object" msgstr "" @@ -2265,6 +2390,10 @@ msgstr "" msgid "math domain error" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c #, c-format @@ -2288,6 +2417,10 @@ msgstr "" msgid "module not found" msgstr "modul tidak ditemukan" +#: extmod/ulab/code/poly.c +msgid "more degrees of freedom than data points" +msgstr "" + #: py/compile.c msgid "multiple *x in assignment" msgstr "perkalian *x dalam assignment" @@ -2312,6 +2445,10 @@ msgstr "harus menentukan semua pin sck/mosi/miso" msgid "must use keyword argument for key function" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "n must be between 0, and 9" +msgstr "" + #: py/runtime.c msgid "name '%q' is not defined" msgstr "" @@ -2398,6 +2535,14 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" +#: extmod/ulab/code/poly.c +msgid "number of arguments must be 2, or 3" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "number of points must be at least 2" +msgstr "" + #: py/obj.c #, c-format msgid "object '%s' is not a tuple or list" @@ -2457,6 +2602,14 @@ msgstr "modul tidak ditemukan" msgid "only bit_depth=16 is supported" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "only ndarray objects can be inverted" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "only ndarrays can be inverted" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" @@ -2466,6 +2619,22 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "only square matrices can be inverted" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operands could not be broadcast together" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "operation is not implemented on ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is not supported for given type" +msgstr "" + #: py/modbuiltins.c msgid "ord expects a character" msgstr "" @@ -2541,6 +2710,10 @@ msgstr "" msgid "queue overflow" msgstr "antrian meluap (overflow)" +#: extmod/ulab/code/fft.c +msgid "real and imaginary parts must be of equal length" +msgstr "" + #: py/builtinimport.c msgid "relative import" msgstr "relative import" @@ -2558,6 +2731,10 @@ msgstr "anotasi return harus sebuah identifier" msgid "return expected '%q' but got '%q'" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "right hand side must be an ndarray, or a scalar" +msgstr "" + #: py/objstr.c msgid "rsplit(None,n)" msgstr "" @@ -2580,6 +2757,10 @@ msgstr "" msgid "script compilation not supported" msgstr "kompilasi script tidak didukung" +#: extmod/ulab/code/ndarray.c +msgid "shape must be a 2-tuple" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "" @@ -2592,6 +2773,10 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "size is defined for ndarrays only" +msgstr "" + #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" msgstr "" @@ -2608,6 +2793,10 @@ msgstr "" msgid "soft reboot\n" msgstr "memulai ulang software(soft reboot)\n" +#: extmod/ulab/code/numerical.c +msgid "sort argument must be an ndarray" +msgstr "" + #: py/objstr.c msgid "start/end indices" msgstr "" @@ -2698,12 +2887,16 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "too many indices" +msgstr "" + #: py/runtime.c #, c-format msgid "too many values to unpack (expected %d)" msgstr "" -#: py/objstr.c +#: extmod/ulab/code/linalg.c py/objstr.c msgid "tuple index out of range" msgstr "" @@ -2834,6 +3027,14 @@ msgstr "" msgid "window must be <= interval" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "wrong argument type" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "wrong input type" +msgstr "" + #: py/objstr.c msgid "wrong number of arguments" msgstr "" @@ -2842,6 +3043,10 @@ msgstr "" msgid "wrong number of values to unpack" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "wrong operand type on the right hand side" +msgstr "" + #: shared-module/displayio/Shape.c msgid "x value out of bounds" msgstr "" diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 354dbc4ba..9f6fee54f 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-19 08:44+0000\n" +"POT-Creation-Date: 2020-02-27 11:02-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -673,6 +673,10 @@ msgstr "" msgid "Extended advertisements with scan response not supported." msgstr "" +#: extmod/ulab/code/fft.c +msgid "FFT is defined for ndarrays only" +msgstr "" + #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." msgstr "" @@ -1121,6 +1125,7 @@ msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" +#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/stm32f4/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" @@ -1570,6 +1575,10 @@ msgstr "" msgid "arg is an empty sequence" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "argsort argument must be an ndarray" +msgstr "" + #: py/runtime.c msgid "argument has wrong type" msgstr "" @@ -1583,6 +1592,10 @@ msgstr "" msgid "argument should be a '%q' not a '%q'" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "arguments must be ndarrays" +msgstr "" + #: py/objarray.c shared-bindings/nvm/ByteArray.c msgid "array/bytes required on right side" msgstr "" @@ -1591,6 +1604,18 @@ msgstr "" msgid "attributes not supported yet" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, None, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be None, 0, or 1" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "" @@ -1833,6 +1858,10 @@ msgstr "" msgid "cannot perform relative import" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot reshape array (incompatible input/output shape)" +msgstr "" + #: py/emitnative.c msgid "casting" msgstr "" @@ -1889,6 +1918,30 @@ msgstr "" msgid "conversion to object" msgstr "" +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be linear arrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must not be empty" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "could not broadast input array from shape" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "could not invert Vandermonde matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "ddof must be smaller than length of data set" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "" @@ -1914,6 +1967,10 @@ msgstr "" msgid "dict update sequence has wrong length" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "diff argument must be an ndarray" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -1927,6 +1984,10 @@ msgstr "" msgid "empty heap" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "empty index range" +msgstr "" + #: py/objstr.c msgid "empty separator" msgstr "" @@ -1993,6 +2054,10 @@ msgstr "" msgid "filesystem must provide mount method" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "first argument must be an iterable" +msgstr "" + #: py/objtype.c msgid "first argument to super() must be type" msgstr "" @@ -2001,6 +2066,14 @@ msgstr "" msgid "firstbit must be MSB" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "flattening order must be either 'C', or 'F'" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "flip argument must be an ndarray" +msgstr "" + #: py/objint.c msgid "float too big" msgstr "" @@ -2017,6 +2090,10 @@ msgstr "" msgid "full" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "function defined for ndarrays only" +msgstr "" + #: py/argcheck.c msgid "function does not take keyword arguments" msgstr "" @@ -2093,6 +2170,10 @@ msgstr "" msgid "incorrect padding" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "index is out of bounds" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c @@ -2103,10 +2184,46 @@ msgstr "" msgid "indices must be integers" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "indices must be integers, slices, or Boolean lists" +msgstr "" + #: py/compile.c msgid "inline assembler must be a function" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "input argument must be an integer or a 2-tuple" +msgstr "" + +#: extmod/ulab/code/fft.c +msgid "input array length must be power of 2" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input data must be an iterable" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is asymmetric" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is singular" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input must be square matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "input must be tuple, list, range, or ndarray" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input vectors must be of equal length" +msgstr "" + #: py/parsenum.c msgid "int() arg 2 must be >= 2 and <= 36" msgstr "" @@ -2185,6 +2302,14 @@ msgstr "" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "iterables are not of the same length" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "iterations did not converge" +msgstr "" + #: py/objstr.c msgid "join expects a list of str/bytes objects consistent with self object" msgstr "" @@ -2241,6 +2366,10 @@ msgstr "" msgid "math domain error" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c #, c-format @@ -2264,6 +2393,10 @@ msgstr "" msgid "module not found" msgstr "" +#: extmod/ulab/code/poly.c +msgid "more degrees of freedom than data points" +msgstr "" + #: py/compile.c msgid "multiple *x in assignment" msgstr "" @@ -2288,6 +2421,10 @@ msgstr "" msgid "must use keyword argument for key function" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "n must be between 0, and 9" +msgstr "" + #: py/runtime.c msgid "name '%q' is not defined" msgstr "" @@ -2374,6 +2511,14 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" +#: extmod/ulab/code/poly.c +msgid "number of arguments must be 2, or 3" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "number of points must be at least 2" +msgstr "" + #: py/obj.c #, c-format msgid "object '%s' is not a tuple or list" @@ -2432,6 +2577,14 @@ msgstr "" msgid "only bit_depth=16 is supported" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "only ndarray objects can be inverted" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "only ndarrays can be inverted" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" @@ -2441,6 +2594,22 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "only square matrices can be inverted" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operands could not be broadcast together" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "operation is not implemented on ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is not supported for given type" +msgstr "" + #: py/modbuiltins.c msgid "ord expects a character" msgstr "" @@ -2516,6 +2685,10 @@ msgstr "" msgid "queue overflow" msgstr "" +#: extmod/ulab/code/fft.c +msgid "real and imaginary parts must be of equal length" +msgstr "" + #: py/builtinimport.c msgid "relative import" msgstr "" @@ -2533,6 +2706,10 @@ msgstr "" msgid "return expected '%q' but got '%q'" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "right hand side must be an ndarray, or a scalar" +msgstr "" + #: py/objstr.c msgid "rsplit(None,n)" msgstr "" @@ -2555,6 +2732,10 @@ msgstr "" msgid "script compilation not supported" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "shape must be a 2-tuple" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "" @@ -2567,6 +2748,10 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "size is defined for ndarrays only" +msgstr "" + #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" msgstr "" @@ -2583,6 +2768,10 @@ msgstr "" msgid "soft reboot\n" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "sort argument must be an ndarray" +msgstr "" + #: py/objstr.c msgid "start/end indices" msgstr "" @@ -2672,12 +2861,16 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "too many indices" +msgstr "" + #: py/runtime.c #, c-format msgid "too many values to unpack (expected %d)" msgstr "" -#: py/objstr.c +#: extmod/ulab/code/linalg.c py/objstr.c msgid "tuple index out of range" msgstr "" @@ -2808,6 +3001,14 @@ msgstr "" msgid "window must be <= interval" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "wrong argument type" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "wrong input type" +msgstr "" + #: py/objstr.c msgid "wrong number of arguments" msgstr "" @@ -2816,6 +3017,10 @@ msgstr "" msgid "wrong number of values to unpack" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "wrong operand type on the right hand side" +msgstr "" + #: shared-module/displayio/Shape.c msgid "x value out of bounds" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 056f56d74..43d1bb624 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-19 08:44+0000\n" +"POT-Creation-Date: 2020-02-27 11:02-0600\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: Pascal Deneaux\n" "Language-Team: Sebastian Plamauer, Pascal Deneaux\n" @@ -677,6 +677,10 @@ msgstr "Habe ein Tupel der Länge %d erwartet aber %d erhalten" msgid "Extended advertisements with scan response not supported." msgstr "" +#: extmod/ulab/code/fft.c +msgid "FFT is defined for ndarrays only" +msgstr "" + #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." msgstr "Kommando nicht gesendet." @@ -1136,6 +1140,7 @@ msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "Die PWM-Frequenz ist nicht schreibbar wenn variable_Frequenz = False." +#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/stm32f4/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" @@ -1598,6 +1603,10 @@ msgstr "adresses ist leer" msgid "arg is an empty sequence" msgstr "arg ist eine leere Sequenz" +#: extmod/ulab/code/numerical.c +msgid "argsort argument must be an ndarray" +msgstr "" + #: py/runtime.c msgid "argument has wrong type" msgstr "Argument hat falschen Typ" @@ -1611,6 +1620,10 @@ msgstr "Anzahl/Type der Argumente passen nicht" msgid "argument should be a '%q' not a '%q'" msgstr "Argument sollte '%q' sein, nicht '%q'" +#: extmod/ulab/code/linalg.c +msgid "arguments must be ndarrays" +msgstr "" + #: py/objarray.c shared-bindings/nvm/ByteArray.c msgid "array/bytes required on right side" msgstr "Array/Bytes auf der rechten Seite erforderlich" @@ -1619,6 +1632,18 @@ msgstr "Array/Bytes auf der rechten Seite erforderlich" msgid "attributes not supported yet" msgstr "Attribute werden noch nicht unterstützt" +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, None, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be None, 0, or 1" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "" @@ -1861,6 +1886,10 @@ msgstr "Name %q kann nicht importiert werden" msgid "cannot perform relative import" msgstr "kann keinen relativen Import durchführen" +#: extmod/ulab/code/ndarray.c +msgid "cannot reshape array (incompatible input/output shape)" +msgstr "" + #: py/emitnative.c msgid "casting" msgstr "" @@ -1918,6 +1947,30 @@ msgstr "constant muss ein integer sein" msgid "conversion to object" msgstr "Umwandlung zu Objekt" +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be linear arrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must not be empty" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "could not broadast input array from shape" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "could not invert Vandermonde matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "ddof must be smaller than length of data set" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "Dezimalzahlen nicht unterstützt" @@ -1943,6 +1996,10 @@ msgstr "destination_length muss ein int >= 0 sein" msgid "dict update sequence has wrong length" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "diff argument must be an ndarray" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -1956,6 +2013,10 @@ msgstr "leer" msgid "empty heap" msgstr "leerer heap" +#: extmod/ulab/code/ndarray.c +msgid "empty index range" +msgstr "" + #: py/objstr.c msgid "empty separator" msgstr "leeres Trennzeichen" @@ -2022,6 +2083,10 @@ msgstr "Die Datei muss eine im Byte-Modus geöffnete Datei sein" msgid "filesystem must provide mount method" msgstr "Das Dateisystem muss eine Mount-Methode bereitstellen" +#: extmod/ulab/code/ndarray.c +msgid "first argument must be an iterable" +msgstr "" + #: py/objtype.c msgid "first argument to super() must be type" msgstr "Das erste Argument für super() muss type sein" @@ -2030,6 +2095,14 @@ msgstr "Das erste Argument für super() muss type sein" msgid "firstbit must be MSB" msgstr "Erstes Bit muss das höchstwertigste Bit (MSB) sein" +#: extmod/ulab/code/ndarray.c +msgid "flattening order must be either 'C', or 'F'" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "flip argument must be an ndarray" +msgstr "" + #: py/objint.c msgid "float too big" msgstr "float zu groß" @@ -2046,6 +2119,10 @@ msgstr "" msgid "full" msgstr "voll" +#: extmod/ulab/code/linalg.c +msgid "function defined for ndarrays only" +msgstr "" + #: py/argcheck.c msgid "function does not take keyword arguments" msgstr "Funktion akzeptiert keine Keyword-Argumente" @@ -2123,6 +2200,10 @@ msgstr "unvollständiger Formatschlüssel" msgid "incorrect padding" msgstr "padding ist inkorrekt" +#: extmod/ulab/code/ndarray.c +msgid "index is out of bounds" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c @@ -2133,10 +2214,46 @@ msgstr "index außerhalb der Reichweite" msgid "indices must be integers" msgstr "Indizes müssen ganze Zahlen sein" +#: extmod/ulab/code/ndarray.c +msgid "indices must be integers, slices, or Boolean lists" +msgstr "" + #: py/compile.c msgid "inline assembler must be a function" msgstr "inline assembler muss eine function sein" +#: extmod/ulab/code/linalg.c +msgid "input argument must be an integer or a 2-tuple" +msgstr "" + +#: extmod/ulab/code/fft.c +msgid "input array length must be power of 2" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input data must be an iterable" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is asymmetric" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is singular" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input must be square matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "input must be tuple, list, range, or ndarray" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input vectors must be of equal length" +msgstr "" + #: py/parsenum.c msgid "int() arg 2 must be >= 2 and <= 36" msgstr "int() arg 2 muss >= 2 und <= 36 sein" @@ -2215,6 +2332,14 @@ msgstr "issubclass() arg 1 muss eine Klasse sein" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "issubclass() arg 2 muss eine Klasse oder ein Tupel von Klassen sein" +#: extmod/ulab/code/ndarray.c +msgid "iterables are not of the same length" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "iterations did not converge" +msgstr "" + #: py/objstr.c msgid "join expects a list of str/bytes objects consistent with self object" msgstr "" @@ -2277,6 +2402,10 @@ msgstr "map buffer zu klein" msgid "math domain error" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c #, c-format @@ -2300,6 +2429,10 @@ msgstr "Speicherzuweisung fehlgeschlagen, der Heap ist gesperrt" msgid "module not found" msgstr "Modul nicht gefunden" +#: extmod/ulab/code/poly.c +msgid "more degrees of freedom than data points" +msgstr "" + #: py/compile.c msgid "multiple *x in assignment" msgstr "mehrere *x in Zuordnung" @@ -2324,6 +2457,10 @@ msgstr "sck/mosi/miso müssen alle spezifiziert sein" msgid "must use keyword argument for key function" msgstr "muss Schlüsselwortargument für key function verwenden" +#: extmod/ulab/code/numerical.c +msgid "n must be between 0, and 9" +msgstr "" + #: py/runtime.c msgid "name '%q' is not defined" msgstr "Name '%q' ist nirgends definiert worden (Schreibweise kontrollieren)" @@ -2410,6 +2547,14 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" +#: extmod/ulab/code/poly.c +msgid "number of arguments must be 2, or 3" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "number of points must be at least 2" +msgstr "" + #: py/obj.c #, c-format msgid "object '%s' is not a tuple or list" @@ -2468,6 +2613,14 @@ msgstr "offset außerhalb der Grenzen" msgid "only bit_depth=16 is supported" msgstr "nur eine bit_depth=16 wird unterstützt" +#: extmod/ulab/code/linalg.c +msgid "only ndarray objects can be inverted" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "only ndarrays can be inverted" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "nur eine sample_rate=16000 wird unterstützt" @@ -2477,6 +2630,22 @@ msgstr "nur eine sample_rate=16000 wird unterstützt" msgid "only slices with step=1 (aka None) are supported" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "only square matrices can be inverted" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operands could not be broadcast together" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "operation is not implemented on ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is not supported for given type" +msgstr "" + #: py/modbuiltins.c msgid "ord expects a character" msgstr "ord erwartet ein Zeichen" @@ -2554,6 +2723,10 @@ msgstr "" msgid "queue overflow" msgstr "Warteschlangenüberlauf" +#: extmod/ulab/code/fft.c +msgid "real and imaginary parts must be of equal length" +msgstr "" + #: py/builtinimport.c msgid "relative import" msgstr "relativer Import" @@ -2571,6 +2744,10 @@ msgstr "return annotation muss ein identifier sein" msgid "return expected '%q' but got '%q'" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "right hand side must be an ndarray, or a scalar" +msgstr "" + #: py/objstr.c msgid "rsplit(None,n)" msgstr "" @@ -2595,6 +2772,10 @@ msgstr "Der schedule stack ist voll" msgid "script compilation not supported" msgstr "kompilieren von Skripten nicht unterstützt" +#: extmod/ulab/code/ndarray.c +msgid "shape must be a 2-tuple" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "" @@ -2607,6 +2788,10 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "size is defined for ndarrays only" +msgstr "" + #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" msgstr "" @@ -2623,6 +2808,10 @@ msgstr "small int Überlauf" msgid "soft reboot\n" msgstr "weicher reboot\n" +#: extmod/ulab/code/numerical.c +msgid "sort argument must be an ndarray" +msgstr "" + #: py/objstr.c msgid "start/end indices" msgstr "start/end Indizes" @@ -2713,12 +2902,16 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "too many indices" +msgstr "" + #: py/runtime.c #, c-format msgid "too many values to unpack (expected %d)" msgstr "" -#: py/objstr.c +#: extmod/ulab/code/linalg.c py/objstr.c msgid "tuple index out of range" msgstr "" @@ -2853,6 +3046,14 @@ msgstr "value_count muss größer als 0 sein" msgid "window must be <= interval" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "wrong argument type" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "wrong input type" +msgstr "" + #: py/objstr.c msgid "wrong number of arguments" msgstr "falsche Anzahl an Argumenten" @@ -2861,6 +3062,10 @@ msgstr "falsche Anzahl an Argumenten" msgid "wrong number of values to unpack" msgstr "falsche Anzahl zu entpackender Werte" +#: extmod/ulab/code/ndarray.c +msgid "wrong operand type on the right hand side" +msgstr "" + #: shared-module/displayio/Shape.c msgid "x value out of bounds" msgstr "x Wert außerhalb der Grenzen" diff --git a/locale/en_US.po b/locale/en_US.po index 58c798ce4..58b9d4df2 100644 --- a/locale/en_US.po +++ b/locale/en_US.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-19 08:44+0000\n" +"POT-Creation-Date: 2020-02-27 11:02-0600\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: \n" "Language-Team: \n" @@ -673,6 +673,10 @@ msgstr "" msgid "Extended advertisements with scan response not supported." msgstr "" +#: extmod/ulab/code/fft.c +msgid "FFT is defined for ndarrays only" +msgstr "" + #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." msgstr "" @@ -1121,6 +1125,7 @@ msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" +#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/stm32f4/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" @@ -1570,6 +1575,10 @@ msgstr "" msgid "arg is an empty sequence" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "argsort argument must be an ndarray" +msgstr "" + #: py/runtime.c msgid "argument has wrong type" msgstr "" @@ -1583,6 +1592,10 @@ msgstr "" msgid "argument should be a '%q' not a '%q'" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "arguments must be ndarrays" +msgstr "" + #: py/objarray.c shared-bindings/nvm/ByteArray.c msgid "array/bytes required on right side" msgstr "" @@ -1591,6 +1604,18 @@ msgstr "" msgid "attributes not supported yet" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, None, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be None, 0, or 1" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "" @@ -1833,6 +1858,10 @@ msgstr "" msgid "cannot perform relative import" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot reshape array (incompatible input/output shape)" +msgstr "" + #: py/emitnative.c msgid "casting" msgstr "" @@ -1889,6 +1918,30 @@ msgstr "" msgid "conversion to object" msgstr "" +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be linear arrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must not be empty" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "could not broadast input array from shape" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "could not invert Vandermonde matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "ddof must be smaller than length of data set" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "" @@ -1914,6 +1967,10 @@ msgstr "" msgid "dict update sequence has wrong length" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "diff argument must be an ndarray" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -1927,6 +1984,10 @@ msgstr "" msgid "empty heap" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "empty index range" +msgstr "" + #: py/objstr.c msgid "empty separator" msgstr "" @@ -1993,6 +2054,10 @@ msgstr "" msgid "filesystem must provide mount method" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "first argument must be an iterable" +msgstr "" + #: py/objtype.c msgid "first argument to super() must be type" msgstr "" @@ -2001,6 +2066,14 @@ msgstr "" msgid "firstbit must be MSB" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "flattening order must be either 'C', or 'F'" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "flip argument must be an ndarray" +msgstr "" + #: py/objint.c msgid "float too big" msgstr "" @@ -2017,6 +2090,10 @@ msgstr "" msgid "full" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "function defined for ndarrays only" +msgstr "" + #: py/argcheck.c msgid "function does not take keyword arguments" msgstr "" @@ -2093,6 +2170,10 @@ msgstr "" msgid "incorrect padding" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "index is out of bounds" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c @@ -2103,10 +2184,46 @@ msgstr "" msgid "indices must be integers" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "indices must be integers, slices, or Boolean lists" +msgstr "" + #: py/compile.c msgid "inline assembler must be a function" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "input argument must be an integer or a 2-tuple" +msgstr "" + +#: extmod/ulab/code/fft.c +msgid "input array length must be power of 2" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input data must be an iterable" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is asymmetric" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is singular" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input must be square matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "input must be tuple, list, range, or ndarray" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input vectors must be of equal length" +msgstr "" + #: py/parsenum.c msgid "int() arg 2 must be >= 2 and <= 36" msgstr "" @@ -2185,6 +2302,14 @@ msgstr "" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "iterables are not of the same length" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "iterations did not converge" +msgstr "" + #: py/objstr.c msgid "join expects a list of str/bytes objects consistent with self object" msgstr "" @@ -2241,6 +2366,10 @@ msgstr "" msgid "math domain error" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c #, c-format @@ -2264,6 +2393,10 @@ msgstr "" msgid "module not found" msgstr "" +#: extmod/ulab/code/poly.c +msgid "more degrees of freedom than data points" +msgstr "" + #: py/compile.c msgid "multiple *x in assignment" msgstr "" @@ -2288,6 +2421,10 @@ msgstr "" msgid "must use keyword argument for key function" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "n must be between 0, and 9" +msgstr "" + #: py/runtime.c msgid "name '%q' is not defined" msgstr "" @@ -2374,6 +2511,14 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" +#: extmod/ulab/code/poly.c +msgid "number of arguments must be 2, or 3" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "number of points must be at least 2" +msgstr "" + #: py/obj.c #, c-format msgid "object '%s' is not a tuple or list" @@ -2432,6 +2577,14 @@ msgstr "" msgid "only bit_depth=16 is supported" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "only ndarray objects can be inverted" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "only ndarrays can be inverted" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" @@ -2441,6 +2594,22 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "only square matrices can be inverted" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operands could not be broadcast together" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "operation is not implemented on ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is not supported for given type" +msgstr "" + #: py/modbuiltins.c msgid "ord expects a character" msgstr "" @@ -2516,6 +2685,10 @@ msgstr "" msgid "queue overflow" msgstr "" +#: extmod/ulab/code/fft.c +msgid "real and imaginary parts must be of equal length" +msgstr "" + #: py/builtinimport.c msgid "relative import" msgstr "" @@ -2533,6 +2706,10 @@ msgstr "" msgid "return expected '%q' but got '%q'" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "right hand side must be an ndarray, or a scalar" +msgstr "" + #: py/objstr.c msgid "rsplit(None,n)" msgstr "" @@ -2555,6 +2732,10 @@ msgstr "" msgid "script compilation not supported" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "shape must be a 2-tuple" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "" @@ -2567,6 +2748,10 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "size is defined for ndarrays only" +msgstr "" + #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" msgstr "" @@ -2583,6 +2768,10 @@ msgstr "" msgid "soft reboot\n" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "sort argument must be an ndarray" +msgstr "" + #: py/objstr.c msgid "start/end indices" msgstr "" @@ -2672,12 +2861,16 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "too many indices" +msgstr "" + #: py/runtime.c #, c-format msgid "too many values to unpack (expected %d)" msgstr "" -#: py/objstr.c +#: extmod/ulab/code/linalg.c py/objstr.c msgid "tuple index out of range" msgstr "" @@ -2808,6 +3001,14 @@ msgstr "" msgid "window must be <= interval" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "wrong argument type" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "wrong input type" +msgstr "" + #: py/objstr.c msgid "wrong number of arguments" msgstr "" @@ -2816,6 +3017,10 @@ msgstr "" msgid "wrong number of values to unpack" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "wrong operand type on the right hand side" +msgstr "" + #: shared-module/displayio/Shape.c msgid "x value out of bounds" msgstr "" diff --git a/locale/en_x_pirate.po b/locale/en_x_pirate.po index e2ee9c887..9fd5ff4fe 100644 --- a/locale/en_x_pirate.po +++ b/locale/en_x_pirate.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-19 08:44+0000\n" +"POT-Creation-Date: 2020-02-27 11:02-0600\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: \n" "Language-Team: @sommersoft, @MrCertainly\n" @@ -677,6 +677,10 @@ msgstr "" msgid "Extended advertisements with scan response not supported." msgstr "" +#: extmod/ulab/code/fft.c +msgid "FFT is defined for ndarrays only" +msgstr "" + #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." msgstr "" @@ -1125,6 +1129,7 @@ msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" +#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/stm32f4/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" @@ -1574,6 +1579,10 @@ msgstr "" msgid "arg is an empty sequence" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "argsort argument must be an ndarray" +msgstr "" + #: py/runtime.c msgid "argument has wrong type" msgstr "" @@ -1587,6 +1596,10 @@ msgstr "" msgid "argument should be a '%q' not a '%q'" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "arguments must be ndarrays" +msgstr "" + #: py/objarray.c shared-bindings/nvm/ByteArray.c msgid "array/bytes required on right side" msgstr "" @@ -1595,6 +1608,18 @@ msgstr "" msgid "attributes not supported yet" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, None, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be None, 0, or 1" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "" @@ -1837,6 +1862,10 @@ msgstr "" msgid "cannot perform relative import" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot reshape array (incompatible input/output shape)" +msgstr "" + #: py/emitnative.c msgid "casting" msgstr "" @@ -1893,6 +1922,30 @@ msgstr "" msgid "conversion to object" msgstr "" +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be linear arrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must not be empty" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "could not broadast input array from shape" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "could not invert Vandermonde matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "ddof must be smaller than length of data set" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "" @@ -1918,6 +1971,10 @@ msgstr "" msgid "dict update sequence has wrong length" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "diff argument must be an ndarray" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -1931,6 +1988,10 @@ msgstr "" msgid "empty heap" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "empty index range" +msgstr "" + #: py/objstr.c msgid "empty separator" msgstr "" @@ -1997,6 +2058,10 @@ msgstr "" msgid "filesystem must provide mount method" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "first argument must be an iterable" +msgstr "" + #: py/objtype.c msgid "first argument to super() must be type" msgstr "" @@ -2005,6 +2070,14 @@ msgstr "" msgid "firstbit must be MSB" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "flattening order must be either 'C', or 'F'" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "flip argument must be an ndarray" +msgstr "" + #: py/objint.c msgid "float too big" msgstr "" @@ -2021,6 +2094,10 @@ msgstr "" msgid "full" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "function defined for ndarrays only" +msgstr "" + #: py/argcheck.c msgid "function does not take keyword arguments" msgstr "" @@ -2097,6 +2174,10 @@ msgstr "" msgid "incorrect padding" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "index is out of bounds" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c @@ -2107,10 +2188,46 @@ msgstr "" msgid "indices must be integers" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "indices must be integers, slices, or Boolean lists" +msgstr "" + #: py/compile.c msgid "inline assembler must be a function" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "input argument must be an integer or a 2-tuple" +msgstr "" + +#: extmod/ulab/code/fft.c +msgid "input array length must be power of 2" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input data must be an iterable" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is asymmetric" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is singular" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input must be square matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "input must be tuple, list, range, or ndarray" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input vectors must be of equal length" +msgstr "" + #: py/parsenum.c msgid "int() arg 2 must be >= 2 and <= 36" msgstr "" @@ -2189,6 +2306,14 @@ msgstr "" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "iterables are not of the same length" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "iterations did not converge" +msgstr "" + #: py/objstr.c msgid "join expects a list of str/bytes objects consistent with self object" msgstr "" @@ -2245,6 +2370,10 @@ msgstr "" msgid "math domain error" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c #, c-format @@ -2268,6 +2397,10 @@ msgstr "" msgid "module not found" msgstr "" +#: extmod/ulab/code/poly.c +msgid "more degrees of freedom than data points" +msgstr "" + #: py/compile.c msgid "multiple *x in assignment" msgstr "" @@ -2292,6 +2425,10 @@ msgstr "" msgid "must use keyword argument for key function" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "n must be between 0, and 9" +msgstr "" + #: py/runtime.c msgid "name '%q' is not defined" msgstr "" @@ -2378,6 +2515,14 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" +#: extmod/ulab/code/poly.c +msgid "number of arguments must be 2, or 3" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "number of points must be at least 2" +msgstr "" + #: py/obj.c #, c-format msgid "object '%s' is not a tuple or list" @@ -2436,6 +2581,14 @@ msgstr "" msgid "only bit_depth=16 is supported" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "only ndarray objects can be inverted" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "only ndarrays can be inverted" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" @@ -2445,6 +2598,22 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "only square matrices can be inverted" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operands could not be broadcast together" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "operation is not implemented on ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is not supported for given type" +msgstr "" + #: py/modbuiltins.c msgid "ord expects a character" msgstr "" @@ -2520,6 +2689,10 @@ msgstr "" msgid "queue overflow" msgstr "" +#: extmod/ulab/code/fft.c +msgid "real and imaginary parts must be of equal length" +msgstr "" + #: py/builtinimport.c msgid "relative import" msgstr "" @@ -2537,6 +2710,10 @@ msgstr "" msgid "return expected '%q' but got '%q'" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "right hand side must be an ndarray, or a scalar" +msgstr "" + #: py/objstr.c msgid "rsplit(None,n)" msgstr "" @@ -2559,6 +2736,10 @@ msgstr "" msgid "script compilation not supported" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "shape must be a 2-tuple" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "" @@ -2571,6 +2752,10 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "size is defined for ndarrays only" +msgstr "" + #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" msgstr "" @@ -2587,6 +2772,10 @@ msgstr "" msgid "soft reboot\n" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "sort argument must be an ndarray" +msgstr "" + #: py/objstr.c msgid "start/end indices" msgstr "" @@ -2676,12 +2865,16 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "too many indices" +msgstr "" + #: py/runtime.c #, c-format msgid "too many values to unpack (expected %d)" msgstr "" -#: py/objstr.c +#: extmod/ulab/code/linalg.c py/objstr.c msgid "tuple index out of range" msgstr "" @@ -2812,6 +3005,14 @@ msgstr "" msgid "window must be <= interval" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "wrong argument type" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "wrong input type" +msgstr "" + #: py/objstr.c msgid "wrong number of arguments" msgstr "" @@ -2820,6 +3021,10 @@ msgstr "" msgid "wrong number of values to unpack" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "wrong operand type on the right hand side" +msgstr "" + #: shared-module/displayio/Shape.c msgid "x value out of bounds" msgstr "" diff --git a/locale/es.po b/locale/es.po index 8d445a469..ebd2a1e93 100644 --- a/locale/es.po +++ b/locale/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-19 08:44+0000\n" +"POT-Creation-Date: 2020-02-27 11:02-0600\n" "PO-Revision-Date: 2018-08-24 22:56-0500\n" "Last-Translator: \n" "Language-Team: \n" @@ -679,6 +679,10 @@ msgstr "Se esperaba un tuple de %d, se obtuvo %d" msgid "Extended advertisements with scan response not supported." msgstr "" +#: extmod/ulab/code/fft.c +msgid "FFT is defined for ndarrays only" +msgstr "" + #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." msgstr "Fallo enviando comando" @@ -1135,6 +1139,7 @@ msgstr "" "PWM frecuencia no esta escrito cuando el variable_frequency es falso en " "construcion" +#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/stm32f4/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" @@ -1594,6 +1599,10 @@ msgstr "addresses esta vacío" msgid "arg is an empty sequence" msgstr "argumento es una secuencia vacía" +#: extmod/ulab/code/numerical.c +msgid "argsort argument must be an ndarray" +msgstr "" + #: py/runtime.c msgid "argument has wrong type" msgstr "el argumento tiene un tipo erroneo" @@ -1607,6 +1616,10 @@ msgstr "argumento número/tipos no coinciden" msgid "argument should be a '%q' not a '%q'" msgstr "argumento deberia ser un '%q' no un '%q'" +#: extmod/ulab/code/linalg.c +msgid "arguments must be ndarrays" +msgstr "" + #: py/objarray.c shared-bindings/nvm/ByteArray.c msgid "array/bytes required on right side" msgstr "array/bytes requeridos en el lado derecho" @@ -1615,6 +1628,18 @@ msgstr "array/bytes requeridos en el lado derecho" msgid "attributes not supported yet" msgstr "atributos aún no soportados" +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, None, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be None, 0, or 1" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "modo de compilación erroneo" @@ -1862,6 +1887,10 @@ msgstr "no se puede importar name '%q'" msgid "cannot perform relative import" msgstr "no se puedo realizar importación relativa" +#: extmod/ulab/code/ndarray.c +msgid "cannot reshape array (incompatible input/output shape)" +msgstr "" + #: py/emitnative.c msgid "casting" msgstr "" @@ -1918,6 +1947,30 @@ msgstr "constant debe ser un entero" msgid "conversion to object" msgstr "conversión a objeto" +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be linear arrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must not be empty" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "could not broadast input array from shape" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "could not invert Vandermonde matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "ddof must be smaller than length of data set" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "números decimales no soportados" @@ -1945,6 +1998,10 @@ msgstr "destination_length debe ser un int >= 0" msgid "dict update sequence has wrong length" msgstr "la secuencia de actualizacion del dict tiene una longitud incorrecta" +#: extmod/ulab/code/numerical.c +msgid "diff argument must be an ndarray" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -1958,6 +2015,10 @@ msgstr "vacío" msgid "empty heap" msgstr "heap vacío" +#: extmod/ulab/code/ndarray.c +msgid "empty index range" +msgstr "" + #: py/objstr.c msgid "empty separator" msgstr "separator vacío" @@ -2024,6 +2085,10 @@ msgstr "el archivo deberia ser una archivo abierto en modo byte" msgid "filesystem must provide mount method" msgstr "sistema de archivos debe proporcionar método de montaje" +#: extmod/ulab/code/ndarray.c +msgid "first argument must be an iterable" +msgstr "" + #: py/objtype.c msgid "first argument to super() must be type" msgstr "primer argumento para super() debe ser de tipo" @@ -2032,6 +2097,14 @@ msgstr "primer argumento para super() debe ser de tipo" msgid "firstbit must be MSB" msgstr "firstbit debe ser MSB" +#: extmod/ulab/code/ndarray.c +msgid "flattening order must be either 'C', or 'F'" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "flip argument must be an ndarray" +msgstr "" + #: py/objint.c msgid "float too big" msgstr "" @@ -2048,6 +2121,10 @@ msgstr "format requiere un dict" msgid "full" msgstr "lleno" +#: extmod/ulab/code/linalg.c +msgid "function defined for ndarrays only" +msgstr "" + #: py/argcheck.c msgid "function does not take keyword arguments" msgstr "la función no tiene argumentos por palabra clave" @@ -2124,6 +2201,10 @@ msgstr "" msgid "incorrect padding" msgstr "relleno (padding) incorrecto" +#: extmod/ulab/code/ndarray.c +msgid "index is out of bounds" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c @@ -2134,10 +2215,46 @@ msgstr "index fuera de rango" msgid "indices must be integers" msgstr "indices deben ser enteros" +#: extmod/ulab/code/ndarray.c +msgid "indices must be integers, slices, or Boolean lists" +msgstr "" + #: py/compile.c msgid "inline assembler must be a function" msgstr "ensamblador en línea debe ser una función" +#: extmod/ulab/code/linalg.c +msgid "input argument must be an integer or a 2-tuple" +msgstr "" + +#: extmod/ulab/code/fft.c +msgid "input array length must be power of 2" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input data must be an iterable" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is asymmetric" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is singular" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input must be square matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "input must be tuple, list, range, or ndarray" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input vectors must be of equal length" +msgstr "" + #: py/parsenum.c msgid "int() arg 2 must be >= 2 and <= 36" msgstr "int() arg 2 debe ser >= 2 y <= 36" @@ -2216,6 +2333,14 @@ msgstr "issubclass() arg 1 debe ser una clase" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "issubclass() arg 2 debe ser una clase o tuple de clases" +#: extmod/ulab/code/ndarray.c +msgid "iterables are not of the same length" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "iterations did not converge" +msgstr "" + #: py/objstr.c msgid "join expects a list of str/bytes objects consistent with self object" msgstr "" @@ -2275,6 +2400,10 @@ msgstr "map buffer muy pequeño" msgid "math domain error" msgstr "error de dominio matemático" +#: extmod/ulab/code/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c #, c-format @@ -2298,6 +2427,10 @@ msgstr "la asignación de memoria falló, el heap está bloqueado" msgid "module not found" msgstr "módulo no encontrado" +#: extmod/ulab/code/poly.c +msgid "more degrees of freedom than data points" +msgstr "" + #: py/compile.c msgid "multiple *x in assignment" msgstr "múltiples *x en la asignación" @@ -2322,6 +2455,10 @@ msgstr "se deben de especificar sck/mosi/miso" msgid "must use keyword argument for key function" msgstr "debe utilizar argumento de palabra clave para la función clave" +#: extmod/ulab/code/numerical.c +msgid "n must be between 0, and 9" +msgstr "" + #: py/runtime.c msgid "name '%q' is not defined" msgstr "name '%q' no esta definido" @@ -2411,6 +2548,14 @@ msgstr "" msgid "not enough arguments for format string" msgstr "no suficientes argumentos para format string" +#: extmod/ulab/code/poly.c +msgid "number of arguments must be 2, or 3" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "number of points must be at least 2" +msgstr "" + #: py/obj.c #, c-format msgid "object '%s' is not a tuple or list" @@ -2470,6 +2615,14 @@ msgstr "address fuera de límites" msgid "only bit_depth=16 is supported" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "only ndarray objects can be inverted" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "only ndarrays can be inverted" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" @@ -2479,6 +2632,22 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "solo se admiten segmentos con step=1 (alias None)" +#: extmod/ulab/code/linalg.c +msgid "only square matrices can be inverted" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operands could not be broadcast together" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "operation is not implemented on ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is not supported for given type" +msgstr "" + #: py/modbuiltins.c msgid "ord expects a character" msgstr "ord espera un carácter" @@ -2554,6 +2723,10 @@ msgstr "pow() con 3 argumentos requiere enteros" msgid "queue overflow" msgstr "desbordamiento de cola(queue)" +#: extmod/ulab/code/fft.c +msgid "real and imaginary parts must be of equal length" +msgstr "" + #: py/builtinimport.c msgid "relative import" msgstr "import relativo" @@ -2571,6 +2744,10 @@ msgstr "la anotación de retorno debe ser un identificador" msgid "return expected '%q' but got '%q'" msgstr "retorno esperado '%q' pero se obtuvo '%q'" +#: extmod/ulab/code/ndarray.c +msgid "right hand side must be an ndarray, or a scalar" +msgstr "" + #: py/objstr.c msgid "rsplit(None,n)" msgstr "rsplit(None,n)" @@ -2595,6 +2772,10 @@ msgstr "" msgid "script compilation not supported" msgstr "script de compilación no soportado" +#: extmod/ulab/code/ndarray.c +msgid "shape must be a 2-tuple" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "signo no permitido en el espeficador de string format" @@ -2607,6 +2788,10 @@ msgstr "signo no permitido con el especificador integer format 'c'" msgid "single '}' encountered in format string" msgstr "un solo '}' encontrado en format string" +#: extmod/ulab/code/linalg.c +msgid "size is defined for ndarrays only" +msgstr "" + #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" msgstr "la longitud de sleep no puede ser negativa" @@ -2623,6 +2808,10 @@ msgstr "pequeño int desbordamiento" msgid "soft reboot\n" msgstr "reinicio suave\n" +#: extmod/ulab/code/numerical.c +msgid "sort argument must be an ndarray" +msgstr "" + #: py/objstr.c msgid "start/end indices" msgstr "índices inicio/final" @@ -2713,12 +2902,16 @@ msgstr "timestamp fuera de rango para plataform time_t" msgid "too many arguments provided with the given format" msgstr "demasiados argumentos provistos con el formato dado" +#: extmod/ulab/code/ndarray.c +msgid "too many indices" +msgstr "" + #: py/runtime.c #, c-format msgid "too many values to unpack (expected %d)" msgstr "demasiados valores para descomprimir (%d esperado)" -#: py/objstr.c +#: extmod/ulab/code/linalg.c py/objstr.c msgid "tuple index out of range" msgstr "tuple index fuera de rango" @@ -2849,6 +3042,14 @@ msgstr "" msgid "window must be <= interval" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "wrong argument type" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "wrong input type" +msgstr "" + #: py/objstr.c msgid "wrong number of arguments" msgstr "numero erroneo de argumentos" @@ -2857,6 +3058,10 @@ msgstr "numero erroneo de argumentos" msgid "wrong number of values to unpack" msgstr "numero erroneo de valores a descomprimir" +#: extmod/ulab/code/ndarray.c +msgid "wrong operand type on the right hand side" +msgstr "" + #: shared-module/displayio/Shape.c #, fuzzy msgid "x value out of bounds" diff --git a/locale/fil.po b/locale/fil.po index b8b61d723..e358c9eb8 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-19 08:44+0000\n" +"POT-Creation-Date: 2020-02-27 11:02-0600\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n" "Last-Translator: Timothy \n" "Language-Team: fil\n" @@ -687,6 +687,10 @@ msgstr "" msgid "Extended advertisements with scan response not supported." msgstr "" +#: extmod/ulab/code/fft.c +msgid "FFT is defined for ndarrays only" +msgstr "" + #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." msgstr "" @@ -1141,6 +1145,7 @@ msgid "" msgstr "" "PWM frequency hindi writable kapag variable_frequency ay False sa pag buo." +#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/stm32f4/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" @@ -1603,6 +1608,10 @@ msgstr "walang laman ang address" msgid "arg is an empty sequence" msgstr "arg ay walang laman na sequence" +#: extmod/ulab/code/numerical.c +msgid "argsort argument must be an ndarray" +msgstr "" + #: py/runtime.c msgid "argument has wrong type" msgstr "may maling type ang argument" @@ -1616,6 +1625,10 @@ msgstr "hindi tugma ang argument num/types" msgid "argument should be a '%q' not a '%q'" msgstr "argument ay dapat na '%q' hindi '%q'" +#: extmod/ulab/code/linalg.c +msgid "arguments must be ndarrays" +msgstr "" + #: py/objarray.c shared-bindings/nvm/ByteArray.c msgid "array/bytes required on right side" msgstr "array/bytes kinakailangan sa kanang bahagi" @@ -1624,6 +1637,18 @@ msgstr "array/bytes kinakailangan sa kanang bahagi" msgid "attributes not supported yet" msgstr "attributes hindi sinusuportahan" +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, None, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be None, 0, or 1" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "masamang mode ng compile" @@ -1873,6 +1898,10 @@ msgstr "hindi ma-import ang name %q" msgid "cannot perform relative import" msgstr "hindi maaring isagawa ang relative import" +#: extmod/ulab/code/ndarray.c +msgid "cannot reshape array (incompatible input/output shape)" +msgstr "" + #: py/emitnative.c msgid "casting" msgstr "casting" @@ -1929,6 +1958,30 @@ msgstr "constant ay dapat na integer" msgid "conversion to object" msgstr "kombersyon to object" +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be linear arrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must not be empty" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "could not broadast input array from shape" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "could not invert Vandermonde matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "ddof must be smaller than length of data set" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "decimal numbers hindi sinusuportahan" @@ -1958,6 +2011,10 @@ msgstr "ang destination_length ay dapat na isang int >= 0" msgid "dict update sequence has wrong length" msgstr "may mali sa haba ng dict update sequence" +#: extmod/ulab/code/numerical.c +msgid "diff argument must be an ndarray" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -1971,6 +2028,10 @@ msgstr "walang laman" msgid "empty heap" msgstr "walang laman ang heap" +#: extmod/ulab/code/ndarray.c +msgid "empty index range" +msgstr "" + #: py/objstr.c msgid "empty separator" msgstr "walang laman na separator" @@ -2038,6 +2099,10 @@ msgstr "file ay dapat buksan sa byte mode" msgid "filesystem must provide mount method" msgstr "ang filesystem dapat mag bigay ng mount method" +#: extmod/ulab/code/ndarray.c +msgid "first argument must be an iterable" +msgstr "" + #: py/objtype.c msgid "first argument to super() must be type" msgstr "unang argument ng super() ay dapat type" @@ -2046,6 +2111,14 @@ msgstr "unang argument ng super() ay dapat type" msgid "firstbit must be MSB" msgstr "firstbit ay dapat MSB" +#: extmod/ulab/code/ndarray.c +msgid "flattening order must be either 'C', or 'F'" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "flip argument must be an ndarray" +msgstr "" + #: py/objint.c msgid "float too big" msgstr "masyadong malaki ang float" @@ -2062,6 +2135,10 @@ msgstr "kailangan ng format ng dict" msgid "full" msgstr "puno" +#: extmod/ulab/code/linalg.c +msgid "function defined for ndarrays only" +msgstr "" + #: py/argcheck.c msgid "function does not take keyword arguments" msgstr "ang function ay hindi kumukuha ng mga argumento ng keyword" @@ -2139,6 +2216,10 @@ msgstr "hindi kumpleto ang format key" msgid "incorrect padding" msgstr "mali ang padding" +#: extmod/ulab/code/ndarray.c +msgid "index is out of bounds" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c @@ -2149,10 +2230,46 @@ msgstr "index wala sa sakop" msgid "indices must be integers" msgstr "ang mga indeks ay dapat na integer" +#: extmod/ulab/code/ndarray.c +msgid "indices must be integers, slices, or Boolean lists" +msgstr "" + #: py/compile.c msgid "inline assembler must be a function" msgstr "inline assembler ay dapat na function" +#: extmod/ulab/code/linalg.c +msgid "input argument must be an integer or a 2-tuple" +msgstr "" + +#: extmod/ulab/code/fft.c +msgid "input array length must be power of 2" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input data must be an iterable" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is asymmetric" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is singular" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input must be square matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "input must be tuple, list, range, or ndarray" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input vectors must be of equal length" +msgstr "" + #: py/parsenum.c msgid "int() arg 2 must be >= 2 and <= 36" msgstr "int() arg 2 ay dapat >=2 at <= 36" @@ -2231,6 +2348,14 @@ msgstr "issubclass() arg 1 ay dapat na class" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "issubclass() arg 2 ay dapat na class o tuple ng classes" +#: extmod/ulab/code/ndarray.c +msgid "iterables are not of the same length" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "iterations did not converge" +msgstr "" + #: py/objstr.c msgid "join expects a list of str/bytes objects consistent with self object" msgstr "" @@ -2291,6 +2416,10 @@ msgstr "masyadong maliit ang buffer map" msgid "math domain error" msgstr "may pagkakamali sa math domain" +#: extmod/ulab/code/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c #, c-format @@ -2314,6 +2443,10 @@ msgstr "abigo ang paglalaan ng memorya, ang heap ay naka-lock" msgid "module not found" msgstr "module hindi nakita" +#: extmod/ulab/code/poly.c +msgid "more degrees of freedom than data points" +msgstr "" + #: py/compile.c msgid "multiple *x in assignment" msgstr "maramihang *x sa assignment" @@ -2338,6 +2471,10 @@ msgstr "dapat tukuyin lahat ng SCK/MOSI/MISO" msgid "must use keyword argument for key function" msgstr "dapat gumamit ng keyword argument para sa key function" +#: extmod/ulab/code/numerical.c +msgid "n must be between 0, and 9" +msgstr "" + #: py/runtime.c msgid "name '%q' is not defined" msgstr "name '%q' ay hindi defined" @@ -2424,6 +2561,14 @@ msgstr "hindi lahat ng arguments na i-convert habang string formatting" msgid "not enough arguments for format string" msgstr "kulang sa arguments para sa format string" +#: extmod/ulab/code/poly.c +msgid "number of arguments must be 2, or 3" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "number of points must be at least 2" +msgstr "" + #: py/obj.c #, c-format msgid "object '%s' is not a tuple or list" @@ -2483,6 +2628,14 @@ msgstr "wala sa sakop ang address" msgid "only bit_depth=16 is supported" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "only ndarray objects can be inverted" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "only ndarrays can be inverted" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" @@ -2492,6 +2645,22 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "ang mga slices lamang na may hakbang = 1 (aka None) ang sinusuportahan" +#: extmod/ulab/code/linalg.c +msgid "only square matrices can be inverted" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operands could not be broadcast together" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "operation is not implemented on ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is not supported for given type" +msgstr "" + #: py/modbuiltins.c msgid "ord expects a character" msgstr "ord umaasa ng character" @@ -2568,6 +2737,10 @@ msgstr "pow() na may 3 argumento kailangan ng integers" msgid "queue overflow" msgstr "puno na ang pila (overflow)" +#: extmod/ulab/code/fft.c +msgid "real and imaginary parts must be of equal length" +msgstr "" + #: py/builtinimport.c msgid "relative import" msgstr "relative import" @@ -2585,6 +2758,10 @@ msgstr "return annotation ay dapat na identifier" msgid "return expected '%q' but got '%q'" msgstr "return umasa ng '%q' pero ang nakuha ay ‘%q’" +#: extmod/ulab/code/ndarray.c +msgid "right hand side must be an ndarray, or a scalar" +msgstr "" + #: py/objstr.c msgid "rsplit(None,n)" msgstr "rsplit(None,n)" @@ -2609,6 +2786,10 @@ msgstr "puno na ang schedule stack" msgid "script compilation not supported" msgstr "script kompilasyon hindi supportado" +#: extmod/ulab/code/ndarray.c +msgid "shape must be a 2-tuple" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "sign hindi maaring string format specifier" @@ -2621,6 +2802,10 @@ msgstr "sign hindi maari sa integer format specifier 'c'" msgid "single '}' encountered in format string" msgstr "isang '}' nasalubong sa format string" +#: extmod/ulab/code/linalg.c +msgid "size is defined for ndarrays only" +msgstr "" + #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" msgstr "sleep length ay dapat hindi negatibo" @@ -2637,6 +2822,10 @@ msgstr "small int overflow" msgid "soft reboot\n" msgstr "malambot na reboot\n" +#: extmod/ulab/code/numerical.c +msgid "sort argument must be an ndarray" +msgstr "" + #: py/objstr.c msgid "start/end indices" msgstr "start/end indeks" @@ -2728,12 +2917,16 @@ msgstr "wala sa sakop ng timestamp ang platform time_t" msgid "too many arguments provided with the given format" msgstr "masyadong maraming mga argumento na ibinigay sa ibinigay na format" +#: extmod/ulab/code/ndarray.c +msgid "too many indices" +msgstr "" + #: py/runtime.c #, c-format msgid "too many values to unpack (expected %d)" msgstr "masyadong maraming values para i-unpact (umaasa ng %d)" -#: py/objstr.c +#: extmod/ulab/code/linalg.c py/objstr.c msgid "tuple index out of range" msgstr "indeks ng tuple wala sa sakop" @@ -2864,6 +3057,14 @@ msgstr "" msgid "window must be <= interval" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "wrong argument type" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "wrong input type" +msgstr "" + #: py/objstr.c msgid "wrong number of arguments" msgstr "mali ang bilang ng argumento" @@ -2872,6 +3073,10 @@ msgstr "mali ang bilang ng argumento" msgid "wrong number of values to unpack" msgstr "maling number ng value na i-unpack" +#: extmod/ulab/code/ndarray.c +msgid "wrong operand type on the right hand side" +msgstr "" + #: shared-module/displayio/Shape.c #, fuzzy msgid "x value out of bounds" diff --git a/locale/fr.po b/locale/fr.po index 625b4e91a..cd7a533c3 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-19 08:44+0000\n" +"POT-Creation-Date: 2020-02-27 11:02-0600\n" "PO-Revision-Date: 2019-04-14 20:05+0100\n" "Last-Translator: Pierrick Couturier \n" "Language-Team: fr\n" @@ -690,6 +690,10 @@ msgstr "Tuple de longueur %d attendu, obtenu %d" msgid "Extended advertisements with scan response not supported." msgstr "" +#: extmod/ulab/code/fft.c +msgid "FFT is defined for ndarrays only" +msgstr "" + #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." msgstr "" @@ -1155,6 +1159,7 @@ msgstr "" "La fréquence de PWM n'est pas modifiable quand variable_frequency est False " "à la construction." +#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/stm32f4/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" @@ -1620,6 +1625,10 @@ msgstr "adresses vides" msgid "arg is an empty sequence" msgstr "l'argument est une séquence vide" +#: extmod/ulab/code/numerical.c +msgid "argsort argument must be an ndarray" +msgstr "" + #: py/runtime.c msgid "argument has wrong type" msgstr "l'argument est d'un mauvais type" @@ -1633,6 +1642,10 @@ msgstr "argument num/types ne correspond pas" msgid "argument should be a '%q' not a '%q'" msgstr "l'argument devrait être un(e) '%q', pas '%q'" +#: extmod/ulab/code/linalg.c +msgid "arguments must be ndarrays" +msgstr "" + #: py/objarray.c shared-bindings/nvm/ByteArray.c msgid "array/bytes required on right side" msgstr "tableau/octets requis à droite" @@ -1641,6 +1654,18 @@ msgstr "tableau/octets requis à droite" msgid "attributes not supported yet" msgstr "attribut pas encore supporté" +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, None, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be None, 0, or 1" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "mauvais mode de compilation" @@ -1896,6 +1921,10 @@ msgstr "ne peut pas importer le nom %q" msgid "cannot perform relative import" msgstr "ne peut pas réaliser un import relatif" +#: extmod/ulab/code/ndarray.c +msgid "cannot reshape array (incompatible input/output shape)" +msgstr "" + #: py/emitnative.c msgid "casting" msgstr "typage" @@ -1956,6 +1985,30 @@ msgstr "constante doit être un entier" msgid "conversion to object" msgstr "conversion en objet" +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be linear arrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must not be empty" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "could not broadast input array from shape" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "could not invert Vandermonde matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "ddof must be smaller than length of data set" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "nombres décimaux non supportés" @@ -1983,6 +2036,10 @@ msgstr "destination_length doit être un entier >= 0" msgid "dict update sequence has wrong length" msgstr "la séquence de mise à jour de dict a une mauvaise longueur" +#: extmod/ulab/code/numerical.c +msgid "diff argument must be an ndarray" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -1996,6 +2053,10 @@ msgstr "vide" msgid "empty heap" msgstr "tas vide" +#: extmod/ulab/code/ndarray.c +msgid "empty index range" +msgstr "" + #: py/objstr.c msgid "empty separator" msgstr "séparateur vide" @@ -2063,6 +2124,10 @@ msgstr "le fichier doit être un fichier ouvert en mode 'byte'" msgid "filesystem must provide mount method" msgstr "le system de fichier doit fournir une méthode 'mount'" +#: extmod/ulab/code/ndarray.c +msgid "first argument must be an iterable" +msgstr "" + #: py/objtype.c msgid "first argument to super() must be type" msgstr "le premier argument de super() doit être un type" @@ -2071,6 +2136,14 @@ msgstr "le premier argument de super() doit être un type" msgid "firstbit must be MSB" msgstr "le 1er bit doit être le MSB" +#: extmod/ulab/code/ndarray.c +msgid "flattening order must be either 'C', or 'F'" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "flip argument must be an ndarray" +msgstr "" + #: py/objint.c msgid "float too big" msgstr "nombre à virgule flottante trop grand" @@ -2087,6 +2160,10 @@ msgstr "le format nécessite un dict" msgid "full" msgstr "plein" +#: extmod/ulab/code/linalg.c +msgid "function defined for ndarrays only" +msgstr "" + #: py/argcheck.c msgid "function does not take keyword arguments" msgstr "la fonction ne prend pas d'arguments nommés" @@ -2163,6 +2240,10 @@ msgstr "clé de format incomplète" msgid "incorrect padding" msgstr "espacement incorrect" +#: extmod/ulab/code/ndarray.c +msgid "index is out of bounds" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c @@ -2173,10 +2254,46 @@ msgstr "index hors gamme" msgid "indices must be integers" msgstr "les indices doivent être des entiers" +#: extmod/ulab/code/ndarray.c +msgid "indices must be integers, slices, or Boolean lists" +msgstr "" + #: py/compile.c msgid "inline assembler must be a function" msgstr "l'assembleur doit être une fonction" +#: extmod/ulab/code/linalg.c +msgid "input argument must be an integer or a 2-tuple" +msgstr "" + +#: extmod/ulab/code/fft.c +msgid "input array length must be power of 2" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input data must be an iterable" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is asymmetric" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is singular" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input must be square matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "input must be tuple, list, range, or ndarray" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input vectors must be of equal length" +msgstr "" + #: py/parsenum.c msgid "int() arg 2 must be >= 2 and <= 36" msgstr "l'argument 2 de int() doit être >=2 et <=36" @@ -2256,6 +2373,14 @@ msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" "l'argument 2 de issubclass() doit être une classe ou un tuple de classes" +#: extmod/ulab/code/ndarray.c +msgid "iterables are not of the same length" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "iterations did not converge" +msgstr "" + #: py/objstr.c msgid "join expects a list of str/bytes objects consistent with self object" msgstr "" @@ -2315,6 +2440,10 @@ msgstr "tampon trop petit" msgid "math domain error" msgstr "erreur de domaine math" +#: extmod/ulab/code/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c #, c-format @@ -2338,6 +2467,10 @@ msgstr "l'allocation de mémoire a échoué, le tas est vérrouillé" msgid "module not found" msgstr "module introuvable" +#: extmod/ulab/code/poly.c +msgid "more degrees of freedom than data points" +msgstr "" + #: py/compile.c msgid "multiple *x in assignment" msgstr "*x multiple dans l'assignement" @@ -2362,6 +2495,10 @@ msgstr "sck, mosi et miso doivent tous être spécifiés" msgid "must use keyword argument for key function" msgstr "doit utiliser un argument nommé pour une fonction key" +#: extmod/ulab/code/numerical.c +msgid "n must be between 0, and 9" +msgstr "" + #: py/runtime.c msgid "name '%q' is not defined" msgstr "nom '%q' non défini" @@ -2451,6 +2588,14 @@ msgstr "" msgid "not enough arguments for format string" msgstr "pas assez d'arguments pour la chaîne de format" +#: extmod/ulab/code/poly.c +msgid "number of arguments must be 2, or 3" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "number of points must be at least 2" +msgstr "" + #: py/obj.c #, c-format msgid "object '%s' is not a tuple or list" @@ -2510,6 +2655,14 @@ msgstr "adresse hors limites" msgid "only bit_depth=16 is supported" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "only ndarray objects can be inverted" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "only ndarrays can be inverted" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" @@ -2519,6 +2672,22 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "seules les tranches avec 'step=1' (cad None) sont supportées" +#: extmod/ulab/code/linalg.c +msgid "only square matrices can be inverted" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operands could not be broadcast together" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "operation is not implemented on ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is not supported for given type" +msgstr "" + #: py/modbuiltins.c msgid "ord expects a character" msgstr "ord attend un caractère" @@ -2600,6 +2769,10 @@ msgstr "pow() avec 3 arguments nécessite des entiers" msgid "queue overflow" msgstr "dépassement de file" +#: extmod/ulab/code/fft.c +msgid "real and imaginary parts must be of equal length" +msgstr "" + #: py/builtinimport.c msgid "relative import" msgstr "import relatif" @@ -2617,6 +2790,10 @@ msgstr "l'annotation de return doit être un identifiant" msgid "return expected '%q' but got '%q'" msgstr "return attendait '%q' mais a reçu '%q'" +#: extmod/ulab/code/ndarray.c +msgid "right hand side must be an ndarray, or a scalar" +msgstr "" + #: py/objstr.c msgid "rsplit(None,n)" msgstr "" @@ -2641,6 +2818,10 @@ msgstr "pile de planification pleine" msgid "script compilation not supported" msgstr "compilation de script non supportée" +#: extmod/ulab/code/ndarray.c +msgid "shape must be a 2-tuple" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "signe non autorisé dans les spéc. de formats de chaînes de caractères" @@ -2653,6 +2834,10 @@ msgstr "signe non autorisé avec la spéc. de format d'entier 'c'" msgid "single '}' encountered in format string" msgstr "'}' seule rencontrée dans une chaîne de format" +#: extmod/ulab/code/linalg.c +msgid "size is defined for ndarrays only" +msgstr "" + #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" msgstr "la longueur de sleep ne doit pas être négative" @@ -2669,6 +2854,10 @@ msgstr "dépassement de capacité d'un entier court" msgid "soft reboot\n" msgstr "redémarrage logiciel\n" +#: extmod/ulab/code/numerical.c +msgid "sort argument must be an ndarray" +msgstr "" + #: py/objstr.c msgid "start/end indices" msgstr "indices de début/fin" @@ -2761,12 +2950,16 @@ msgstr "'timestamp' hors bornes pour 'time_t' de la plateforme" msgid "too many arguments provided with the given format" msgstr "trop d'arguments fournis avec ce format" +#: extmod/ulab/code/ndarray.c +msgid "too many indices" +msgstr "" + #: py/runtime.c #, c-format msgid "too many values to unpack (expected %d)" msgstr "trop de valeur à dégrouper (%d attendues)" -#: py/objstr.c +#: extmod/ulab/code/linalg.c py/objstr.c msgid "tuple index out of range" msgstr "index du tuple hors gamme" @@ -2898,6 +3091,14 @@ msgstr "'value_count' doit être > 0" msgid "window must be <= interval" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "wrong argument type" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "wrong input type" +msgstr "" + #: py/objstr.c msgid "wrong number of arguments" msgstr "mauvais nombres d'arguments" @@ -2906,6 +3107,10 @@ msgstr "mauvais nombres d'arguments" msgid "wrong number of values to unpack" msgstr "mauvais nombre de valeurs à dégrouper" +#: extmod/ulab/code/ndarray.c +msgid "wrong operand type on the right hand side" +msgstr "" + #: shared-module/displayio/Shape.c #, fuzzy msgid "x value out of bounds" diff --git a/locale/it_IT.po b/locale/it_IT.po index 93af9bdb8..e0581b086 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-19 08:44+0000\n" +"POT-Creation-Date: 2020-02-27 11:02-0600\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n" "Last-Translator: Enrico Paganin \n" "Language-Team: \n" @@ -687,6 +687,10 @@ msgstr "" msgid "Extended advertisements with scan response not supported." msgstr "" +#: extmod/ulab/code/fft.c +msgid "FFT is defined for ndarrays only" +msgstr "" + #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." msgstr "" @@ -1150,6 +1154,7 @@ msgstr "" "frequenza PWM frequency non è scrivibile quando variable_frequency è " "impostato nel costruttore a False." +#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/stm32f4/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" @@ -1606,6 +1611,10 @@ msgstr "gli indirizzi sono vuoti" msgid "arg is an empty sequence" msgstr "l'argomento è una sequenza vuota" +#: extmod/ulab/code/numerical.c +msgid "argsort argument must be an ndarray" +msgstr "" + #: py/runtime.c msgid "argument has wrong type" msgstr "il tipo dell'argomento è errato" @@ -1619,6 +1628,10 @@ msgstr "discrepanza di numero/tipo di argomenti" msgid "argument should be a '%q' not a '%q'" msgstr "l'argomento dovrebbe essere un '%q' e non un '%q'" +#: extmod/ulab/code/linalg.c +msgid "arguments must be ndarrays" +msgstr "" + #: py/objarray.c shared-bindings/nvm/ByteArray.c msgid "array/bytes required on right side" msgstr "" @@ -1627,6 +1640,18 @@ msgstr "" msgid "attributes not supported yet" msgstr "attributi non ancora supportati" +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, None, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be None, 0, or 1" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "" @@ -1873,6 +1898,10 @@ msgstr "impossibile imporate il nome %q" msgid "cannot perform relative import" msgstr "impossibile effettuare l'importazione relativa" +#: extmod/ulab/code/ndarray.c +msgid "cannot reshape array (incompatible input/output shape)" +msgstr "" + #: py/emitnative.c msgid "casting" msgstr "casting" @@ -1931,6 +1960,30 @@ msgstr "la costante deve essere un intero" msgid "conversion to object" msgstr "conversione in oggetto" +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be linear arrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must not be empty" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "could not broadast input array from shape" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "could not invert Vandermonde matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "ddof must be smaller than length of data set" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "numeri decimali non supportati" @@ -1959,6 +2012,10 @@ msgstr "destination_length deve essere un int >= 0" msgid "dict update sequence has wrong length" msgstr "sequanza di aggiornamento del dizionario ha la lunghezza errata" +#: extmod/ulab/code/numerical.c +msgid "diff argument must be an ndarray" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -1972,6 +2029,10 @@ msgstr "vuoto" msgid "empty heap" msgstr "heap vuoto" +#: extmod/ulab/code/ndarray.c +msgid "empty index range" +msgstr "" + #: py/objstr.c msgid "empty separator" msgstr "separatore vuoto" @@ -2039,6 +2100,10 @@ msgstr "" msgid "filesystem must provide mount method" msgstr "il filesystem deve fornire un metodo di mount" +#: extmod/ulab/code/ndarray.c +msgid "first argument must be an iterable" +msgstr "" + #: py/objtype.c msgid "first argument to super() must be type" msgstr "" @@ -2047,6 +2112,14 @@ msgstr "" msgid "firstbit must be MSB" msgstr "il primo bit deve essere il più significativo (MSB)" +#: extmod/ulab/code/ndarray.c +msgid "flattening order must be either 'C', or 'F'" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "flip argument must be an ndarray" +msgstr "" + #: py/objint.c msgid "float too big" msgstr "float troppo grande" @@ -2063,6 +2136,10 @@ msgstr "la formattazione richiede un dict" msgid "full" msgstr "pieno" +#: extmod/ulab/code/linalg.c +msgid "function defined for ndarrays only" +msgstr "" + #: py/argcheck.c msgid "function does not take keyword arguments" msgstr "la funzione non prende argomenti nominati" @@ -2140,6 +2217,10 @@ msgstr "" msgid "incorrect padding" msgstr "padding incorretto" +#: extmod/ulab/code/ndarray.c +msgid "index is out of bounds" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c @@ -2150,10 +2231,46 @@ msgstr "indice fuori intervallo" msgid "indices must be integers" msgstr "gli indici devono essere interi" +#: extmod/ulab/code/ndarray.c +msgid "indices must be integers, slices, or Boolean lists" +msgstr "" + #: py/compile.c msgid "inline assembler must be a function" msgstr "inline assembler deve essere una funzione" +#: extmod/ulab/code/linalg.c +msgid "input argument must be an integer or a 2-tuple" +msgstr "" + +#: extmod/ulab/code/fft.c +msgid "input array length must be power of 2" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input data must be an iterable" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is asymmetric" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is singular" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input must be square matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "input must be tuple, list, range, or ndarray" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input vectors must be of equal length" +msgstr "" + #: py/parsenum.c msgid "int() arg 2 must be >= 2 and <= 36" msgstr "il secondo argomanto di int() deve essere >= 2 e <= 36" @@ -2234,6 +2351,14 @@ msgstr "" "il secondo argomento di issubclass() deve essere una classe o una tupla di " "classi" +#: extmod/ulab/code/ndarray.c +msgid "iterables are not of the same length" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "iterations did not converge" +msgstr "" + #: py/objstr.c msgid "join expects a list of str/bytes objects consistent with self object" msgstr "" @@ -2293,6 +2418,10 @@ msgstr "map buffer troppo piccolo" msgid "math domain error" msgstr "errore di dominio matematico" +#: extmod/ulab/code/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c #, c-format @@ -2316,6 +2445,10 @@ msgstr "allocazione di memoria fallita, l'heap è bloccato" msgid "module not found" msgstr "modulo non trovato" +#: extmod/ulab/code/poly.c +msgid "more degrees of freedom than data points" +msgstr "" + #: py/compile.c msgid "multiple *x in assignment" msgstr "*x multipli nell'assegnamento" @@ -2340,6 +2473,10 @@ msgstr "è necessario specificare tutte le sck/mosi/miso" msgid "must use keyword argument for key function" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "n must be between 0, and 9" +msgstr "" + #: py/runtime.c msgid "name '%q' is not defined" msgstr "nome '%q'non definito" @@ -2429,6 +2566,14 @@ msgstr "" msgid "not enough arguments for format string" msgstr "argomenti non sufficienti per la stringa di formattazione" +#: extmod/ulab/code/poly.c +msgid "number of arguments must be 2, or 3" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "number of points must be at least 2" +msgstr "" + #: py/obj.c #, c-format msgid "object '%s' is not a tuple or list" @@ -2488,6 +2633,14 @@ msgstr "indirizzo fuori limite" msgid "only bit_depth=16 is supported" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "only ndarray objects can be inverted" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "only ndarrays can be inverted" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" @@ -2497,6 +2650,22 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "solo slice con step=1 (aka None) sono supportate" +#: extmod/ulab/code/linalg.c +msgid "only square matrices can be inverted" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operands could not be broadcast together" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "operation is not implemented on ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is not supported for given type" +msgstr "" + #: py/modbuiltins.c msgid "ord expects a character" msgstr "ord() aspetta un carattere" @@ -2575,6 +2744,10 @@ msgstr "pow() con 3 argomenti richiede interi" msgid "queue overflow" msgstr "overflow della coda" +#: extmod/ulab/code/fft.c +msgid "real and imaginary parts must be of equal length" +msgstr "" + #: py/builtinimport.c msgid "relative import" msgstr "importazione relativa" @@ -2592,6 +2765,10 @@ msgstr "" msgid "return expected '%q' but got '%q'" msgstr "return aspettava '%q' ma ha ottenuto '%q'" +#: extmod/ulab/code/ndarray.c +msgid "right hand side must be an ndarray, or a scalar" +msgstr "" + #: py/objstr.c msgid "rsplit(None,n)" msgstr "" @@ -2616,6 +2793,10 @@ msgstr "" msgid "script compilation not supported" msgstr "compilazione dello scrip non suportata" +#: extmod/ulab/code/ndarray.c +msgid "shape must be a 2-tuple" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "segno non permesso nello spcificatore di formato della stringa" @@ -2628,6 +2809,10 @@ msgstr "segno non permesso nello spcificatore di formato 'c' della stringa" msgid "single '}' encountered in format string" msgstr "'}' singolo presente nella stringa di formattazione" +#: extmod/ulab/code/linalg.c +msgid "size is defined for ndarrays only" +msgstr "" + #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" msgstr "la lunghezza di sleed deve essere non negativa" @@ -2644,6 +2829,10 @@ msgstr "small int overflow" msgid "soft reboot\n" msgstr "soft reboot\n" +#: extmod/ulab/code/numerical.c +msgid "sort argument must be an ndarray" +msgstr "" + #: py/objstr.c msgid "start/end indices" msgstr "" @@ -2735,12 +2924,16 @@ msgstr "timestamp è fuori intervallo per il time_t della piattaforma" msgid "too many arguments provided with the given format" msgstr "troppi argomenti forniti con il formato specificato" +#: extmod/ulab/code/ndarray.c +msgid "too many indices" +msgstr "" + #: py/runtime.c #, c-format msgid "too many values to unpack (expected %d)" msgstr "troppi valori da scompattare (%d attesi)" -#: py/objstr.c +#: extmod/ulab/code/linalg.c py/objstr.c msgid "tuple index out of range" msgstr "indice della tupla fuori intervallo" @@ -2871,6 +3064,14 @@ msgstr "" msgid "window must be <= interval" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "wrong argument type" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "wrong input type" +msgstr "" + #: py/objstr.c msgid "wrong number of arguments" msgstr "numero di argomenti errato" @@ -2879,6 +3080,10 @@ msgstr "numero di argomenti errato" msgid "wrong number of values to unpack" msgstr "numero di valori da scompattare non corretto" +#: extmod/ulab/code/ndarray.c +msgid "wrong operand type on the right hand side" +msgstr "" + #: shared-module/displayio/Shape.c #, fuzzy msgid "x value out of bounds" diff --git a/locale/ko.po b/locale/ko.po index 04ab849d4..d9efa7466 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-19 08:44+0000\n" +"POT-Creation-Date: 2020-02-27 11:02-0600\n" "PO-Revision-Date: 2019-05-06 14:22-0700\n" "Last-Translator: \n" "Language-Team: LANGUAGE \n" @@ -677,6 +677,10 @@ msgstr "" msgid "Extended advertisements with scan response not supported." msgstr "" +#: extmod/ulab/code/fft.c +msgid "FFT is defined for ndarrays only" +msgstr "" + #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." msgstr "" @@ -1125,6 +1129,7 @@ msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" +#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/stm32f4/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" @@ -1575,6 +1580,10 @@ msgstr "" msgid "arg is an empty sequence" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "argsort argument must be an ndarray" +msgstr "" + #: py/runtime.c msgid "argument has wrong type" msgstr "" @@ -1588,6 +1597,10 @@ msgstr "" msgid "argument should be a '%q' not a '%q'" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "arguments must be ndarrays" +msgstr "" + #: py/objarray.c shared-bindings/nvm/ByteArray.c msgid "array/bytes required on right side" msgstr "" @@ -1596,6 +1609,18 @@ msgstr "" msgid "attributes not supported yet" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, None, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be None, 0, or 1" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "" @@ -1838,6 +1863,10 @@ msgstr "" msgid "cannot perform relative import" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot reshape array (incompatible input/output shape)" +msgstr "" + #: py/emitnative.c msgid "casting" msgstr "" @@ -1894,6 +1923,30 @@ msgstr "" msgid "conversion to object" msgstr "" +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be linear arrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must not be empty" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "could not broadast input array from shape" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "could not invert Vandermonde matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "ddof must be smaller than length of data set" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "" @@ -1919,6 +1972,10 @@ msgstr "" msgid "dict update sequence has wrong length" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "diff argument must be an ndarray" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -1932,6 +1989,10 @@ msgstr "" msgid "empty heap" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "empty index range" +msgstr "" + #: py/objstr.c msgid "empty separator" msgstr "" @@ -1998,6 +2059,10 @@ msgstr "" msgid "filesystem must provide mount method" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "first argument must be an iterable" +msgstr "" + #: py/objtype.c msgid "first argument to super() must be type" msgstr "" @@ -2006,6 +2071,14 @@ msgstr "" msgid "firstbit must be MSB" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "flattening order must be either 'C', or 'F'" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "flip argument must be an ndarray" +msgstr "" + #: py/objint.c msgid "float too big" msgstr "float이 너무 큽니다" @@ -2022,6 +2095,10 @@ msgstr "" msgid "full" msgstr "완전한(full)" +#: extmod/ulab/code/linalg.c +msgid "function defined for ndarrays only" +msgstr "" + #: py/argcheck.c msgid "function does not take keyword arguments" msgstr "" @@ -2098,6 +2175,10 @@ msgstr "" msgid "incorrect padding" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "index is out of bounds" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c @@ -2108,10 +2189,46 @@ msgstr "" msgid "indices must be integers" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "indices must be integers, slices, or Boolean lists" +msgstr "" + #: py/compile.c msgid "inline assembler must be a function" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "input argument must be an integer or a 2-tuple" +msgstr "" + +#: extmod/ulab/code/fft.c +msgid "input array length must be power of 2" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input data must be an iterable" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is asymmetric" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is singular" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input must be square matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "input must be tuple, list, range, or ndarray" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input vectors must be of equal length" +msgstr "" + #: py/parsenum.c msgid "int() arg 2 must be >= 2 and <= 36" msgstr "" @@ -2190,6 +2307,14 @@ msgstr "" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "iterables are not of the same length" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "iterations did not converge" +msgstr "" + #: py/objstr.c msgid "join expects a list of str/bytes objects consistent with self object" msgstr "" @@ -2246,6 +2371,10 @@ msgstr "" msgid "math domain error" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c #, c-format @@ -2269,6 +2398,10 @@ msgstr "" msgid "module not found" msgstr "" +#: extmod/ulab/code/poly.c +msgid "more degrees of freedom than data points" +msgstr "" + #: py/compile.c msgid "multiple *x in assignment" msgstr "" @@ -2293,6 +2426,10 @@ msgstr "" msgid "must use keyword argument for key function" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "n must be between 0, and 9" +msgstr "" + #: py/runtime.c msgid "name '%q' is not defined" msgstr "" @@ -2379,6 +2516,14 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" +#: extmod/ulab/code/poly.c +msgid "number of arguments must be 2, or 3" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "number of points must be at least 2" +msgstr "" + #: py/obj.c #, c-format msgid "object '%s' is not a tuple or list" @@ -2437,6 +2582,14 @@ msgstr "" msgid "only bit_depth=16 is supported" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "only ndarray objects can be inverted" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "only ndarrays can be inverted" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" @@ -2446,6 +2599,22 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "only square matrices can be inverted" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operands could not be broadcast together" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "operation is not implemented on ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is not supported for given type" +msgstr "" + #: py/modbuiltins.c msgid "ord expects a character" msgstr "" @@ -2521,6 +2690,10 @@ msgstr "" msgid "queue overflow" msgstr "" +#: extmod/ulab/code/fft.c +msgid "real and imaginary parts must be of equal length" +msgstr "" + #: py/builtinimport.c msgid "relative import" msgstr "" @@ -2538,6 +2711,10 @@ msgstr "" msgid "return expected '%q' but got '%q'" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "right hand side must be an ndarray, or a scalar" +msgstr "" + #: py/objstr.c msgid "rsplit(None,n)" msgstr "" @@ -2560,6 +2737,10 @@ msgstr "" msgid "script compilation not supported" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "shape must be a 2-tuple" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "" @@ -2572,6 +2753,10 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "size is defined for ndarrays only" +msgstr "" + #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" msgstr "" @@ -2588,6 +2773,10 @@ msgstr "" msgid "soft reboot\n" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "sort argument must be an ndarray" +msgstr "" + #: py/objstr.c msgid "start/end indices" msgstr "" @@ -2677,12 +2866,16 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "too many indices" +msgstr "" + #: py/runtime.c #, c-format msgid "too many values to unpack (expected %d)" msgstr "" -#: py/objstr.c +#: extmod/ulab/code/linalg.c py/objstr.c msgid "tuple index out of range" msgstr "" @@ -2813,6 +3006,14 @@ msgstr "" msgid "window must be <= interval" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "wrong argument type" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "wrong input type" +msgstr "" + #: py/objstr.c msgid "wrong number of arguments" msgstr "" @@ -2821,6 +3022,10 @@ msgstr "" msgid "wrong number of values to unpack" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "wrong operand type on the right hand side" +msgstr "" + #: shared-module/displayio/Shape.c msgid "x value out of bounds" msgstr "" diff --git a/locale/pl.po b/locale/pl.po index d76619182..a8620dbc9 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-19 08:44+0000\n" +"POT-Creation-Date: 2020-02-27 11:02-0600\n" "PO-Revision-Date: 2019-03-19 18:37-0700\n" "Last-Translator: Radomir Dopieralski \n" "Language-Team: pl\n" @@ -676,6 +676,10 @@ msgstr "Oczekiwano krotkę długości %d, otrzymano %d" msgid "Extended advertisements with scan response not supported." msgstr "" +#: extmod/ulab/code/fft.c +msgid "FFT is defined for ndarrays only" +msgstr "" + #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." msgstr "" @@ -1126,6 +1130,7 @@ msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "Nie można zmienić częstotliwości PWM gdy variable_frequency=False." +#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/stm32f4/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" @@ -1578,6 +1583,10 @@ msgstr "adres jest pusty" msgid "arg is an empty sequence" msgstr "arg jest puste" +#: extmod/ulab/code/numerical.c +msgid "argsort argument must be an ndarray" +msgstr "" + #: py/runtime.c msgid "argument has wrong type" msgstr "argument ma zły typ" @@ -1591,6 +1600,10 @@ msgstr "zła liczba lub typ argumentów" msgid "argument should be a '%q' not a '%q'" msgstr "argument powinien być '%q' a nie '%q'" +#: extmod/ulab/code/linalg.c +msgid "arguments must be ndarrays" +msgstr "" + #: py/objarray.c shared-bindings/nvm/ByteArray.c msgid "array/bytes required on right side" msgstr "tablica/bytes wymagane po prawej stronie" @@ -1599,6 +1612,18 @@ msgstr "tablica/bytes wymagane po prawej stronie" msgid "attributes not supported yet" msgstr "atrybuty nie są jeszcze obsługiwane" +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, None, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be None, 0, or 1" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "zły tryb kompilacji" @@ -1841,6 +1866,10 @@ msgstr "nie można zaimportować nazwy %q" msgid "cannot perform relative import" msgstr "nie można wykonać relatywnego importu" +#: extmod/ulab/code/ndarray.c +msgid "cannot reshape array (incompatible input/output shape)" +msgstr "" + #: py/emitnative.c msgid "casting" msgstr "rzutowanie" @@ -1897,6 +1926,30 @@ msgstr "stała musi być liczbą całkowitą" msgid "conversion to object" msgstr "konwersja do obiektu" +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be linear arrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must not be empty" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "could not broadast input array from shape" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "could not invert Vandermonde matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "ddof must be smaller than length of data set" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "liczby dziesiętne nieobsługiwane" @@ -1923,6 +1976,10 @@ msgstr "destination_length musi być nieujemną liczbą całkowitą" msgid "dict update sequence has wrong length" msgstr "sekwencja ma złą długość" +#: extmod/ulab/code/numerical.c +msgid "diff argument must be an ndarray" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -1936,6 +1993,10 @@ msgstr "puste" msgid "empty heap" msgstr "pusta sterta" +#: extmod/ulab/code/ndarray.c +msgid "empty index range" +msgstr "" + #: py/objstr.c msgid "empty separator" msgstr "pusty separator" @@ -2002,6 +2063,10 @@ msgstr "file musi być otwarte w trybie bajtowym" msgid "filesystem must provide mount method" msgstr "system plików musi mieć metodę mount" +#: extmod/ulab/code/ndarray.c +msgid "first argument must be an iterable" +msgstr "" + #: py/objtype.c msgid "first argument to super() must be type" msgstr "pierwszy argument super() musi być typem" @@ -2010,6 +2075,14 @@ msgstr "pierwszy argument super() musi być typem" msgid "firstbit must be MSB" msgstr "firstbit musi być MSB" +#: extmod/ulab/code/ndarray.c +msgid "flattening order must be either 'C', or 'F'" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "flip argument must be an ndarray" +msgstr "" + #: py/objint.c msgid "float too big" msgstr "float zbyt wielki" @@ -2026,6 +2099,10 @@ msgstr "format wymaga słownika" msgid "full" msgstr "pełny" +#: extmod/ulab/code/linalg.c +msgid "function defined for ndarrays only" +msgstr "" + #: py/argcheck.c msgid "function does not take keyword arguments" msgstr "funkcja nie bierze argumentów nazwanych" @@ -2102,6 +2179,10 @@ msgstr "niepełny klucz formatu" msgid "incorrect padding" msgstr "złe wypełnienie" +#: extmod/ulab/code/ndarray.c +msgid "index is out of bounds" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c @@ -2112,10 +2193,46 @@ msgstr "indeks poza zakresem" msgid "indices must be integers" msgstr "indeksy muszą być całkowite" +#: extmod/ulab/code/ndarray.c +msgid "indices must be integers, slices, or Boolean lists" +msgstr "" + #: py/compile.c msgid "inline assembler must be a function" msgstr "wtrącony asembler musi być funkcją" +#: extmod/ulab/code/linalg.c +msgid "input argument must be an integer or a 2-tuple" +msgstr "" + +#: extmod/ulab/code/fft.c +msgid "input array length must be power of 2" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input data must be an iterable" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is asymmetric" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is singular" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input must be square matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "input must be tuple, list, range, or ndarray" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input vectors must be of equal length" +msgstr "" + #: py/parsenum.c msgid "int() arg 2 must be >= 2 and <= 36" msgstr "argument 2 do int() busi być pomiędzy 2 a 36" @@ -2194,6 +2311,14 @@ msgstr "argument 1 dla issubclass() musi być klasą" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "argument 2 dla issubclass() musi być klasą lub krotką klas" +#: extmod/ulab/code/ndarray.c +msgid "iterables are not of the same length" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "iterations did not converge" +msgstr "" + #: py/objstr.c msgid "join expects a list of str/bytes objects consistent with self object" msgstr "join oczekuje listy str/bytes zgodnych z self" @@ -2250,6 +2375,10 @@ msgstr "bufor mapy zbyt mały" msgid "math domain error" msgstr "błąd domeny" +#: extmod/ulab/code/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c #, c-format @@ -2273,6 +2402,10 @@ msgstr "alokacja pamięci nie powiodła się, sterta zablokowana" msgid "module not found" msgstr "brak modułu" +#: extmod/ulab/code/poly.c +msgid "more degrees of freedom than data points" +msgstr "" + #: py/compile.c msgid "multiple *x in assignment" msgstr "wiele *x w przypisaniu" @@ -2297,6 +2430,10 @@ msgstr "sck/mosi/miso muszą być podane" msgid "must use keyword argument for key function" msgstr "funkcja key musi być podana jako argument nazwany" +#: extmod/ulab/code/numerical.c +msgid "n must be between 0, and 9" +msgstr "" + #: py/runtime.c msgid "name '%q' is not defined" msgstr "nazwa '%q' niezdefiniowana" @@ -2383,6 +2520,14 @@ msgstr "nie wszystkie argumenty wykorzystane w formatowaniu" msgid "not enough arguments for format string" msgstr "nie dość argumentów przy formatowaniu" +#: extmod/ulab/code/poly.c +msgid "number of arguments must be 2, or 3" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "number of points must be at least 2" +msgstr "" + #: py/obj.c #, c-format msgid "object '%s' is not a tuple or list" @@ -2441,6 +2586,14 @@ msgstr "offset poza zakresem" msgid "only bit_depth=16 is supported" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "only ndarray objects can be inverted" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "only ndarrays can be inverted" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" @@ -2450,6 +2603,22 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "tylko fragmenty ze step=1 (lub None) są wspierane" +#: extmod/ulab/code/linalg.c +msgid "only square matrices can be inverted" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operands could not be broadcast together" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "operation is not implemented on ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is not supported for given type" +msgstr "" + #: py/modbuiltins.c msgid "ord expects a character" msgstr "ord oczekuje znaku" @@ -2526,6 +2695,10 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych" msgid "queue overflow" msgstr "przepełnienie kolejki" +#: extmod/ulab/code/fft.c +msgid "real and imaginary parts must be of equal length" +msgstr "" + #: py/builtinimport.c msgid "relative import" msgstr "relatywny import" @@ -2543,6 +2716,10 @@ msgstr "anotacja wartości musi być identyfikatorem" msgid "return expected '%q' but got '%q'" msgstr "return oczekiwał '%q', a jest '%q'" +#: extmod/ulab/code/ndarray.c +msgid "right hand side must be an ndarray, or a scalar" +msgstr "" + #: py/objstr.c msgid "rsplit(None,n)" msgstr "rsplit(None,n)" @@ -2566,6 +2743,10 @@ msgstr "stos planu pełen" msgid "script compilation not supported" msgstr "kompilowanie skryptów nieobsługiwane" +#: extmod/ulab/code/ndarray.c +msgid "shape must be a 2-tuple" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "znak jest niedopuszczalny w specyfikacji formatu łańcucha" @@ -2578,6 +2759,10 @@ msgstr "znak jest niedopuszczalny w specyfikacji 'c'" msgid "single '}' encountered in format string" msgstr "pojedynczy '}' w specyfikacji formatu" +#: extmod/ulab/code/linalg.c +msgid "size is defined for ndarrays only" +msgstr "" + #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" msgstr "okres snu musi być nieujemny" @@ -2594,6 +2779,10 @@ msgstr "przepełnienie small int" msgid "soft reboot\n" msgstr "programowy reset\n" +#: extmod/ulab/code/numerical.c +msgid "sort argument must be an ndarray" +msgstr "" + #: py/objstr.c msgid "start/end indices" msgstr "początkowe/końcowe indeksy" @@ -2683,12 +2872,16 @@ msgstr "timestamp poza zakresem dla time_t na tej platformie" msgid "too many arguments provided with the given format" msgstr "zbyt wiele argumentów podanych dla tego formatu" +#: extmod/ulab/code/ndarray.c +msgid "too many indices" +msgstr "" + #: py/runtime.c #, c-format msgid "too many values to unpack (expected %d)" msgstr "zbyt wiele wartości do rozpakowania (oczekiwano %d)" -#: py/objstr.c +#: extmod/ulab/code/linalg.c py/objstr.c msgid "tuple index out of range" msgstr "indeks krotki poza zakresem" @@ -2819,6 +3012,14 @@ msgstr "value_count musi być > 0" msgid "window must be <= interval" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "wrong argument type" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "wrong input type" +msgstr "" + #: py/objstr.c msgid "wrong number of arguments" msgstr "zła liczba argumentów" @@ -2827,6 +3028,10 @@ msgstr "zła liczba argumentów" msgid "wrong number of values to unpack" msgstr "zła liczba wartości do rozpakowania" +#: extmod/ulab/code/ndarray.c +msgid "wrong operand type on the right hand side" +msgstr "" + #: shared-module/displayio/Shape.c msgid "x value out of bounds" msgstr "x poza zakresem" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index b948003a1..ed63a1595 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-19 08:44+0000\n" +"POT-Creation-Date: 2020-02-27 11:02-0600\n" "PO-Revision-Date: 2018-10-02 21:14-0000\n" "Last-Translator: \n" "Language-Team: \n" @@ -682,6 +682,10 @@ msgstr "" msgid "Extended advertisements with scan response not supported." msgstr "" +#: extmod/ulab/code/fft.c +msgid "FFT is defined for ndarrays only" +msgstr "" + #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." msgstr "Falha ao enviar comando." @@ -1136,6 +1140,7 @@ msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" +#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/stm32f4/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" @@ -1588,6 +1593,10 @@ msgstr "" msgid "arg is an empty sequence" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "argsort argument must be an ndarray" +msgstr "" + #: py/runtime.c msgid "argument has wrong type" msgstr "argumento tem tipo errado" @@ -1601,6 +1610,10 @@ msgstr "" msgid "argument should be a '%q' not a '%q'" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "arguments must be ndarrays" +msgstr "" + #: py/objarray.c shared-bindings/nvm/ByteArray.c msgid "array/bytes required on right side" msgstr "" @@ -1609,6 +1622,18 @@ msgstr "" msgid "attributes not supported yet" msgstr "atributos ainda não suportados" +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, None, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be None, 0, or 1" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "" @@ -1854,6 +1879,10 @@ msgstr "não pode importar nome %q" msgid "cannot perform relative import" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot reshape array (incompatible input/output shape)" +msgstr "" + #: py/emitnative.c msgid "casting" msgstr "" @@ -1910,6 +1939,30 @@ msgstr "constante deve ser um inteiro" msgid "conversion to object" msgstr "" +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be linear arrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must not be empty" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "could not broadast input array from shape" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "could not invert Vandermonde matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "ddof must be smaller than length of data set" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "" @@ -1935,6 +1988,10 @@ msgstr "destination_length deve ser um int >= 0" msgid "dict update sequence has wrong length" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "diff argument must be an ndarray" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -1948,6 +2005,10 @@ msgstr "vazio" msgid "empty heap" msgstr "heap vazia" +#: extmod/ulab/code/ndarray.c +msgid "empty index range" +msgstr "" + #: py/objstr.c msgid "empty separator" msgstr "" @@ -2015,6 +2076,10 @@ msgstr "" msgid "filesystem must provide mount method" msgstr "sistema de arquivos deve fornecer método de montagem" +#: extmod/ulab/code/ndarray.c +msgid "first argument must be an iterable" +msgstr "" + #: py/objtype.c msgid "first argument to super() must be type" msgstr "" @@ -2023,6 +2088,14 @@ msgstr "" msgid "firstbit must be MSB" msgstr "firstbit devem ser MSB" +#: extmod/ulab/code/ndarray.c +msgid "flattening order must be either 'C', or 'F'" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "flip argument must be an ndarray" +msgstr "" + #: py/objint.c msgid "float too big" msgstr "float muito grande" @@ -2039,6 +2112,10 @@ msgstr "" msgid "full" msgstr "cheio" +#: extmod/ulab/code/linalg.c +msgid "function defined for ndarrays only" +msgstr "" + #: py/argcheck.c msgid "function does not take keyword arguments" msgstr "função não aceita argumentos de palavras-chave" @@ -2115,6 +2192,10 @@ msgstr "" msgid "incorrect padding" msgstr "preenchimento incorreto" +#: extmod/ulab/code/ndarray.c +msgid "index is out of bounds" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c @@ -2125,10 +2206,46 @@ msgstr "Índice fora do intervalo" msgid "indices must be integers" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "indices must be integers, slices, or Boolean lists" +msgstr "" + #: py/compile.c msgid "inline assembler must be a function" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "input argument must be an integer or a 2-tuple" +msgstr "" + +#: extmod/ulab/code/fft.c +msgid "input array length must be power of 2" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input data must be an iterable" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is asymmetric" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is singular" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input must be square matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "input must be tuple, list, range, or ndarray" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input vectors must be of equal length" +msgstr "" + #: py/parsenum.c msgid "int() arg 2 must be >= 2 and <= 36" msgstr "" @@ -2207,6 +2324,14 @@ msgstr "" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "iterables are not of the same length" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "iterations did not converge" +msgstr "" + #: py/objstr.c msgid "join expects a list of str/bytes objects consistent with self object" msgstr "" @@ -2263,6 +2388,10 @@ msgstr "" msgid "math domain error" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c #, c-format @@ -2286,6 +2415,10 @@ msgstr "" msgid "module not found" msgstr "" +#: extmod/ulab/code/poly.c +msgid "more degrees of freedom than data points" +msgstr "" + #: py/compile.c msgid "multiple *x in assignment" msgstr "" @@ -2310,6 +2443,10 @@ msgstr "deve especificar todos sck/mosi/miso" msgid "must use keyword argument for key function" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "n must be between 0, and 9" +msgstr "" + #: py/runtime.c msgid "name '%q' is not defined" msgstr "" @@ -2396,6 +2533,14 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" +#: extmod/ulab/code/poly.c +msgid "number of arguments must be 2, or 3" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "number of points must be at least 2" +msgstr "" + #: py/obj.c #, c-format msgid "object '%s' is not a tuple or list" @@ -2454,6 +2599,14 @@ msgstr "" msgid "only bit_depth=16 is supported" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "only ndarray objects can be inverted" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "only ndarrays can be inverted" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" @@ -2463,6 +2616,22 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "only square matrices can be inverted" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operands could not be broadcast together" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "operation is not implemented on ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is not supported for given type" +msgstr "" + #: py/modbuiltins.c msgid "ord expects a character" msgstr "" @@ -2538,6 +2707,10 @@ msgstr "" msgid "queue overflow" msgstr "estouro de fila" +#: extmod/ulab/code/fft.c +msgid "real and imaginary parts must be of equal length" +msgstr "" + #: py/builtinimport.c msgid "relative import" msgstr "" @@ -2555,6 +2728,10 @@ msgstr "" msgid "return expected '%q' but got '%q'" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "right hand side must be an ndarray, or a scalar" +msgstr "" + #: py/objstr.c msgid "rsplit(None,n)" msgstr "" @@ -2577,6 +2754,10 @@ msgstr "" msgid "script compilation not supported" msgstr "compilação de script não suportada" +#: extmod/ulab/code/ndarray.c +msgid "shape must be a 2-tuple" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "" @@ -2589,6 +2770,10 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "size is defined for ndarrays only" +msgstr "" + #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" msgstr "" @@ -2605,6 +2790,10 @@ msgstr "" msgid "soft reboot\n" msgstr "" +#: extmod/ulab/code/numerical.c +msgid "sort argument must be an ndarray" +msgstr "" + #: py/objstr.c msgid "start/end indices" msgstr "" @@ -2696,12 +2885,16 @@ msgstr "timestamp fora do intervalo para a plataforma time_t" msgid "too many arguments provided with the given format" msgstr "Muitos argumentos fornecidos com o formato dado" +#: extmod/ulab/code/ndarray.c +msgid "too many indices" +msgstr "" + #: py/runtime.c #, c-format msgid "too many values to unpack (expected %d)" msgstr "" -#: py/objstr.c +#: extmod/ulab/code/linalg.c py/objstr.c msgid "tuple index out of range" msgstr "" @@ -2832,6 +3025,14 @@ msgstr "" msgid "window must be <= interval" msgstr "" +#: extmod/ulab/code/linalg.c +msgid "wrong argument type" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "wrong input type" +msgstr "" + #: py/objstr.c msgid "wrong number of arguments" msgstr "" @@ -2840,6 +3041,10 @@ msgstr "" msgid "wrong number of values to unpack" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "wrong operand type on the right hand side" +msgstr "" + #: shared-module/displayio/Shape.c msgid "x value out of bounds" msgstr "" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 9a9473436..c94f4240d 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-19 08:44+0000\n" +"POT-Creation-Date: 2020-02-27 11:02-0600\n" "PO-Revision-Date: 2019-04-13 10:10-0700\n" "Last-Translator: hexthat\n" "Language-Team: Chinese Hanyu Pinyin\n" @@ -684,6 +684,10 @@ msgstr "Qīwàng de chángdù wèi %d de yuán zǔ, dédào %d" msgid "Extended advertisements with scan response not supported." msgstr "Bù zhīchí dài yǒu sǎomiáo xiǎngyìng de kuòzhǎn guǎngbò." +#: extmod/ulab/code/fft.c +msgid "FFT is defined for ndarrays only" +msgstr "" + #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." msgstr "Fāsòng mìnglìng shībài." @@ -1140,6 +1144,7 @@ msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "Dāng biànliàng_pínlǜ shì False zài jiànzhú shí PWM pínlǜ bùkě xiě." +#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/stm32f4/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "Shàng bù zhīchí ParallelBus" @@ -1603,6 +1608,10 @@ msgstr "dìzhǐ wèi kōng" msgid "arg is an empty sequence" msgstr "cānshù shì yīgè kōng de xùliè" +#: extmod/ulab/code/numerical.c +msgid "argsort argument must be an ndarray" +msgstr "" + #: py/runtime.c msgid "argument has wrong type" msgstr "cānshù lèixíng cuòwù" @@ -1616,6 +1625,10 @@ msgstr "cānshù biānhào/lèixíng bù pǐpèi" msgid "argument should be a '%q' not a '%q'" msgstr "cānshù yīnggāi shì '%q', 'bùshì '%q'" +#: extmod/ulab/code/linalg.c +msgid "arguments must be ndarrays" +msgstr "" + #: py/objarray.c shared-bindings/nvm/ByteArray.c msgid "array/bytes required on right side" msgstr "yòu cè xūyào shùzǔ/zì jié" @@ -1624,6 +1637,18 @@ msgstr "yòu cè xūyào shùzǔ/zì jié" msgid "attributes not supported yet" msgstr "shǔxìng shàngwèi zhīchí" +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, None, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be -1, 0, or 1" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "axis must be None, 0, or 1" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "biānyì móshì cuòwù" @@ -1866,6 +1891,10 @@ msgstr "wúfǎ dǎorù míngchēng %q" msgid "cannot perform relative import" msgstr "wúfǎ zhíxíng xiāngguān dǎorù" +#: extmod/ulab/code/ndarray.c +msgid "cannot reshape array (incompatible input/output shape)" +msgstr "" + #: py/emitnative.c msgid "casting" msgstr "tóuyǐng" @@ -1925,6 +1954,30 @@ msgstr "chángshù bìxū shì yīgè zhěngshù" msgid "conversion to object" msgstr "zhuǎnhuàn wèi duìxiàng" +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be linear arrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "convolve arguments must not be empty" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "could not broadast input array from shape" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "could not invert Vandermonde matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "ddof must be smaller than length of data set" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "bù zhīchí xiǎoshù shù" @@ -1951,6 +2004,10 @@ msgstr "mùbiāo chángdù bìxū shì > = 0 de zhěngshù" msgid "dict update sequence has wrong length" msgstr "yǔfǎ gēngxīn xùliè de chángdù cuòwù" +#: extmod/ulab/code/numerical.c +msgid "diff argument must be an ndarray" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -1964,6 +2021,10 @@ msgstr "kòngxián" msgid "empty heap" msgstr "kōng yīn yīnxiào" +#: extmod/ulab/code/ndarray.c +msgid "empty index range" +msgstr "" + #: py/objstr.c msgid "empty separator" msgstr "kōng fēngé fú" @@ -2030,6 +2091,10 @@ msgstr "wénjiàn bìxū shì zài zì jié móshì xià dǎkāi de wénjiàn" msgid "filesystem must provide mount method" msgstr "wénjiàn xìtǒng bìxū tígōng guà zài fāngfǎ" +#: extmod/ulab/code/ndarray.c +msgid "first argument must be an iterable" +msgstr "" + #: py/objtype.c msgid "first argument to super() must be type" msgstr "chāojí () de dì yī gè cānshù bìxū shì lèixíng" @@ -2038,6 +2103,14 @@ msgstr "chāojí () de dì yī gè cānshù bìxū shì lèixíng" msgid "firstbit must be MSB" msgstr "dì yī wèi bìxū shì MSB" +#: extmod/ulab/code/ndarray.c +msgid "flattening order must be either 'C', or 'F'" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "flip argument must be an ndarray" +msgstr "" + #: py/objint.c msgid "float too big" msgstr "fú diǎn tài dà" @@ -2054,6 +2127,10 @@ msgstr "géshì yāoqiú yīgè yǔjù" msgid "full" msgstr "chōngfèn" +#: extmod/ulab/code/linalg.c +msgid "function defined for ndarrays only" +msgstr "" + #: py/argcheck.c msgid "function does not take keyword arguments" msgstr "hánshù méiyǒu guānjiàn cí cānshù" @@ -2130,6 +2207,10 @@ msgstr "géshì bù wánzhěng de mì yào" msgid "incorrect padding" msgstr "bù zhèngquè de tiánchōng" +#: extmod/ulab/code/ndarray.c +msgid "index is out of bounds" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c @@ -2140,10 +2221,46 @@ msgstr "suǒyǐn chāochū fànwéi" msgid "indices must be integers" msgstr "suǒyǐn bìxū shì zhěngshù" +#: extmod/ulab/code/ndarray.c +msgid "indices must be integers, slices, or Boolean lists" +msgstr "" + #: py/compile.c msgid "inline assembler must be a function" msgstr "nèi lián jíhé bìxū shì yīgè hánshù" +#: extmod/ulab/code/linalg.c +msgid "input argument must be an integer or a 2-tuple" +msgstr "" + +#: extmod/ulab/code/fft.c +msgid "input array length must be power of 2" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input data must be an iterable" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is asymmetric" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input matrix is singular" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "input must be square matrix" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "input must be tuple, list, range, or ndarray" +msgstr "" + +#: extmod/ulab/code/poly.c +msgid "input vectors must be of equal length" +msgstr "" + #: py/parsenum.c msgid "int() arg 2 must be >= 2 and <= 36" msgstr "zhěngshù() cānshù 2 bìxū > = 2 qiě <= 36" @@ -2222,6 +2339,14 @@ msgstr "issubclass() cānshù 1 bìxū shì yīgè lèi" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "issubclass() cānshù 2 bìxū shì lèi de lèi huò yuán zǔ" +#: extmod/ulab/code/ndarray.c +msgid "iterables are not of the same length" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "iterations did not converge" +msgstr "" + #: py/objstr.c msgid "join expects a list of str/bytes objects consistent with self object" msgstr "" @@ -2279,6 +2404,10 @@ msgstr "dìtú huǎnchōng qū tài xiǎo" msgid "math domain error" msgstr "shùxué yù cuòwù" +#: extmod/ulab/code/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c #, c-format @@ -2302,6 +2431,10 @@ msgstr "jìyì tǐ fēnpèi shībài, duī bèi suǒdìng" msgid "module not found" msgstr "zhǎo bù dào mókuài" +#: extmod/ulab/code/poly.c +msgid "more degrees of freedom than data points" +msgstr "" + #: py/compile.c msgid "multiple *x in assignment" msgstr "duō gè*x zài zuòyè zhōng" @@ -2326,6 +2459,10 @@ msgstr "bìxū zhǐdìng suǒyǒu sck/mosi/misco" msgid "must use keyword argument for key function" msgstr "bìxū shǐyòng guānjiàn cí cānshù" +#: extmod/ulab/code/numerical.c +msgid "n must be between 0, and 9" +msgstr "" + #: py/runtime.c msgid "name '%q' is not defined" msgstr "míngchēng '%q' wèi dìngyì" @@ -2413,6 +2550,14 @@ msgstr "bùshì zì chuàn géshì huà guòchéng zhōng zhuǎnhuàn de suǒyǒ msgid "not enough arguments for format string" msgstr "géshì zìfú chuàn cān shǔ bùzú" +#: extmod/ulab/code/poly.c +msgid "number of arguments must be 2, or 3" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "number of points must be at least 2" +msgstr "" + #: py/obj.c #, c-format msgid "object '%s' is not a tuple or list" @@ -2471,6 +2616,14 @@ msgstr "piānlí biānjiè" msgid "only bit_depth=16 is supported" msgstr "Jǐn zhīchí wèi shēndù = 16" +#: extmod/ulab/code/linalg.c +msgid "only ndarray objects can be inverted" +msgstr "" + +#: extmod/ulab/code/linalg.c +msgid "only ndarrays can be inverted" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "Jǐn zhīchí cǎiyàng lǜ = 16000" @@ -2480,6 +2633,22 @@ msgstr "Jǐn zhīchí cǎiyàng lǜ = 16000" msgid "only slices with step=1 (aka None) are supported" msgstr "jǐn zhīchí bù zhǎng = 1(jí wú) de qiēpiàn" +#: extmod/ulab/code/linalg.c +msgid "only square matrices can be inverted" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operands could not be broadcast together" +msgstr "" + +#: extmod/ulab/code/numerical.c +msgid "operation is not implemented on ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is not supported for given type" +msgstr "" + #: py/modbuiltins.c msgid "ord expects a character" msgstr "ord yùqí zìfú" @@ -2555,6 +2724,10 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" msgid "queue overflow" msgstr "duìliè yìchū" +#: extmod/ulab/code/fft.c +msgid "real and imaginary parts must be of equal length" +msgstr "" + #: py/builtinimport.c msgid "relative import" msgstr "xiāngduì dǎorù" @@ -2572,6 +2745,10 @@ msgstr "fǎnhuí zhùshì bìxū shì biāozhì fú" msgid "return expected '%q' but got '%q'" msgstr "fǎnhuí yùqí de '%q' dàn huòdéle '%q'" +#: extmod/ulab/code/ndarray.c +msgid "right hand side must be an ndarray, or a scalar" +msgstr "" + #: py/objstr.c msgid "rsplit(None,n)" msgstr "" @@ -2596,6 +2773,10 @@ msgstr "jìhuà duīzhàn yǐ mǎn" msgid "script compilation not supported" msgstr "bù zhīchí jiǎoběn biānyì" +#: extmod/ulab/code/ndarray.c +msgid "shape must be a 2-tuple" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "zìfú chuàn géshì shuōmíng fú zhōng bù yǔnxǔ shǐyòng fúhào" @@ -2608,6 +2789,10 @@ msgstr "zhěngshù géshì shuōmíng fú 'c' bù yǔnxǔ shǐyòng fúhào" msgid "single '}' encountered in format string" msgstr "zài géshì zìfú chuàn zhōng yù dào de dāngè '}'" +#: extmod/ulab/code/linalg.c +msgid "size is defined for ndarrays only" +msgstr "" + #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" msgstr "shuìmián chángdù bìxū shìfēi fùshù" @@ -2624,6 +2809,10 @@ msgstr "xiǎo zhěngshù yìchū" msgid "soft reboot\n" msgstr "ruǎn chóngqǐ\n" +#: extmod/ulab/code/numerical.c +msgid "sort argument must be an ndarray" +msgstr "" + #: py/objstr.c msgid "start/end indices" msgstr "kāishǐ/jiéshù zhǐshù" @@ -2713,12 +2902,16 @@ msgstr "time_t shíjiān chuō chāochū píngtái fànwéi" msgid "too many arguments provided with the given format" msgstr "tígōng jǐ dìng géshì de cānshù tài duō" +#: extmod/ulab/code/ndarray.c +msgid "too many indices" +msgstr "" + #: py/runtime.c #, c-format msgid "too many values to unpack (expected %d)" msgstr "dǎkāi tài duō zhí (yùqí %d)" -#: py/objstr.c +#: extmod/ulab/code/linalg.c py/objstr.c msgid "tuple index out of range" msgstr "yuán zǔ suǒyǐn chāochū fànwéi" @@ -2849,6 +3042,14 @@ msgstr "zhí jìshù bìxū wèi > 0" msgid "window must be <= interval" msgstr "Chuāngkǒu bìxū shì <= jiàngé" +#: extmod/ulab/code/linalg.c +msgid "wrong argument type" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "wrong input type" +msgstr "" + #: py/objstr.c msgid "wrong number of arguments" msgstr "cānshù shù cuòwù" @@ -2857,6 +3058,10 @@ msgstr "cānshù shù cuòwù" msgid "wrong number of values to unpack" msgstr "wúfǎ jiě bāo de zhí shù" +#: extmod/ulab/code/ndarray.c +msgid "wrong operand type on the right hand side" +msgstr "" + #: shared-module/displayio/Shape.c msgid "x value out of bounds" msgstr "x zhí chāochū biānjiè" diff --git a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk index df1a2d8eb..eb3c81485 100644 --- a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk +++ b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk @@ -15,3 +15,5 @@ CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_NETWORK = 0 CIRCUITPY_PS2IO = 0 CIRCUITPY_AUDIOMP3 = 0 + +MICROPY_PY_ULAB = 0 diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index 354745a2c..7565e41a4 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -62,6 +62,12 @@ ifndef CIRCUITPY_SAMD CIRCUITPY_SAMD = 1 endif +ifndef MICROPY_PY_ULAB +ifneq ($(CIRCUITPY_SMALL_BUILD),1) +MICROPY_PY_ULAB = 1 +endif +endif + endif # samd51 INTERNAL_LIBM = 1 diff --git a/ports/nrf/mpconfigport.mk b/ports/nrf/mpconfigport.mk index 9b738d4b3..db1b6b03e 100644 --- a/ports/nrf/mpconfigport.mk +++ b/ports/nrf/mpconfigport.mk @@ -69,4 +69,5 @@ NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 # Defined here because system_nrf52840.c doesn't #include any of our own include files. CFLAGS += -DCONFIG_NFCT_PINS_AS_GPIOS +MICROPY_PY_ULAB = 1 endif diff --git a/ports/unix/mpconfigport.mk b/ports/unix/mpconfigport.mk index f0aa955c0..4cb1804d4 100644 --- a/ports/unix/mpconfigport.mk +++ b/ports/unix/mpconfigport.mk @@ -40,3 +40,5 @@ MICROPY_PY_JNI = 0 # Avoid using system libraries, use copies bundled with MicroPython # as submodules (currently affects only libffi). MICROPY_STANDALONE = 0 + +MICROPY_PY_ULAB = 1 diff --git a/py/builtin.h b/py/builtin.h index 84b99a8a4..6e0d5d9be 100644 --- a/py/builtin.h +++ b/py/builtin.h @@ -117,6 +117,13 @@ extern const mp_obj_module_t mp_module_websocket; extern const mp_obj_module_t mp_module_webrepl; extern const mp_obj_module_t mp_module_framebuf; extern const mp_obj_module_t mp_module_btree; +extern const mp_obj_module_t ulab_user_cmodule; +extern mp_obj_module_t ulab_fft_module; +extern mp_obj_module_t ulab_filter_module; +extern mp_obj_module_t ulab_linalg_module; +extern mp_obj_module_t ulab_numerical_module; +extern mp_obj_module_t ulab_poly_module; + extern const char MICROPY_PY_BUILTINS_HELP_TEXT[]; diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index 68fa25d8d..92021d0d0 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -431,6 +431,19 @@ $(addprefix lib/,\ libm/atanf.c \ libm/atan2f.c \ ) +ifeq ($(MICROPY_PY_ULAB),1) +SRC_LIBM += \ +$(addprefix lib/,\ + libm/acoshf.c \ + libm/asinhf.c \ + libm/atanhf.c \ + libm/erf_lgamma.c \ + libm/log1pf.c \ + libm/sf_erf.c \ + libm/wf_lgamma.c \ + libm/wf_tgamma.c \ + ) +endif endif ifdef LD_TEMPLATE_FILE diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 53cd7b0bb..61dd901ed 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -578,6 +578,12 @@ extern const struct _mp_obj_module_t ustack_module; #define JSON_MODULE #endif +#if defined(MICROPY_PY_ULAB) && MICROPY_PY_ULAB +#define ULAB_MODULE \ + { MP_ROM_QSTR(MP_QSTR_ulab), MP_ROM_PTR(&ulab_user_cmodule) }, +#else +#define ULAB_MODULE +#endif #if MICROPY_PY_URE #define RE_MODULE { MP_ROM_QSTR(MP_QSTR_re), MP_ROM_PTR(&mp_module_ure) }, #else diff --git a/py/mpconfig.h b/py/mpconfig.h index 1512c7d3a..8f78ade5c 100755 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1173,6 +1173,10 @@ typedef double mp_float_t; #define MICROPY_PY_UJSON (0) #endif +#ifndef MICROPY_PY_ULAB +#define MICROPY_PY_ULAB (0) +#endif + #ifndef MICROPY_PY_URE #define MICROPY_PY_URE (0) #endif diff --git a/py/objmodule.c b/py/objmodule.c index 627ba79e8..c7b080300 100644 --- a/py/objmodule.c +++ b/py/objmodule.c @@ -206,6 +206,14 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = { { MP_ROM_QSTR(MP_QSTR_ujson), MP_ROM_PTR(&mp_module_ujson) }, #endif #endif +#if MICROPY_PY_ULAB +#if CIRCUITPY +// CircuitPython: Defined in MICROPY_PORT_BUILTIN_MODULES, so not defined here. +// TODO: move to shared-bindings/ +#else + { MP_ROM_QSTR(MP_QSTR_ulab), MP_ROM_PTR(&ulab_user_cmodule) }, +#endif +#endif #if MICROPY_PY_URE #if CIRCUITPY // CircuitPython: Defined in MICROPY_PORT_BUILTIN_MODULES, so not defined here. diff --git a/py/py.mk b/py/py.mk index a73b47f37..01fce2447 100644 --- a/py/py.mk +++ b/py/py.mk @@ -105,6 +105,21 @@ $(BUILD)/$(BTREE_DIR)/%.o: CFLAGS += -Wno-old-style-definition -Wno-sign-compare $(BUILD)/extmod/modbtree.o: CFLAGS += $(BTREE_DEFS) endif +ifeq ($(MICROPY_PY_ULAB),1) +SRC_MOD += $(addprefix extmod/ulab/code/, \ +filter.c \ +fft.c \ +linalg.c \ +ndarray.c \ +numerical.c \ +poly.c \ +vectorise.c \ +ulab.c \ + ) +CFLAGS_MOD += -DMICROPY_PY_ULAB=1 -DMODULE_ULAB_ENABLED=1 +$(BUILD)/extmod/ulab/code/%.o: CFLAGS += -Wno-sign-compare -Wno-missing-prototypes -Wno-unused-parameter -Wno-missing-declarations -Wno-error -Wno-shadow -Wno-maybe-uninitialized -DCIRCUITPY +endif + # External modules written in C. ifneq ($(USER_C_MODULES),) # pre-define USERMOD variables as expanded so that variables are immediate diff --git a/shared-bindings/audiocore/RawSample.c b/shared-bindings/audiocore/RawSample.c index 87d410ea1..96af58a4f 100644 --- a/shared-bindings/audiocore/RawSample.c +++ b/shared-bindings/audiocore/RawSample.c @@ -49,7 +49,7 @@ //| first sample will be for channel 1, the second sample will be for channel two, the third for //| channel 1 and so on. //| -//| :param array buffer: An `array.array` with samples +//| :param array.array buffer: An `array.array` with samples //| :param int channel_count: The number of channels in the buffer //| :param int sample_rate: The desired playback sample rate //| diff --git a/shared-bindings/ulab/__init__.rst b/shared-bindings/ulab/__init__.rst new file mode 100644 index 000000000..329d28ca2 --- /dev/null +++ b/shared-bindings/ulab/__init__.rst @@ -0,0 +1,459 @@ + +:mod:`ulab` --- Manipulate numeric data similar to numpy +======================================================== + +.. module:: ulab + :synopsis: Manipulate numeric data similar to numpy + +`ulab` is a numpy-like module for micropython, meant to simplify and +speed up common mathematical operations on arrays. The primary goal was to +implement a small subset of numpy that might be useful in the context of a +microcontroller. This means low-level data processing of linear (array) and +two-dimensional (matrix) data. + +`ulab` is adapted from micropython-ulab, and the original project's +documentation can be found at +https://micropython-ulab.readthedocs.io/en/latest/ + +`ulab` is modeled after numpy, and aims to be a compatible subset where +possible. Numpy's documentation can be found at +https://docs.scipy.org/doc/numpy/index.html + +.. contents:: + +.. attribute:: __version__ + +The closest corresponding version of micropython-ulab + +ulab.array -- 1- and 2- dimensional array +----------------------------------------- + +.. class:: ulab.array(values, \*, dtype=float) + + :param sequence values: Sequence giving the initial content of the array. + :param dtype: The type of array values, ``int8``, ``uint8``, ``int16``, ``uint16``, or ``float`` + + The `values` sequence can either be a sequence of numbers (in which case a + 1-dimensional array is created), or a sequence where each subsequence has + the same length (in which case a 2-dimensional array is created). + + In many cases, it is more convenient to create an array from a function + like `zeros` or `linspace`. + + `ulab.array` implements the buffer protocol, so it can be used in many + places an `array.array` can be used. + + .. attribute:: shape + + The size of the array, a tuple of length 1 or 2 + + .. attribute:: size + + The number of elements in the array + + .. attribute:: itemsize + + The number of elements in the array + + .. method:: flatten(\*, order='C') + + :param order: Whether to flatten by rows ('C') or columns ('F') + + Returns a new `ulab.array` object which is always 1 dimensional. + If order is 'C' (the default", then the data is ordered in rows; + If it is 'F', then the data is ordered in columns. "C" and "F" refer + to the typical storage organization of the C and Fortran languages. + + .. method:: sort(\*, axis=1) + + :param axis: Whether to sort elements within rows (0), columns (1), or elements (None) + + .. method:: transpose() + + Swap the rows and columns of a 2-dimensional array + + .. method:: __add__() + + Adds corresponding elements of the two arrays, or adds a number to all + elements of the array. A number must be on the right hand side. If + both arguments are arrays, their sizes must match. + + .. method:: __sub__() + + Subtracts corresponding elements of the two arrays, or subtracts a + number from all elements of the array. A number must be on the right + hand side. If both arguments are arrays, their sizes must match. + + .. method:: __mul__() + + Multiplies corresponding elements of the two arrays, or multiplies + all elements of the array by a number. A number must be on the right + hand side. If both arguments are arrays, their sizes must match. + + .. method:: __div__() + + Multiplies corresponding elements of the two arrays, or divides + all elements of the array by a number. A number must be on the right + hand side. If both arguments are arrays, their sizes must match. + + .. method:: __getitem__() + + Retrieve an element of the array. + + .. method:: __setitem__() + + Set an element of the array. + +Array type codes +---------------- +.. attribute:: int8 + + Type code for signed integers in the range -128 .. 127 inclusive, like the 'b' typecode of `array.array` + +.. attribute:: int16 + + Type code for signed integers in the range -32768 .. 32767 inclusive, like the 'h' typecode of `array.array` + +.. attribute:: float + + Type code for floating point values, like the 'f' typecode of `array.array` + +.. attribute:: uint8 + + Type code for unsigned integers in the range 0 .. 255 inclusive, like the 'H' typecode of `array.array` + +.. attribute:: uint8 + + Type code for unsigned integers in the range 0 .. 65535 inclusive, like the 'h' typecode of `array.array` + + +Basic Array defining functions +------------------------------ +See also `ulab.linalg.eye` and `ulab.numerical.linspace` for other useful +array defining functions. + +.. method:: ones(shape, \*, dtype=float) + + .. param: shape + Shape of the array, either an integer (for a 1-D array) or a tuple of 2 integers (for a 2-D array) + + .. param: dtype + Type of values in the array + + Return a new array of the given shape with all elements set to 1. + +.. method:: zeros + + .. param: shape + Shape of the array, either an integer (for a 1-D array) or a tuple of 2 integers (for a 2-D array) + + .. param: dtype + Type of values in the array + + Return a new array of the given shape with all elements set to 0. + + +.. method:: eye(size, \*, dtype=float) + + Return a new square array of size, with the diagonal elements set to 1 + and the other elements set to 0. + + +:mod:`ulab.vector` --- Element-by-element functions +=================================================== + +.. module:: ulab.vector + +These functions can operate on numbers, 1-D arrays, or 2-D arrays by +applying the function to every element in the array. This is typically +much more efficient than expressing the same operation as a Python loop. + +.. method:: acos + + Computes the inverse cosine function + +.. method:: acosh + + Computes the inverse hyperbolic cosine function + +.. method:: asin + + Computes the inverse sine function + +.. method:: asinh + + Computes the inverse hyperbolic sine function + +.. method:: atan + + Computes the inverse tangent function + +.. method:: atanh + + Computes the inverse hyperbolic tangent function + +.. method:: ceil + + Rounds numbers up to the next whole number + +.. method:: cos + + Computes the cosine function + +.. method:: erf + + Computes the error function, which has applications in statistics + +.. method:: erfc + + Computes the complementary error function, which has applications in statistics + +.. method:: exp + + Computes the exponent function. + +.. method:: expm1 + + Computes $e^x-1$. In certain applications, using this function preserves numeric accuracy better than the `exp` function. + +.. method:: floor + + Rounds numbers up to the next whole number + +.. method:: gamma + + Computes the gamma function + +.. method:: lgamma + + Computes the natural log of the gamma function + +.. method:: log + + Computes the natural log + +.. method:: log10 + + Computes the log base 10 + +.. method:: log2 + + Computes the log base 2 + +.. method:: sin + + Computes the sine + +.. method:: sinh + + Computes the hyperbolic sine + +.. method:: sqrt + + Computes the square root + +.. method:: tan + + Computes the tangent + +.. method:: tanh + + Computes the hyperbolic tangent + +:mod:`ulab.linalg` - Linear algebra functions +============================================= + +.. module:: ulab.linalg + +.. method:: det + + :param: m, a square matrix + :return float: The determinant of the matrix + + Computes the eigenvalues and eigenvectors of a square matrix + +.. method:: dot(m1, m2) + + :param ~ulab.array m1: a matrix + :param ~ulab.array m2: a matrix + + Computes the matrix product of two matrices + + **WARNING:** Unlike ``numpy``, this function cannot be used to compute the dot product of two vectors + +.. method:: eig(m) + + :param m: a square matrix + :return tuple (eigenvectors, eigenvaues): + + Computes the eigenvalues and eigenvectors of a square matrix + + +.. method:: eye(size, \*, dtype=float) + + :param int: size - The number of rows and colums in the matrix + + Returns a square matrix with all the diagonal elements set to 1 and all + other elements set to 0 + +.. method:: inv(m) + + :param ~ulab.array m: a square matrix + :return: The inverse of the matrix, if it exists + :raises ValueError: if the matrix is not invertible + + Computes the inverse of a square matrix + +.. method:: size(array) + + Return the total number of elements in the array, as an integer. + +:mod:`ulab.filter` --- Filtering functions +========================================== + +.. module:: ulab.filter + +.. method:: convolve(r, c=None) + + :param ulab.array a: + :param ulab.array v: + + Returns the discrete, linear convolution of two one-dimensional sequences. + The result is always an array of float. Only the ``full`` mode is supported, + and the ``mode`` named parameter of numpy is not accepted. Note that all other + modes can be had by slicing a ``full`` result. + + Convolution filters can implement high pass, low pass, band pass, etc., + filtering operations. Convolution filters are typically constructed ahead + of time. This can be done using desktop python with scipy, or on web pages + such as https://fiiir.com/ + + Convolution is most time-efficient when both inputs are of float type. + +:mod:`ulab.fft` --- Frequency-domain functions +============================================== + +.. module:: ulab.fft + +.. method:: fft(r, c=None) + + :param ulab.array r: A 1-dimension array of values whose size is a power of 2 + :param ulab.array c: An optional 1-dimension array of values whose size is a power of 2, giving the complex part of the value + :return tuple (r, c): The real and complex parts of the FFT + + Perform a Fast Fourier Transform from the time domain into the frequency domain + +.. method:: ifft(r, c=None) + + :param ulab.array r: A 1-dimension array of values whose size is a power of 2 + :param ulab.array c: An optional 1-dimension array of values whose size is a power of 2, giving the complex part of the value + :return tuple (r, c): The real and complex parts of the inverse FFT + + Perform an Inverse Fast Fourier Transform from the frequeny domain into the time domain + +.. method:: spectrum(r): + + :param ulab.array r: A 1-dimension array of values whose size is a power of 2 + + Computes the spectrum of the input signal. This is the absolute value of the (complex-valued) fft of the signal. + +:mod:`ulab.numerical` --- Numerical and Statistical functions +============================================================= + +.. module:: ulab.numerical + +Most of these functions take an "axis" argument, which indicates whether to +operate over the flattened array (None), rows (0), or columns (1). + +.. method:: argmax(array, \*, axis=None) + + Return the index of the maximum element of the 1D array, as an array with 1 element + +.. method:: argmin(array, \*, axis=None) + + Return the index of the minimum element of the 1D array, as an array with 1 element + +.. method:: argsort(array, \*, axis=None) + + Returns an array which gives indices into the input array from least to greatest. + +.. method:: diff(array, \*, axis=1) + + Return the numerical derivative of successive elements of the array, as + an array. axis=None is not supported. + +.. method:: flip(array, \*, axis=None) + + Returns a new array that reverses the order of the elements along the + given axis, or along all axes if axis is None. + +.. method:: linspace(start, stop, \*, dtype=float, num=50, endpoint=True) + + .. param: start + + First value in the array + + .. param: stop + + Final value in the array + + .. param int: num + + Count of values in the array + + .. param: dtype + + Type of values in the array + + .. param bool: endpoint + + Whether the ``stop`` value is included. Note that even when + endpoint=True, the exact ``stop`` value may not be included due to the + inaccuracy of floating point arithmetic. + + Return a new 1-D array with ``num`` elements ranging from ``start`` to ``stop`` linearly. + +.. method:: max(array, \*, axis=None) + + Return the maximum element of the 1D array, as an array with 1 element + +.. method:: mean(array, \*, axis=None) + + Return the mean element of the 1D array, as a number if axis is None, otherwise as an array. + +.. method:: min(array, \*, axis=None) + + Return the minimum element of the 1D array, as an array with 1 element + +.. method:: roll(array, distance, \*, axis=None) + + Shift the content of a vector by the positions given as the second + argument. If the ``axis`` keyword is supplied, the shift is applied to + the given axis. The array is modified in place. + +.. method:: std(array, \*, axis=None) + + Return the standard deviation of the array, as a number if axis is None, otherwise as an array. + +.. method:: sum(array, \*, axis=None) + + Return the sum of the array, as a number if axis is None, otherwise as an array. + +.. method:: sort(array, \*, axis=0) + + Sort the array along the given axis, or along all axes if axis is None. + The array is modified in place. + +:mod:`ulab.poly` --- Polynomial functions +========================================= + +.. module:: ulab.poly + +.. method:: polyfit([x, ] y, degree) + + Return a polynomial of given degree that approximates the function + f(x)=y. If x is not supplied, it is the range(len(y)). + +.. method:: polyval(p, x) + + Evaluate the polynomial p at the points x. x must be an array. diff --git a/tests/run-tests b/tests/run-tests index 94e1591e8..28eed1e80 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -579,7 +579,7 @@ the last matching regex is used: # run PC tests test_dirs = ( 'basics', 'micropython', 'float', 'import', 'io', 'misc', - 'stress', 'unicode', 'extmod', 'unix', 'cmdline', + 'stress', 'unicode', 'extmod', 'ulab', 'unix', 'cmdline', ) else: # run tests from these directories diff --git a/tests/ulab/smoke.py b/tests/ulab/smoke.py new file mode 100644 index 000000000..1cc7fd86d --- /dev/null +++ b/tests/ulab/smoke.py @@ -0,0 +1,84 @@ +try: + import ulab +except: + print('SKIP') + raise SystemExit + +ulab.array([1,2,3]) +ulab.array([1,2,3], dtype=ulab.int8) +ulab.array([1,2,3], dtype=ulab.int16) +ulab.array([1,2,3], dtype=ulab.uint8) +ulab.array([1,2,3], dtype=ulab.uint16) +ulab.array([1,2,3], dtype=ulab.float) +ulab.zeros(3) +ulab.ones(3) +a = ulab.linalg.eye(3) +a.shape +a.size +a.itemsize +a.flatten +a.sort() +a.transpose() +a + 0 +a + a +a * 0 +a * a +a / 1 +a / a +a - 0 +a - a ++a +-a +a[0] +a[:] +a[0] = 0 +a[:] = ulab.zeros((3,3)) +a = ulab.linalg.eye(3) +ulab.vector.acos(a) +ulab.vector.acosh(a) +ulab.vector.asin(a) +ulab.vector.asinh(a) +ulab.vector.atan(a) +ulab.vector.atanh(a) +ulab.vector.ceil(a) +ulab.vector.cos(a) +#ulab.vector.cosh(a) +ulab.vector.sin(a) +ulab.vector.sinh(a) +ulab.vector.tan(a) +ulab.vector.tanh(a) +ulab.vector.erf(a) +ulab.vector.erfc(a) +ulab.vector.exp(a) +ulab.vector.expm1(a) +ulab.vector.floor(a) +ulab.vector.gamma(a) +ulab.vector.lgamma(a) +ulab.vector.log(a) +ulab.vector.log2(a) +ulab.vector.sqrt(a) +ulab.linalg.dot(a,a) +ulab.linalg.inv(a) +ulab.linalg.eig(a) +ulab.linalg.det(a) +ulab.filter.convolve(ulab.array([1,2,3]), ulab.array([1,10,100,1000])) +ulab.numerical.linspace(0, 10, num=3) +a = ulab.numerical.linspace(0, 10, num=256, endpoint=True) +ulab.fft.spectrum(a) +p, q = ulab.fft.fft(a) +ulab.fft.ifft(p) +ulab.fft.ifft(p,q) +ulab.numerical.argmin(a) +ulab.numerical.argmax(a) +ulab.numerical.argsort(a) +ulab.numerical.max(a) +ulab.numerical.min(a) +ulab.numerical.mean(a) +ulab.numerical.std(a) +ulab.numerical.diff(a) +#ulab.size(a) +f = ulab.poly.polyfit([1,2,3], 3) +ulab.poly.polyval([1,2,3], [1,2,3]) +ulab.numerical.sort(a) +ulab.numerical.flip(a) +ulab.numerical.roll(a, 1) diff --git a/tests/ulab/smoke.py.exp b/tests/ulab/smoke.py.exp new file mode 100644 index 000000000..e69de29bb -- cgit v1.2.3 From 39cfe32c345781b32d235353c2e59acacbc32dc6 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 27 Feb 2020 14:14:05 -0600 Subject: Update ulab from upstream again --- extmod/ulab | 2 +- py/py.mk | 5 ++-- shared-bindings/ulab/__init__.rst | 63 +++++++++++++++++---------------------- tests/ulab/smoke.py | 8 ++--- 4 files changed, 35 insertions(+), 43 deletions(-) (limited to 'tests') diff --git a/extmod/ulab b/extmod/ulab index 6b9ea24b2..42d831e1e 160000 --- a/extmod/ulab +++ b/extmod/ulab @@ -1 +1 @@ -Subproject commit 6b9ea24b2e57e200d9e2e0f41f6836b1fd73c348 +Subproject commit 42d831e1e65b1c75ed90de11b87a1c4a0ebe6152 diff --git a/py/py.mk b/py/py.mk index 01fce2447..5e044947a 100644 --- a/py/py.mk +++ b/py/py.mk @@ -107,14 +107,15 @@ endif ifeq ($(MICROPY_PY_ULAB),1) SRC_MOD += $(addprefix extmod/ulab/code/, \ -filter.c \ +create.c \ fft.c \ +filter.c \ linalg.c \ ndarray.c \ numerical.c \ poly.c \ -vectorise.c \ ulab.c \ +vectorise.c \ ) CFLAGS_MOD += -DMICROPY_PY_ULAB=1 -DMODULE_ULAB_ENABLED=1 $(BUILD)/extmod/ulab/code/%.o: CFLAGS += -Wno-sign-compare -Wno-missing-prototypes -Wno-unused-parameter -Wno-missing-declarations -Wno-error -Wno-shadow -Wno-maybe-uninitialized -DCIRCUITPY diff --git a/shared-bindings/ulab/__init__.rst b/shared-bindings/ulab/__init__.rst index 7e30f2a10..b2933be79 100644 --- a/shared-bindings/ulab/__init__.rst +++ b/shared-bindings/ulab/__init__.rst @@ -129,8 +129,6 @@ Array type codes Basic Array defining functions ------------------------------ -See also `ulab.linalg.eye` and `ulab.numerical.linspace` for other useful -array defining functions. .. method:: ones(shape, \*, dtype=float) @@ -158,6 +156,33 @@ array defining functions. Return a new square array of size, with the diagonal elements set to 1 and the other elements set to 0. +.. method:: linspace(start, stop, \*, dtype=float, num=50, endpoint=True) + + .. param: start + + First value in the array + + .. param: stop + + Final value in the array + + .. param int: num + + Count of values in the array + + .. param: dtype + + Type of values in the array + + .. param bool: endpoint + + Whether the ``stop`` value is included. Note that even when + endpoint=True, the exact ``stop`` value may not be included due to the + inaccuracy of floating point arithmetic. + + Return a new 1-D array with ``num`` elements ranging from ``start`` to ``stop`` linearly. + + :mod:`ulab.vector` --- Element-by-element functions =================================================== @@ -288,14 +313,6 @@ much more efficient than expressing the same operation as a Python loop. Computes the eigenvalues and eigenvectors of a square matrix - -.. method:: eye(size, \*, dtype=float) - - :param int: size - The number of rows and columns in the matrix - - Returns a square matrix with all the diagonal elements set to 1 and all - other elements set to 0 - .. method:: inv(m) :param ~ulab.array m: a square matrix @@ -387,32 +404,6 @@ operate over the flattened array (None), rows (0), or columns (1). Returns a new array that reverses the order of the elements along the given axis, or along all axes if axis is None. -.. method:: linspace(start, stop, \*, dtype=float, num=50, endpoint=True) - - .. param: start - - First value in the array - - .. param: stop - - Final value in the array - - .. param int: num - - Count of values in the array - - .. param: dtype - - Type of values in the array - - .. param bool: endpoint - - Whether the ``stop`` value is included. Note that even when - endpoint=True, the exact ``stop`` value may not be included due to the - inaccuracy of floating point arithmetic. - - Return a new 1-D array with ``num`` elements ranging from ``start`` to ``stop`` linearly. - .. method:: max(array, \*, axis=None) Return the maximum element of the 1D array, as an array with 1 element diff --git a/tests/ulab/smoke.py b/tests/ulab/smoke.py index 1cc7fd86d..e6d7f5513 100644 --- a/tests/ulab/smoke.py +++ b/tests/ulab/smoke.py @@ -12,7 +12,7 @@ ulab.array([1,2,3], dtype=ulab.uint16) ulab.array([1,2,3], dtype=ulab.float) ulab.zeros(3) ulab.ones(3) -a = ulab.linalg.eye(3) +a = ulab.eye(3) a.shape a.size a.itemsize @@ -33,7 +33,7 @@ a[0] a[:] a[0] = 0 a[:] = ulab.zeros((3,3)) -a = ulab.linalg.eye(3) +a = ulab.eye(3) ulab.vector.acos(a) ulab.vector.acosh(a) ulab.vector.asin(a) @@ -62,8 +62,8 @@ ulab.linalg.inv(a) ulab.linalg.eig(a) ulab.linalg.det(a) ulab.filter.convolve(ulab.array([1,2,3]), ulab.array([1,10,100,1000])) -ulab.numerical.linspace(0, 10, num=3) -a = ulab.numerical.linspace(0, 10, num=256, endpoint=True) +ulab.linspace(0, 10, num=3) +a = ulab.linspace(0, 10, num=256, endpoint=True) ulab.fft.spectrum(a) p, q = ulab.fft.fft(a) ulab.fft.ifft(p) -- cgit v1.2.3 From c0bfa117661766cdc7d5a3daca88008a669b5a90 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 27 Feb 2020 14:17:29 -0600 Subject: Use tests from ulab extmod, instead of our own --- tests/run-tests | 2 +- tests/ulab/smoke.py | 84 ------------------------------------------------- tests/ulab/smoke.py.exp | 0 3 files changed, 1 insertion(+), 85 deletions(-) delete mode 100644 tests/ulab/smoke.py delete mode 100644 tests/ulab/smoke.py.exp (limited to 'tests') diff --git a/tests/run-tests b/tests/run-tests index 28eed1e80..f6c727a8a 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -579,7 +579,7 @@ the last matching regex is used: # run PC tests test_dirs = ( 'basics', 'micropython', 'float', 'import', 'io', 'misc', - 'stress', 'unicode', 'extmod', 'ulab', 'unix', 'cmdline', + 'stress', 'unicode', 'extmod', '../extmod/ulab/tests', 'unix', 'cmdline', ) else: # run tests from these directories diff --git a/tests/ulab/smoke.py b/tests/ulab/smoke.py deleted file mode 100644 index e6d7f5513..000000000 --- a/tests/ulab/smoke.py +++ /dev/null @@ -1,84 +0,0 @@ -try: - import ulab -except: - print('SKIP') - raise SystemExit - -ulab.array([1,2,3]) -ulab.array([1,2,3], dtype=ulab.int8) -ulab.array([1,2,3], dtype=ulab.int16) -ulab.array([1,2,3], dtype=ulab.uint8) -ulab.array([1,2,3], dtype=ulab.uint16) -ulab.array([1,2,3], dtype=ulab.float) -ulab.zeros(3) -ulab.ones(3) -a = ulab.eye(3) -a.shape -a.size -a.itemsize -a.flatten -a.sort() -a.transpose() -a + 0 -a + a -a * 0 -a * a -a / 1 -a / a -a - 0 -a - a -+a --a -a[0] -a[:] -a[0] = 0 -a[:] = ulab.zeros((3,3)) -a = ulab.eye(3) -ulab.vector.acos(a) -ulab.vector.acosh(a) -ulab.vector.asin(a) -ulab.vector.asinh(a) -ulab.vector.atan(a) -ulab.vector.atanh(a) -ulab.vector.ceil(a) -ulab.vector.cos(a) -#ulab.vector.cosh(a) -ulab.vector.sin(a) -ulab.vector.sinh(a) -ulab.vector.tan(a) -ulab.vector.tanh(a) -ulab.vector.erf(a) -ulab.vector.erfc(a) -ulab.vector.exp(a) -ulab.vector.expm1(a) -ulab.vector.floor(a) -ulab.vector.gamma(a) -ulab.vector.lgamma(a) -ulab.vector.log(a) -ulab.vector.log2(a) -ulab.vector.sqrt(a) -ulab.linalg.dot(a,a) -ulab.linalg.inv(a) -ulab.linalg.eig(a) -ulab.linalg.det(a) -ulab.filter.convolve(ulab.array([1,2,3]), ulab.array([1,10,100,1000])) -ulab.linspace(0, 10, num=3) -a = ulab.linspace(0, 10, num=256, endpoint=True) -ulab.fft.spectrum(a) -p, q = ulab.fft.fft(a) -ulab.fft.ifft(p) -ulab.fft.ifft(p,q) -ulab.numerical.argmin(a) -ulab.numerical.argmax(a) -ulab.numerical.argsort(a) -ulab.numerical.max(a) -ulab.numerical.min(a) -ulab.numerical.mean(a) -ulab.numerical.std(a) -ulab.numerical.diff(a) -#ulab.size(a) -f = ulab.poly.polyfit([1,2,3], 3) -ulab.poly.polyval([1,2,3], [1,2,3]) -ulab.numerical.sort(a) -ulab.numerical.flip(a) -ulab.numerical.roll(a, 1) diff --git a/tests/ulab/smoke.py.exp b/tests/ulab/smoke.py.exp deleted file mode 100644 index e69de29bb..000000000 -- cgit v1.2.3 From 3a7a5ba6860c787cc691b5c828eff9a130f39526 Mon Sep 17 00:00:00 2001 From: Josh Klar Date: Sat, 10 Aug 2019 21:27:20 -0700 Subject: py: Implement partial PEP-498 (f-string) support This implements (most of) the PEP-498 spec for f-strings, with two exceptions: - raw f-strings (`fr` or `rf` prefixes) raise `NotImplementedError` - one special corner case does not function as specified in the PEP (more on that in a moment) This is implemented in the core as a syntax translation, brute-forcing all f-strings to run through `String.format`. For example, the statement `x='world'; print(f'hello {x}')` gets translated *at a syntax level* (injected into the lexer) to `x='world'; print('hello {}'.format(x))`. While this may lead to weird column results in tracebacks, it seemed like the fastest, most efficient, and *likely* most RAM-friendly option, despite being implemented under the hood with a completely separate `vstr_t`. Since [string concatenation of adjacent literals is implemented in the lexer](https://github.com/micropython/micropython/commit/534b7c368dc2af7720f3aaed0c936ef46d773957), two side effects emerge: - All strings with at least one f-string portion are concatenated into a single literal which *must* be run through `String.format()` wholesale, and: - Concatenation of a raw string with interpolation characters with an f-string will cause `IndexError`/`KeyError`, which is both different from CPython *and* different from the corner case mentioned in the PEP (which gave an example of the following:) ```python x = 10 y = 'hi' assert ('a' 'b' f'{x}' '{c}' f'str<{y:^4}>' 'd' 'e') == 'ab10{c}str< hi >de' ``` The above-linked commit detailed a pretty solid case for leaving string concatenation in the lexer rather than putting it in the parser, and undoing that decision would likely be disproportionately costly on resources for the sake of a probably-low-impact corner case. An alternative to become complaint with this corner case of the PEP would be to revert to string concatenation in the parser *only when an f-string is part of concatenation*, though I've done no investigation on the difficulty or costs of doing this. A decent set of tests is included. I've manually tested this on the `unix` port on Linux and on a Feather M4 Express (`atmel-samd`) and things seem sane. --- py/lexer.c | 132 ++++++++++++++++++++++++++++++++-- py/lexer.h | 10 +++ py/parse.c | 47 +++++++++--- tests/basics/string_pep498_fstring.py | 126 ++++++++++++++++++++++++++++++++ 4 files changed, 301 insertions(+), 14 deletions(-) create mode 100644 tests/basics/string_pep498_fstring.py (limited to 'tests') diff --git a/py/lexer.c b/py/lexer.c index 755fa625b..6894ada47 100644 --- a/py/lexer.c +++ b/py/lexer.c @@ -64,6 +64,10 @@ STATIC bool is_char_or3(mp_lexer_t *lex, byte c1, byte c2, byte c3) { return lex->chr0 == c1 || lex->chr0 == c2 || lex->chr0 == c3; } +STATIC bool is_char_or4(mp_lexer_t *lex, byte c1, byte c2, byte c3, byte c4) { + return lex->chr0 == c1 || lex->chr0 == c2 || lex->chr0 == c3 || lex->chr0 == c4; +} + STATIC bool is_char_following(mp_lexer_t *lex, byte c) { return lex->chr1 == c; } @@ -107,7 +111,9 @@ STATIC bool is_following_odigit(mp_lexer_t *lex) { STATIC bool is_string_or_bytes(mp_lexer_t *lex) { return is_char_or(lex, '\'', '\"') - || (is_char_or3(lex, 'r', 'u', 'b') && is_char_following_or(lex, '\'', '\"')) + || (is_char_or4(lex, 'r', 'u', 'b', 'f') && is_char_following_or(lex, '\'', '\"')) + || ((is_char_and(lex, 'r', 'f') || is_char_and(lex, 'f', 'r')) + && is_char_following_following_or(lex, '\'', '\"')) || ((is_char_and(lex, 'r', 'b') || is_char_and(lex, 'b', 'r')) && is_char_following_following_or(lex, '\'', '\"')); } @@ -121,6 +127,37 @@ STATIC bool is_tail_of_identifier(mp_lexer_t *lex) { return is_head_of_identifier(lex) || is_digit(lex); } +STATIC void swap_char_banks(mp_lexer_t *lex) { + if (lex->vstr_postfix_processing) { + unichar h0, h1, h2; + + h0 = lex->chr0; + h1 = lex->chr1; + h2 = lex->chr2; + + lex->chr0 = lex->vstr_postfix.len > 0 ? lex->vstr_postfix.buf[0] : 0; + lex->chr1 = lex->vstr_postfix.len > 1 ? lex->vstr_postfix.buf[1] : 0; + lex->chr2 = lex->vstr_postfix.len > 2 ? lex->vstr_postfix.buf[2] : 0; + lex->chr3 = h0; + lex->chr4 = h1; + lex->chr5 = h2; + + lex->vstr_postfix_idx = lex->vstr_postfix.len > 2 ? 3 : lex->vstr_postfix.len; + } else { + // blindly reset to the "backup" bank when done postfix processing + // this restores control to the mp_reader + lex->chr0 = lex->chr3; + lex->chr1 = lex->chr4; + lex->chr2 = lex->chr5; + lex->chr3 = 0; + lex->chr4 = 0; + lex->chr5 = 0; + + vstr_reset(&lex->vstr_postfix); + lex->vstr_postfix_idx = 0; + } +} + STATIC void next_char(mp_lexer_t *lex) { if (lex->chr0 == '\n') { // a new line @@ -136,7 +173,16 @@ STATIC void next_char(mp_lexer_t *lex) { lex->chr0 = lex->chr1; lex->chr1 = lex->chr2; - lex->chr2 = lex->reader.readbyte(lex->reader.data); + + if (lex->vstr_postfix_processing) { + if (lex->vstr_postfix_idx == lex->vstr_postfix.len) { + lex->chr2 = '\0'; + } else { + lex->chr2 = lex->vstr_postfix.buf[lex->vstr_postfix_idx++]; + } + } else { + lex->chr2 = lex->reader.readbyte(lex->reader.data); + } if (lex->chr1 == '\r') { // CR is a new line, converted to LF @@ -151,6 +197,11 @@ STATIC void next_char(mp_lexer_t *lex) { if (lex->chr2 == MP_LEXER_EOF && lex->chr1 != MP_LEXER_EOF && lex->chr1 != '\n') { lex->chr2 = '\n'; } + + if (lex->vstr_postfix_processing && lex->chr0 == '\0') { + lex->vstr_postfix_processing = false; + swap_char_banks(lex); + } } STATIC void indent_push(mp_lexer_t *lex, size_t indent) { @@ -270,7 +321,7 @@ STATIC bool get_hex(mp_lexer_t *lex, size_t num_digits, mp_uint_t *result) { return true; } -STATIC void parse_string_literal(mp_lexer_t *lex, bool is_raw) { +STATIC void parse_string_literal(mp_lexer_t *lex, bool is_raw, bool is_fstring) { // get first quoting character char quote_char = '\''; if (is_char(lex, '\"')) { @@ -291,15 +342,67 @@ STATIC void parse_string_literal(mp_lexer_t *lex, bool is_raw) { } size_t n_closing = 0; + bool in_expression = false; + bool expression_eat = true; + while (!is_end(lex) && (num_quotes > 1 || !is_char(lex, '\n')) && n_closing < num_quotes) { if (is_char(lex, quote_char)) { n_closing += 1; vstr_add_char(&lex->vstr, CUR_CHAR(lex)); } else { n_closing = 0; + if (is_fstring && is_char(lex, '{')) { + vstr_add_char(&lex->vstr, CUR_CHAR(lex)); + in_expression = !in_expression; + expression_eat = in_expression; + + if (lex->vstr_postfix.len == 0) { + vstr_add_str(&lex->vstr_postfix, ".format("); + } + + next_char(lex); + continue; + } + + if (is_fstring && is_char(lex, '}')) { + vstr_add_char(&lex->vstr, CUR_CHAR(lex)); + + if (in_expression) { + in_expression = false; + vstr_add_char(&lex->vstr_postfix, ','); + } + + next_char(lex); + continue; + } + + if (in_expression) { + // throw errors for illegal chars inside f-string expressions + if (is_char(lex, '#')) { + lex->tok_kind = MP_TOKEN_FSTRING_COMMENT; + return; + } else if (is_char(lex, '\\')) { + lex->tok_kind = MP_TOKEN_FSTRING_BACKSLASH; + return; + } else if (is_char(lex, ':')) { + expression_eat = false; + } + + unichar c = CUR_CHAR(lex); + if (expression_eat) { + vstr_add_char(&lex->vstr_postfix, c); + } else { + vstr_add_char(&lex->vstr, c); + } + + next_char(lex); + continue; + } + if (is_char(lex, '\\')) { next_char(lex); unichar c = CUR_CHAR(lex); + if (is_raw) { // raw strings allow escaping of quotes, but the backslash is also emitted vstr_add_char(&lex->vstr, '\\'); @@ -430,6 +533,13 @@ STATIC bool skip_whitespace(mp_lexer_t *lex, bool stop_at_newline) { } void mp_lexer_to_next(mp_lexer_t *lex) { + if (lex->vstr_postfix.len && !lex->vstr_postfix_processing) { + // end format call injection + vstr_add_char(&lex->vstr_postfix, ')'); + lex->vstr_postfix_processing = true; + swap_char_banks(lex); + } + // start new token text vstr_reset(&lex->vstr); @@ -485,6 +595,7 @@ void mp_lexer_to_next(mp_lexer_t *lex) { do { // parse type codes bool is_raw = false; + bool is_fstring = false; mp_token_kind_t kind = MP_TOKEN_STRING; int n_char = 0; if (is_char(lex, 'u')) { @@ -503,6 +614,17 @@ void mp_lexer_to_next(mp_lexer_t *lex) { kind = MP_TOKEN_BYTES; n_char = 2; } + if (is_char_following(lex, 'f')) { + lex->tok_kind = MP_TOKEN_FSTRING_RAW; + break; + } + } else if (is_char(lex, 'f')) { + if (is_char_following(lex, 'r')) { + lex->tok_kind = MP_TOKEN_FSTRING_RAW; + break; + } + n_char = 1; + is_fstring = true; } // Set or check token kind @@ -522,13 +644,12 @@ void mp_lexer_to_next(mp_lexer_t *lex) { } // Parse the literal - parse_string_literal(lex, is_raw); + parse_string_literal(lex, is_raw, is_fstring); // Skip whitespace so we can check if there's another string following skip_whitespace(lex, true); } while (is_string_or_bytes(lex)); - } else if (is_head_of_identifier(lex)) { lex->tok_kind = MP_TOKEN_NAME; @@ -682,6 +803,7 @@ mp_lexer_t *mp_lexer_new(qstr src_name, mp_reader_t reader) { lex->num_indent_level = 1; lex->indent_level = m_new(uint16_t, lex->alloc_indent_level); vstr_init(&lex->vstr, 32); + vstr_init(&lex->vstr_postfix, 0); // store sentinel for first indentation level lex->indent_level[0] = 0; diff --git a/py/lexer.h b/py/lexer.h index a29709107..7fe271e84 100644 --- a/py/lexer.h +++ b/py/lexer.h @@ -44,6 +44,12 @@ typedef enum _mp_token_kind_t { MP_TOKEN_INVALID, MP_TOKEN_DEDENT_MISMATCH, MP_TOKEN_LONELY_STRING_OPEN, + MP_TOKEN_FSTRING_BACKSLASH, + MP_TOKEN_FSTRING_COMMENT, + MP_TOKEN_FSTRING_UNCLOSED, + MP_TOKEN_FSTRING_UNOPENED, + MP_TOKEN_FSTRING_EMPTY_EXP, + MP_TOKEN_FSTRING_RAW, MP_TOKEN_NEWLINE, MP_TOKEN_INDENT, @@ -150,6 +156,7 @@ typedef struct _mp_lexer_t { mp_reader_t reader; // stream source unichar chr0, chr1, chr2; // current cached characters from source + unichar chr3, chr4, chr5; // current cached characters from alt source size_t line; // current source line size_t column; // current source column @@ -165,6 +172,9 @@ typedef struct _mp_lexer_t { size_t tok_column; // token source column mp_token_kind_t tok_kind; // token kind vstr_t vstr; // token data + vstr_t vstr_postfix; // postfix to apply to string + bool vstr_postfix_processing; + uint16_t vstr_postfix_idx; } mp_lexer_t; mp_lexer_t *mp_lexer_new(qstr src_name, mp_reader_t reader); diff --git a/py/parse.c b/py/parse.c index 864528470..d30d1b22f 100644 --- a/py/parse.c +++ b/py/parse.c @@ -924,6 +924,7 @@ mp_parse_tree_t mp_parse(mp_lexer_t *lex, mp_parse_input_kind_t input_kind) { backtrack = false; } for (; i < n; ++i) { + //printf("--> inside for @L924\n"); uint16_t kind = rule_arg[i] & RULE_ARG_KIND_MASK; if (kind == RULE_ARG_TOK) { if (lex->tok_kind == (rule_arg[i] & RULE_ARG_ARG_MASK)) { @@ -1168,15 +1169,43 @@ mp_parse_tree_t mp_parse(mp_lexer_t *lex, mp_parse_input_kind_t input_kind) { ) { syntax_error:; mp_obj_t exc; - if (lex->tok_kind == MP_TOKEN_INDENT) { - exc = mp_obj_new_exception_msg(&mp_type_IndentationError, - translate("unexpected indent")); - } else if (lex->tok_kind == MP_TOKEN_DEDENT_MISMATCH) { - exc = mp_obj_new_exception_msg(&mp_type_IndentationError, - translate("unindent does not match any outer indentation level")); - } else { - exc = mp_obj_new_exception_msg(&mp_type_SyntaxError, - translate("invalid syntax")); + switch(lex->tok_kind) { + case MP_TOKEN_INDENT: + exc = mp_obj_new_exception_msg(&mp_type_IndentationError, + translate("unexpected indent")); + break; + case MP_TOKEN_DEDENT_MISMATCH: + exc = mp_obj_new_exception_msg(&mp_type_IndentationError, + translate("unindent does not match any outer indentation level")); + break; + case MP_TOKEN_FSTRING_BACKSLASH: + exc = mp_obj_new_exception_msg(&mp_type_SyntaxError, + translate("f-string expression part cannot include a backslash")); + break; + case MP_TOKEN_FSTRING_COMMENT: + exc = mp_obj_new_exception_msg(&mp_type_SyntaxError, + translate("f-string expression part cannot include a '#'")); + break; + case MP_TOKEN_FSTRING_UNCLOSED: + exc = mp_obj_new_exception_msg(&mp_type_SyntaxError, + translate("f-string: expecting '}'")); + break; + case MP_TOKEN_FSTRING_UNOPENED: + exc = mp_obj_new_exception_msg(&mp_type_SyntaxError, + translate("f-string: single '}' is not allowed")); + break; + case MP_TOKEN_FSTRING_EMPTY_EXP: + exc = mp_obj_new_exception_msg(&mp_type_SyntaxError, + translate("f-string: empty expression not allowed")); + break; + case MP_TOKEN_FSTRING_RAW: + exc = mp_obj_new_exception_msg(&mp_type_NotImplementedError, + translate("raw f-strings are not implemented")); + break; + default: + exc = mp_obj_new_exception_msg(&mp_type_SyntaxError, + translate("invalid syntax")); + break; } // add traceback to give info about file name and location // we don't have a 'block' name, so just pass the NULL qstr to indicate this diff --git a/tests/basics/string_pep498_fstring.py b/tests/basics/string_pep498_fstring.py new file mode 100644 index 000000000..f1ad1f19b --- /dev/null +++ b/tests/basics/string_pep498_fstring.py @@ -0,0 +1,126 @@ +# Tests against https://www.python.org/dev/peps/pep-0498/ + +assert f'no interpolation' == 'no interpolation' +assert f"no interpolation" == 'no interpolation' + +# Quoth the PEP: +# Backslashes may not appear anywhere within expressions. Comments, using the +# '#' character, are not allowed inside an expression +# +# CPython (3.7.4 on Linux) raises a SyntaxError here: +# >>> f'{#}' +# File "", line 1 +# SyntaxError: f-string expression part cannot include '#' +# >>> f'{\}' +# File "", line 1 +# SyntaxError: f-string expression part cannot include a backslash +# >>> f'{\\}' +# File "", line 1 +# SyntaxError: f-string expression part cannot include a backslash +# >>> f'{\#}' +# File "", line 1 +# SyntaxError: f-string expression part cannot include a backslash + +# Backslashes and comments allowed outside expression +assert f"\\" == "\\" +assert f'#' == '#' + +## But not inside +try: + eval("f'{\}'") +except SyntaxError: + pass +else: + raise AssertionError('f-string with backslash in expression did not raise SyntaxError') + +try: + eval("f'{#}'") +except SyntaxError: + pass +else: + raise AssertionError('f-string with \'#\' in expression did not raise SyntaxError') + +# Quoth the PEP: +# While scanning the string for expressions, any doubled braces '{{' or '}}' +# inside literal portions of an f-string are replaced by the corresponding +# single brace. Doubled literal opening braces do not signify the start of an +# expression. A single closing curly brace '}' in the literal portion of a +# string is an error: literal closing curly braces must be doubled '}}' in +# order to represent a single closing brace. +# +# CPython (3.7.4 on Linux) raises a SyntaxError for the last case: +# >>> f'{{}' +# File "", line 1 +# SyntaxError: f-string: single '}' is not allowed + +assert f'{{}}' == '{}' + +try: + eval("f'{{}'") +except ValueError: + pass +else: + raise RuntimeError('Expected ValueError for invalid f-string literal bracing') + +x = 1 +assert f'{x}' == '1' + +# Quoth the PEP: +# The expressions that are extracted from the string are evaluated in the +# context where the f-string appeared. This means the expression has full +# access to local and global variables. Any valid Python expression can be +# used, including function and method calls. Because the f-strings are +# evaluated where the string appears in the source code, there is no additional +# expressiveness available with f-strings. There are also no additional +# security concerns: you could have also just written the same expression, not +# inside of an f-string: + +def foo(): + return 20 + +assert f'result={foo()}' == 'result=20' +assert f'result={foo()}' == 'result={}'.format(foo()) +assert f'result={foo()}' == 'result={result}'.format(result=foo()) + + +# Quoth the PEP: +# Adjacent f-strings and regular strings are concatenated. Regular strings are +# concatenated at compile time, and f-strings are concatenated at run time. For +# example, the expression: +# +# >>> x = 10 +# >>> y = 'hi' +# >>> 'a' 'b' f'{x}' '{c}' f'str<{y:^4}>' 'd' 'e' +# +# yields the value: 'ab10{c}str< hi >de' +# +# Because strings are concatenated at lexer time rather than parser time in +# MicroPython for mostly RAM efficiency reasons (see +# https://github.com/micropython/micropython/commit/534b7c368dc2af7720f3aaed0c936ef46d773957), +# and because f-strings here are implemented as a syntax translation +# (f'{something}' => '{}'.format(something)), this particular functionality is unimplemented, +# and in the above example, the '{c}' portion will trigger a KeyError on String.format() + +x = 10 +y = 'hi' +assert (f'h' f'i') == 'hi' +assert (f'h' 'i') == 'hi' +assert ('h' f'i') == 'hi' +assert f'{x:^4}' == ' 10 ' +assert ('a' 'b' f'{x}' f'str<{y:^4}>' 'd' 'e') == 'ab10str< hi >de' + +# Other tests +assert f'{{{4*10}}}' == '{40}' + +try: + eval("fr''") +except NotImplementedError: + pass +else: + raise RuntimeError('expected raw f-string to raise NotImplementedError') +try: + eval("rf''") +except NotImplementedError: + pass +else: + raise RuntimeError('expected raw f-string to raise NotImplementedError') -- cgit v1.2.3 From 40bc05ee1eafcc2f0b3ed48f212a1526b65163bc Mon Sep 17 00:00:00 2001 From: Josh Klar Date: Thu, 26 Sep 2019 16:48:02 -0700 Subject: Address dpgeorge feedback - largely simplifications --- py/lexer.c | 26 +++++++++----------------- py/parse.c | 12 ++++++++++++ tests/basics/string_pep498_fstring.py | 13 ------------- 3 files changed, 21 insertions(+), 30 deletions(-) (limited to 'tests') diff --git a/py/lexer.c b/py/lexer.c index 6894ada47..c3f4e6506 100644 --- a/py/lexer.c +++ b/py/lexer.c @@ -129,29 +129,21 @@ STATIC bool is_tail_of_identifier(mp_lexer_t *lex) { STATIC void swap_char_banks(mp_lexer_t *lex) { if (lex->vstr_postfix_processing) { - unichar h0, h1, h2; - - h0 = lex->chr0; - h1 = lex->chr1; - h2 = lex->chr2; - - lex->chr0 = lex->vstr_postfix.len > 0 ? lex->vstr_postfix.buf[0] : 0; - lex->chr1 = lex->vstr_postfix.len > 1 ? lex->vstr_postfix.buf[1] : 0; - lex->chr2 = lex->vstr_postfix.len > 2 ? lex->vstr_postfix.buf[2] : 0; - lex->chr3 = h0; - lex->chr4 = h1; - lex->chr5 = h2; - - lex->vstr_postfix_idx = lex->vstr_postfix.len > 2 ? 3 : lex->vstr_postfix.len; + lex->chr3 = lex->chr0; + lex->chr4 = lex->chr1; + lex->chr5 = lex->chr2; + lex->chr0 = lex->vstr_postfix.buf[0]; + lex->chr1 = lex->vstr_postfix.buf[1]; + lex->chr2 = lex->vstr_postfix.buf[2]; + + lex->vstr_postfix_idx = 3; } else { // blindly reset to the "backup" bank when done postfix processing // this restores control to the mp_reader lex->chr0 = lex->chr3; lex->chr1 = lex->chr4; lex->chr2 = lex->chr5; - lex->chr3 = 0; - lex->chr4 = 0; - lex->chr5 = 0; + // willfully ignoring setting chr3-5 here - WARNING consider those garbage data now vstr_reset(&lex->vstr_postfix); lex->vstr_postfix_idx = 0; diff --git a/py/parse.c b/py/parse.c index d30d1b22f..f86ee25fe 100644 --- a/py/parse.c +++ b/py/parse.c @@ -1178,6 +1178,7 @@ mp_parse_tree_t mp_parse(mp_lexer_t *lex, mp_parse_input_kind_t input_kind) { exc = mp_obj_new_exception_msg(&mp_type_IndentationError, translate("unindent does not match any outer indentation level")); break; +#if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_DETAILED case MP_TOKEN_FSTRING_BACKSLASH: exc = mp_obj_new_exception_msg(&mp_type_SyntaxError, translate("f-string expression part cannot include a backslash")); @@ -1202,6 +1203,17 @@ mp_parse_tree_t mp_parse(mp_lexer_t *lex, mp_parse_input_kind_t input_kind) { exc = mp_obj_new_exception_msg(&mp_type_NotImplementedError, translate("raw f-strings are not implemented")); break; +#else + case MP_TOKEN_FSTRING_BACKSLASH: + case MP_TOKEN_FSTRING_COMMENT: + case MP_TOKEN_FSTRING_UNCLOSED: + case MP_TOKEN_FSTRING_UNOPENED: + case MP_TOKEN_FSTRING_EMPTY_EXP: + case MP_TOKEN_FSTRING_RAW: + exc = mp_obj_new_exception_msg(&mp_type_SyntaxError, + translate("malformed f-string")); + break; +#endif default: exc = mp_obj_new_exception_msg(&mp_type_SyntaxError, translate("invalid syntax")); diff --git a/tests/basics/string_pep498_fstring.py b/tests/basics/string_pep498_fstring.py index f1ad1f19b..f4e76c831 100644 --- a/tests/basics/string_pep498_fstring.py +++ b/tests/basics/string_pep498_fstring.py @@ -111,16 +111,3 @@ assert ('a' 'b' f'{x}' f'str<{y:^4}>' 'd' 'e') == 'ab10str< hi >de' # Other tests assert f'{{{4*10}}}' == '{40}' - -try: - eval("fr''") -except NotImplementedError: - pass -else: - raise RuntimeError('expected raw f-string to raise NotImplementedError') -try: - eval("rf''") -except NotImplementedError: - pass -else: - raise RuntimeError('expected raw f-string to raise NotImplementedError') -- cgit v1.2.3 From 32647cd9b41c26003df0bdc385353f6a24b727d7 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 9 Mar 2020 08:33:47 -0500 Subject: lexer: catch concatenation of f'' and '' strings This turns the "edge case" into a parse-time error. --- py/lexer.c | 13 +++++++++++++ tests/basics/string_pep498_fstring.py | 6 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/py/lexer.c b/py/lexer.c index c3f4e6506..80f8f043c 100644 --- a/py/lexer.c +++ b/py/lexer.c @@ -583,6 +583,8 @@ void mp_lexer_to_next(mp_lexer_t *lex) { // MP_TOKEN_END is used to indicate that this is the first string token lex->tok_kind = MP_TOKEN_END; + bool saw_normal = false, saw_fstring = false; + // Loop to accumulate string/bytes literals do { // parse type codes @@ -619,6 +621,17 @@ void mp_lexer_to_next(mp_lexer_t *lex) { is_fstring = true; } + if (is_fstring) { + saw_fstring = true; + } else { + saw_normal = true; + } + + if (saw_fstring && saw_normal) { + // Can't concatenate f-string with normal string + break; + } + // Set or check token kind if (lex->tok_kind == MP_TOKEN_END) { lex->tok_kind = kind; diff --git a/tests/basics/string_pep498_fstring.py b/tests/basics/string_pep498_fstring.py index f4e76c831..c645a730c 100644 --- a/tests/basics/string_pep498_fstring.py +++ b/tests/basics/string_pep498_fstring.py @@ -104,10 +104,10 @@ assert f'result={foo()}' == 'result={result}'.format(result=foo()) x = 10 y = 'hi' assert (f'h' f'i') == 'hi' -assert (f'h' 'i') == 'hi' -assert ('h' f'i') == 'hi' +#assert (f'h' 'i') == 'hi' +#assert ('h' f'i') == 'hi' assert f'{x:^4}' == ' 10 ' -assert ('a' 'b' f'{x}' f'str<{y:^4}>' 'd' 'e') == 'ab10str< hi >de' +#assert ('a' 'b' f'{x}' f'str<{y:^4}>' 'd' 'e') == 'ab10str< hi >de' # Other tests assert f'{{{4*10}}}' == '{40}' -- cgit v1.2.3 From ef195d6e1b769f8555d1362d27f98ef9aa84169d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 9 Mar 2020 09:19:02 -0500 Subject: Update tests * string_pep498_fstring.py: Not compatible with python3.5 * cmd_parsetree.py: enumerated constants changed --- tests/basics/string_pep498_fstring.py.exp | 0 tests/cmdline/cmd_parsetree.py.exp | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 tests/basics/string_pep498_fstring.py.exp (limited to 'tests') diff --git a/tests/basics/string_pep498_fstring.py.exp b/tests/basics/string_pep498_fstring.py.exp new file mode 100644 index 000000000..e69de29bb diff --git a/tests/cmdline/cmd_parsetree.py.exp b/tests/cmdline/cmd_parsetree.py.exp index 12a1bfbe9..c06ce4e31 100644 --- a/tests/cmdline/cmd_parsetree.py.exp +++ b/tests/cmdline/cmd_parsetree.py.exp @@ -1,6 +1,6 @@ ---------------- [ 4] rule(1) (n=9) - tok(4) + tok(10) [ 4] rule(22) (n=4) id(i) [ 4] rule(44) (n=1) @@ -9,7 +9,7 @@ NULL [ 6] rule(5) (n=2) id(a) - tok(14) + tok(20) [ 7] rule(5) (n=2) id(b) str(str) -- cgit v1.2.3 From 8b5fd95897b967e5077527f50657ac4ded39a9aa Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 17 Aug 2018 15:42:51 +1000 Subject: tests/basics/set_pop.py: Sort set before printing for consistent output. --- tests/basics/set_pop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/basics/set_pop.py b/tests/basics/set_pop.py index 5e1196c9f..e951ca593 100644 --- a/tests/basics/set_pop.py +++ b/tests/basics/set_pop.py @@ -15,4 +15,4 @@ while s: print(s.pop()) # last pop() should trigger the optimisation for i in range(N): s.add(i) # check that we can add the numbers back to the set -print(list(s)) +print(sorted(s)) -- cgit v1.2.3 From 4c4f81f8f2f68a5dc47d37ba185a2506224d7159 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 17 Aug 2018 15:43:47 +1000 Subject: tests/basics/int_big_error.py: Use bytearray to test for int overflow. In Python 3.7 "1 >> (big int)" is now allowed, it no longer raises an OverflowError. So use bytearray to test big-int conversion overflow. --- tests/basics/int_big_error.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/basics/int_big_error.py b/tests/basics/int_big_error.py index e036525d1..79809aef1 100644 --- a/tests/basics/int_big_error.py +++ b/tests/basics/int_big_error.py @@ -17,9 +17,9 @@ try: except TypeError: print("TypeError") -# overflow because rhs of >> is being converted to machine int +# overflow because arg of bytearray is being converted to machine int try: - 1 >> i + bytearray(i) except OverflowError: print('OverflowError') -- cgit v1.2.3 From 8f0147cf00e3fa8db283adbd1698c60fbe76a62a Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 17 Aug 2018 15:46:04 +1000 Subject: tests: Modify tests that print repr of an exception with 1 arg. In Python 3.7 the behaviour of repr() of an exception with one argument changed: it no longer prints a trailing comma in the argument list. See https://bugs.python.org/issue30399 This patch modifies tests that rely on this behaviour to not rely on it. And the python34.py test is updated to include a test for this behaviour with a .exp file. --- tests/basics/dict1.py | 2 +- tests/basics/exception1.py | 1 - tests/basics/generator_return.py | 2 +- tests/basics/python34.py | 6 +++++- tests/basics/python34.py.exp | 1 + tests/basics/subclass_native3.py | 4 ++-- tests/basics/try_as_var.py | 2 +- tests/misc/sys_exc_info.py | 2 +- 8 files changed, 12 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/basics/dict1.py b/tests/basics/dict1.py index 20fa9def3..0cec51173 100644 --- a/tests/basics/dict1.py +++ b/tests/basics/dict1.py @@ -27,7 +27,7 @@ print({1:1} == {2:1}) try: {}[0] except KeyError as er: - print('KeyError', er, repr(er), er.args) + print('KeyError', er, er.args) # unsupported unary op try: diff --git a/tests/basics/exception1.py b/tests/basics/exception1.py index 739dd3275..d83764cb9 100644 --- a/tests/basics/exception1.py +++ b/tests/basics/exception1.py @@ -1,7 +1,6 @@ print(repr(IndexError())) print(str(IndexError())) -print(repr(IndexError("foo"))) print(str(IndexError("foo"))) a = IndexError(1, "test", [100, 200]) diff --git a/tests/basics/generator_return.py b/tests/basics/generator_return.py index a3ac88575..5814ce837 100644 --- a/tests/basics/generator_return.py +++ b/tests/basics/generator_return.py @@ -7,4 +7,4 @@ print(next(g)) try: print(next(g)) except StopIteration as e: - print(repr(e)) + print(type(e), e.args) diff --git a/tests/basics/python34.py b/tests/basics/python34.py index 36531f11c..4030db143 100644 --- a/tests/basics/python34.py +++ b/tests/basics/python34.py @@ -1,4 +1,4 @@ -# tests that differ when running under Python 3.4 vs 3.5/3.6 +# tests that differ when running under Python 3.4 vs 3.5/3.6/3.7 try: exec @@ -36,3 +36,7 @@ test_syntax("del ()") # can't delete empty tuple (in 3.6 we can) import sys print(sys.version[:3]) print(sys.version_info[0], sys.version_info[1]) + +# from basics/exception1.py +# in 3.7 no comma is printed if there is only 1 arg (in 3.4-3.6 one is printed) +print(repr(IndexError("foo"))) diff --git a/tests/basics/python34.py.exp b/tests/basics/python34.py.exp index 590fc364f..848017130 100644 --- a/tests/basics/python34.py.exp +++ b/tests/basics/python34.py.exp @@ -11,3 +11,4 @@ SyntaxError SyntaxError 3.4 3 4 +IndexError('foo',) diff --git a/tests/basics/subclass_native3.py b/tests/basics/subclass_native3.py index bd99ab0d6..6745b77bb 100644 --- a/tests/basics/subclass_native3.py +++ b/tests/basics/subclass_native3.py @@ -7,12 +7,12 @@ print(repr(e)) print(e.args) try: - raise MyExc("Some error") + raise MyExc("Some error", 1) except MyExc as e: print("Caught exception:", repr(e)) try: - raise MyExc("Some error2") + raise MyExc("Some error2", 2) except Exception as e: print("Caught exception:", repr(e)) diff --git a/tests/basics/try_as_var.py b/tests/basics/try_as_var.py index 0a92f1cae..4f02f9c10 100644 --- a/tests/basics/try_as_var.py +++ b/tests/basics/try_as_var.py @@ -1,7 +1,7 @@ try: raise ValueError(534) except ValueError as e: - print(repr(e)) + print(type(e), e.args) # Var bound in except block is automatically deleted try: diff --git a/tests/misc/sys_exc_info.py b/tests/misc/sys_exc_info.py index 4bb2c61e8..bf9438e46 100644 --- a/tests/misc/sys_exc_info.py +++ b/tests/misc/sys_exc_info.py @@ -9,7 +9,7 @@ def f(): print(sys.exc_info()[0:2]) try: - 1/0 + raise ValueError('value', 123) except: print(sys.exc_info()[0:2]) f() -- cgit v1.2.3 From 764e65fb11ab6aa80c540a8f9d15237f406d62fd Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 17 Aug 2018 15:50:21 +1000 Subject: tests/basics: Provide .exp files for generator tests that fail PEP479. PEP479 (see https://www.python.org/dev/peps/pep-0479/) prohibited raising StopIteration from within a generator (it is turned into a RuntimeError). This behaviour was introduced in Python 3.5 and in 3.7 was made compulsory. Until uPy implements PEP479, this patch adds .py.exp files for the relevant tests so they can be run under Python 3.7. --- tests/basics/gen_yield_from.py.exp | 14 ++++++++++++++ tests/basics/gen_yield_from_close.py.exp | 20 ++++++++++++++++++++ tests/basics/gen_yield_from_throw.py.exp | 6 ++++++ tests/basics/generator_close.py.exp | 10 ++++++++++ 4 files changed, 50 insertions(+) create mode 100644 tests/basics/gen_yield_from.py.exp create mode 100644 tests/basics/gen_yield_from_close.py.exp create mode 100644 tests/basics/gen_yield_from_throw.py.exp create mode 100644 tests/basics/generator_close.py.exp (limited to 'tests') diff --git a/tests/basics/gen_yield_from.py.exp b/tests/basics/gen_yield_from.py.exp new file mode 100644 index 000000000..507f2b9ca --- /dev/null +++ b/tests/basics/gen_yield_from.py.exp @@ -0,0 +1,14 @@ +here1 +3 +here2 +[1, 2] +here1 +None +here2 +[1, 2] +here1 +123 +here2 +[1, 2] +444 +[0, 1, 2] diff --git a/tests/basics/gen_yield_from_close.py.exp b/tests/basics/gen_yield_from_close.py.exp new file mode 100644 index 000000000..a44d1353d --- /dev/null +++ b/tests/basics/gen_yield_from_close.py.exp @@ -0,0 +1,20 @@ +-1 +1 +StopIteration +-1 +1 +2 +leaf caught GeneratorExit and swallowed it +delegating caught GeneratorExit +StopIteration +-1 +1 +2 +leaf caught GeneratorExit and raised StopIteration instead +delegating caught GeneratorExit +StopIteration +123 +RuntimeError +0 +1 +close diff --git a/tests/basics/gen_yield_from_throw.py.exp b/tests/basics/gen_yield_from_throw.py.exp new file mode 100644 index 000000000..6ce97ad86 --- /dev/null +++ b/tests/basics/gen_yield_from_throw.py.exp @@ -0,0 +1,6 @@ +1 +got ValueError from upstream! +str1 +got TypeError from downstream! +123 +got StopIteration from downstream! diff --git a/tests/basics/generator_close.py.exp b/tests/basics/generator_close.py.exp new file mode 100644 index 000000000..fcd583935 --- /dev/null +++ b/tests/basics/generator_close.py.exp @@ -0,0 +1,10 @@ +None +StopIteration +1 +None +StopIteration +[1, 2] +None +StopIteration +None +ValueError -- cgit v1.2.3 From aa10e5c3343d0947eb5a813e8a5025205dc1efd4 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 13 Dec 2019 13:49:34 +1100 Subject: tests: Add .exp files for basics/parser and import/import_override. Because CPython 3.8.0 now produces different output: - basics/parser.py: CPython does not allow '\\\n' as input. - import/import_override: CPython imports _io. --- tests/basics/parser.py.exp | 3 +++ tests/import/import_override.py.exp | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 tests/basics/parser.py.exp create mode 100644 tests/import/import_override.py.exp (limited to 'tests') diff --git a/tests/basics/parser.py.exp b/tests/basics/parser.py.exp new file mode 100644 index 000000000..4d9886a09 --- /dev/null +++ b/tests/basics/parser.py.exp @@ -0,0 +1,3 @@ +SyntaxError +SyntaxError +SyntaxError diff --git a/tests/import/import_override.py.exp b/tests/import/import_override.py.exp new file mode 100644 index 000000000..365248da6 --- /dev/null +++ b/tests/import/import_override.py.exp @@ -0,0 +1,2 @@ +import import1b None 0 +456 -- cgit v1.2.3