Closed schlichtanders closed 2 years ago
Could you clarify what doesn't work? I don't think I follow you.
julia> o = Counter(Any)
Counter: n=0 | value=0
julia> fit!(o, 1)
Counter: n=1 | value=1
julia> fit!(o, "hi")
Counter: n=2 | value=2
Hi JoshDay, thank you for managing these tickets.
I actually found the misunderstanding
julia> o = Counter(Any)
Counter: n=0 | value=0
julia> fit!(o, [1,2,3,4])
Counter: n=1 | value=1
Any is also matching iterators, which makes totally sense. The workaround is iterating yourself.
Ah, right! Glad you worked it out.
Using Counter I was very surprised that
Counter(Any)
does not work.Given the documentation
Count the number of items in a data stream with elements of type T.
this sounds like a but, as every element is of typeAny
.