-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
map/reduce/filter functions #461
Comments
+1. Namespaces will help with this but fftw should most definitely not get this name. Btw, one of the advantages of going so long developing or standard library without namespaces is that even once we have them, there will almost never be name collisions. Procrastination win. |
It's not an fftw function, but it is a signal processing function. |
I still think the standard named functional programming higher-order function should win this clash. |
With scheme as my second-favorite language ;), I agree, but we should find a signal expert to suggest an alternate name. |
I'm not an expert, but how about |
|
How about |
It is really difficult to find a better name for filter, since that is the term in the literature. Another possibility is to use |
Let's go with |
+1 for |
Could someone please re-open this issue? I'll work on writing a filter() function this week and submit a pull request... |
This looks like it should be closed. Not sure why it popped up as changed just now. Or is this about to get some module love as referenced above? |
I'm pretty sure it can be closed. Looks like #500 got closed, but this one didn't? Weird. |
This, together with some companion changes in LoweredCodeUtils and revise, shaves another 200ms off the time for first revision.
Stdlib: SparseArrays URL: https://github.com/JuliaSparse/SparseArrays.jl.git Stdlib branch: main Julia branch: master Old commit: 3582898 New commit: 37fc321 Julia version: 1.11.0-DEV SparseArrays version: 1.11.0 Bump invoked by: @ViralBShah Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaSparse/SparseArrays.jl@3582898...37fc321 ``` $ git log --oneline 3582898..37fc321 37fc321 test: relax allocated tests (#468) bd2bda8 replace ind2sub/sub2ind by CartesianIndices/LinearIndices (#451) 7897f1f test: somewhat more permissive test_throws message (#466) 911cf6a `reverse` for sparse vector/matrix (#450) 713a260 Define algebraic operators for SparseMatrixCSCView (#458) f455a8e Add messages to DimensionMismatch errors (#461) 81fc6f3 Aggressive constprop in sparse * dense (#460) 0b36fdd fix h/vcat invoke dispatch arguments (#464) 6b23902 Add Finch to list of External Julia Sparse Array Libraries (#462) ``` Co-authored-by: Dilum Aluthge <[email protected]>
The map() and reduce() functions in the core library are the expected functional programming primitives. But filter() is not, it's an FFTW function instead. I'd recommend renaming the FFTW function as something like ffilter() or vfilter(), and defining filter(f, x) to be the equivalent of something like x[f(x)], where x is an iterable and f() returns a boolean.
The text was updated successfully, but these errors were encountered: