Skip to content

Commit 0e5dfba

Browse files
authored
Merge pull request #3100 from jepler/update-ulab
Update ulab
2 parents 34646c5 + 48bc4bd commit 0e5dfba

File tree

3 files changed

+47
-2
lines changed

3 files changed

+47
-2
lines changed

locale/circuitpython.pot

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2020-06-26 11:50-0500\n"
11+
"POT-Creation-Date: 2020-07-01 10:33-0500\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -3009,6 +3009,10 @@ msgstr ""
30093009
msgid "sleep length must be non-negative"
30103010
msgstr ""
30113011

3012+
#: extmod/ulab/code/ndarray.c
3013+
msgid "slice step can't be zero"
3014+
msgstr ""
3015+
30123016
#: py/objslice.c py/sequence.c
30133017
msgid "slice step cannot be zero"
30143018
msgstr ""
@@ -3025,6 +3029,18 @@ msgstr ""
30253029
msgid "sort argument must be an ndarray"
30263030
msgstr ""
30273031

3032+
#: extmod/ulab/code/filter.c
3033+
msgid "sos array must be of shape (n_section, 6)"
3034+
msgstr ""
3035+
3036+
#: extmod/ulab/code/filter.c
3037+
msgid "sos[:, 3] should be all ones"
3038+
msgstr ""
3039+
3040+
#: extmod/ulab/code/filter.c
3041+
msgid "sosfilt requires iterable arguments"
3042+
msgstr ""
3043+
30283044
#: py/objstr.c
30293045
msgid "start/end indices"
30303046
msgstr ""
@@ -3314,3 +3330,15 @@ msgstr ""
33143330
#: py/objrange.c
33153331
msgid "zero step"
33163332
msgstr ""
3333+
3334+
#: extmod/ulab/code/filter.c
3335+
msgid "zi must be an ndarray"
3336+
msgstr ""
3337+
3338+
#: extmod/ulab/code/filter.c
3339+
msgid "zi must be of float type"
3340+
msgstr ""
3341+
3342+
#: extmod/ulab/code/filter.c
3343+
msgid "zi must be of shape (n_section, 2)"
3344+
msgstr ""

shared-bindings/ulab/filter/__init__.pyi

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,20 @@ def convolve(r, c=None):
1717
1818
Convolution is most time-efficient when both inputs are of float type."""
1919
...
20+
21+
def sosfilt(sos : ulab.array, x : ulab.array, *, xi : Optional[ulab.array] = None) -> Union[ulab.array, Tuple[ulab.array, ulab.array]]:
22+
"""
23+
: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.
24+
:param ulab.array x: The data to be filtered
25+
:param ulab.array zi: Optional initial conditions for the filter
26+
27+
: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.
28+
29+
Filter data along one dimension using cascaded second-order sections.
30+
31+
Filter a data sequence, x, using a digital IIR filter defined by sos.
32+
33+
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.
34+
35+
Filter coefficients can be generated by using scipy's filter generators such as ``signal.ellip(..., output='sos')``."""
36+
...

0 commit comments

Comments
 (0)