JuliaFolds / Transducers.jl

Efficient transducers for Julia
https://juliafolds.github.io/Transducers.jl/dev/
MIT License
433 stars 24 forks source link

Incorrect output with `foldxt` #560

Open fcdimitr opened 1 year ago

fcdimitr commented 1 year ago
julia> X = rand(4,100);

julia> foldl( TeeRF(min,max), eachcol(X) |> Broadcasting() )
4-element Vector{Tuple{Float64, Float64}}:
 (0.0007001389824357052, 0.9999324401155407)
 (0.019100256571215724, 0.999173988779715)
 (0.0007306661336644593, 0.9955462670775527)
 (0.0016049864224007004, 0.9960220490944728)

julia> foldxt( TeeRF(min,max), eachcol(X) |> Broadcasting() )
2-element Vector{Tuple{Float64, Float64}}:
 (0.0007001389824357052, 0.9999324401155407)
 (0.019100256571215724, 0.999173988779715)

I am running Julia v1.9.2.

Am I misunderstanding something in the usage of foldxt?

Thank you!