Skip to content
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

Closed
HarlanH opened this issue Feb 25, 2012 · 13 comments
Closed

map/reduce/filter functions #461

HarlanH opened this issue Feb 25, 2012 · 13 comments

Comments

@HarlanH
Copy link
Contributor

HarlanH commented Feb 25, 2012

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.

@StefanKarpinski
Copy link
Member

+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.

@JeffBezanson
Copy link
Member

It's not an fftw function, but it is a signal processing function.

@StefanKarpinski
Copy link
Member

I still think the standard named functional programming higher-order function should win this clash.

@JeffBezanson
Copy link
Member

With scheme as my second-favorite language ;), I agree, but we should find a signal expert to suggest an alternate name.

@nolta
Copy link
Member

nolta commented Feb 26, 2012

I'm not an expert, but how about dspfilter?

@StefanKarpinski
Copy link
Member

sigfilter?

@ViralBShah
Copy link
Member

How about filter_sp? That way, someone who is used to calling filter for signal processing can find this one by doing tab completion. The documentation for filter can also point people in the right direction.

@ViralBShah
Copy link
Member

It is really difficult to find a better name for filter, since that is the term in the literature. Another possibility is to use filt.

@JeffBezanson
Copy link
Member

Let's go with filt.

@StefanKarpinski
Copy link
Member

+1 for filt.

@HarlanH
Copy link
Contributor Author

HarlanH commented Feb 27, 2012

Could someone please re-open this issue? I'll work on writing a filter() function this week and submit a pull request...

@pao
Copy link
Member

pao commented Jul 26, 2012

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?

@HarlanH
Copy link
Contributor Author

HarlanH commented Jul 26, 2012

I'm pretty sure it can be closed. Looks like #500 got closed, but this one didn't? Weird.

@pao pao closed this as completed Jul 26, 2012
StefanKarpinski pushed a commit that referenced this issue Feb 8, 2018
Keno pushed a commit that referenced this issue Oct 9, 2023
This, together with some companion changes in LoweredCodeUtils and revise, shaves another 200ms off the time for first revision.
ViralBShah pushed a commit that referenced this issue Nov 9, 2023
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 <dilum@aluthge.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants