Closed cossio closed 2 years ago
just remove ::Function
? vocally we just mean callable here but since it's not a type and we don't have such an interface, we can keep using the "function" with small "f" to mean callable
I'll not say that the docstring is wrong, as the suggested use is definitely valid. Perhaps it's better to suggest that the docstring is too narrow in scope.
@nalimilan Should this be filed in the Statistics.jl repo?
Right. I've just filed https://github.com/JuliaLang/Statistics.jl/pull/110, which makes the minimal change of removing ::Function
. This is consistent with the docstring for sum
. "Function" is probably clearer for users than "callable" and the signature conveys the fact that any type is accepted for f
.
Docstring for
mean
says that:However,
mean
also works with callable structs, not justf::Function
.The docstring should be updated to reflect that.