StatsBase.wsum (and others) don’t work on iterators.
Is there a fundamental reason for this?
And speaking of which, the docstring shows wsum(v, w::AbstractVector, [dim])
but in reality all methods are v::AbstractArray
.
StatsBase.wsum (and others) don’t work on iterators.
Is there a fundamental reason for this?
And speaking of which, the docstring shows wsum(v, w::AbstractVector, [dim])
but in reality all methods are v::AbstractArray
.
There is no fundamental reason for it. It just requires that somebody contributes the necessary code. We would need to check whether it makes sense to keep both generic iterator and specialized array methods around (depends on performance aspects – the use of generated functions highlights how much effort has gone into making the existing methods performant).