-
Notifications
You must be signed in to change notification settings - Fork 5
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
Tackling some sepfir2d
improvements
#43
Comments
Hi Ralf,
They are because of binary operators. Are there any built-in functions such that numpy can handle them? Something like I found here: https://github.com/pydata/numexpr/blob/master/numexpr/complex_functions.hpp. Some of them can be useful from here https://github.com/numpy/numpy/blob/main/numpy/core/include/numpy/npy_math.h but regarding binary operands I didn't find any. |
There really aren't many examples of complex math, and pretty much everything we do have is in Cython. I'd suggest looking at |
From scipy#14367 (comment):
There are a couple of issues (2 open, 2 closed) about
sepfir2d
, so it does get usage. Now that we've looked into this and found some of the problems, it makes sense to fix them. This could turn into a bit of a project though, so let's not try to do it all in this PR. @Smit-create I suggest the following:outptr
->out
inmemmove
(see review comment above), and then we'll merge this.C_bspline_util.c
,D_bspline_util.c
,S_bspline_util.c
,Z_bspline_util.c
). This can be done with a Tempita template (seescipy/signal/correlate_nd.c.in
for an example). At that pointbspline_util.c
also doesn't need to be a separate file, the one function in it can be included in the same templated C file.@peterbell10
's comment above)__GNUC__
guards. I think this requires modernizing the code (__complex__
usage is odd, it's only done in a fewsignal
functions)This code is pretty arcane, it should be possible to squash quite a few bugs in it here.
EDIT: final thing could be to improve the algorithm to also handle even
hrow
,hcol
, see scipygh-12691.Next steps
Let's start with the easier topics here:
__GNUC__
guards. Instead of using__complex__ float
, this could use numpy types likenpy_cfloat
.The text was updated successfully, but these errors were encountered: