-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
DEP: signal.{correlate,convolve,lfilter}: deprecate object arrays and longdoubles #21211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c78d938
to
096a563
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to deprecate but could you post to the dev forum about this
+1 from me too. |
5be85f0
to
69bebc4
Compare
I updated the error message to point users to the usable dtypes and added some tests for the deprecation warning (for |
|
... of objects & longdoubles from correlate/convolve and lfilter. Co-authored-by: Jake Bowhay <60778417+j-bowhay@users.noreply.github.com>
Co-authored-by: Jake Bowhay <60778417+j-bowhay@users.noreply.github.com>
[skip cirrus]
[skip cirrus]
9543198
to
424e405
Compare
OK, rolled back the float16 deprecation. With the ML (== discourse) thread silent for a month, I think we can land this one unless there are further comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after these changes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! will merge if CI is green
… longdoubles (scipy#21211) Co-authored-by: Jake Bowhay <60778417+j-bowhay@users.noreply.github.com> Co-authored-by: Lucas Colley <lucas.colley8@gmail.com>
This is a follow-up to scipygh-21211: we deprecated object arrays as inputs to `lfilter`, but forgot or did not know about `sosfilt`. These two should probably be in sync, hence follow the lfilter deprecation in sosfilt.
Following up on the discussion at #20772 (comment), here is proposal to deprecate using object arrays and longdoubles in
scipy.signal.{correlate,convolve,lfilter}
.The intended use cases were, judging by tests, dealing with arrays of Decimals. The relevant C code has been there "forever" (since when multipack was a thing), and is very likely buggy since then (cf this comment https://github.com/scipy/scipy/blob/main/scipy/signal/_lfilter.c.in#L679).
Whether these are used in the wild is a tough question to answer. A gut feeling is "not much", and as a data point, we had no complaints when we recently (in the 1.11-1.14 timeframe) removed object and longdouble support in medfilt (#19673 and #18341). So most likely, it won't be a large loss if these are gone.
This PR is currently also removes float16 support. This might be a bit on a too-wide-sweep side, and I'm happy to roll it back. OTOH, the "support" currently seems to be just upcasting to wider float types, so this deprecation might be okay, too.