diff options
| author | Scott Shawcroft <scott@adafruit.com> | 2020-07-01 14:21:00 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-01 14:21:00 -0700 |
| commit | 0e5dfbaf8f6072a79189b198b512971e316b7639 (patch) | |
| tree | 4688679a903aa86668e1e82f2a812cebf8cd9315 | |
| parent | 34646c5565c0ad6c9a7927a057877174d139f9db (diff) | |
| parent | 48bc4bd5d6159c55ebe4c4ef6f517d794a054502 (diff) | |
Merge pull request #3100 from jepler/update-ulab
Update ulab
| m--------- | extmod/ulab | 0 | ||||
| -rw-r--r-- | locale/circuitpython.pot | 30 | ||||
| -rw-r--r-- | shared-bindings/ulab/filter/__init__.pyi | 17 |
3 files changed, 46 insertions, 1 deletions
diff --git a/extmod/ulab b/extmod/ulab -Subproject 0394801933f6e68a5bc7cdb0da76c7884e8cf70 +Subproject 48cb939839fcf091fcdcdf742530b1b650066a1 diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 3a3b159a0..7141cc872 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-06-26 11:50-0500\n" +"POT-Creation-Date: 2020-07-01 10:33-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -3009,6 +3009,10 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "" @@ -3025,6 +3029,18 @@ msgstr "" msgid "sort argument must be an ndarray" msgstr "" +#: extmod/ulab/code/filter.c +msgid "sos array must be of shape (n_section, 6)" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "sos[:, 3] should be all ones" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "sosfilt requires iterable arguments" +msgstr "" + #: py/objstr.c msgid "start/end indices" msgstr "" @@ -3314,3 +3330,15 @@ msgstr "" #: py/objrange.c msgid "zero step" msgstr "" + +#: extmod/ulab/code/filter.c +msgid "zi must be an ndarray" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "zi must be of float type" +msgstr "" + +#: extmod/ulab/code/filter.c +msgid "zi must be of shape (n_section, 2)" +msgstr "" diff --git a/shared-bindings/ulab/filter/__init__.pyi b/shared-bindings/ulab/filter/__init__.pyi index fff404300..5e7202e06 100644 --- a/shared-bindings/ulab/filter/__init__.pyi +++ b/shared-bindings/ulab/filter/__init__.pyi @@ -17,3 +17,20 @@ def convolve(r, c=None): Convolution is most time-efficient when both inputs are of float type.""" ... + +def sosfilt(sos : ulab.array, x : ulab.array, *, xi : Optional[ulab.array] = None) -> Union[ulab.array, Tuple[ulab.array, ulab.array]]: + """ + :param ulab.array sos: Array of second-order filter coefficients, must have shape (n_sections, 6). Each row corresponds to a second-order section, with the first three columns providing the numerator coefficients and the last three providing the denominator coefficients. + :param ulab.array x: The data to be filtered + :param ulab.array zi: Optional initial conditions for the filter + + :return: If ``xi`` is not specified, the filter result alone is returned. If ``xi`` is specified, the return value is a 2-tuple of the filter result and the final filter conditions. + + Filter data along one dimension using cascaded second-order sections. + + Filter a data sequence, x, using a digital IIR filter defined by sos. + + The filter function is implemented as a series of second-order filters with direct-form II transposed structure. It is designed to minimize numerical precision errors for high-order filters. + + Filter coefficients can be generated by using scipy's filter generators such as ``signal.ellip(..., output='sos')``.""" + ... |
