Skip to content

reduce(hcat, ...) errors #177

Description

@stillyslalom
julia> ThreadsX.reduce(hcat, [rand(3), rand(3)])
ERROR: DimensionMismatch("mismatch in dimension 1 (expected 1 got 3)")

This is a common idiom for concatenating arrays of arrays. reduce(vcat, ...) runs, but produces incorrect results that point to the source of the error for hcat:

julia> ThreadsX.reduce(vcat, [rand(3), rand(3)])
8-element Vector{Union{InitialValues.InitialValueOf{typeof(vcat)}, Float64}}:
  InitialValue(vcat)
 0.7140306092023179
 0.8995936786278651
 0.5841323215816541
  InitialValue(vcat)
 0.45848307169563784
 0.685422666949578
 0.763444779970013

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions