emin and emax have misleading names
I understand the 'e' prefix to stand for element-wise, but I find this not always intuitive. The following functions I consider to be element-wise:
- emap
- efilter
- emul
- mul
- add
- sub
- min
- max
The following functions I consider to be collection-wise:
- ereduce (should be kept the way it is)
- esum (rename to sum?)
- emin (rename to minimum)
- emax (rename to maximum)
- every function in the stats namespace
In core.matrix:
user=> (operator/min [1 3] [3 1]) => [1 1]
user=> (mat/emin [1 3]) => 1
In Julia:
julia> min([1 3], [3 1]) => 1 1
This is called element-wise by the docs.
julia> minimum([1, 3]) => 1
Would it be better to rename emin and emax to minimum and maximum move them to the stats namespace?
Part of the reason of e is to avoid collisions with clojure.core.
The reason some things are in the operators namespace is that these are things that you may want to use selectively to replace clojure.core defined operators.
Happy to consider renaming things but it is a fine trade-off between a few factors:
- Using good names
- Convenience
- Being self-explanatory
- Avoiding name collisions
- Following conventions from elsewhere (Clojure / other matrix libraries)
Willing to consider a rename of emin and emax specifically, I think the proposal makes sense