Skip to content

The default mapreduce_impl doesn't work for non-Bool == #31390

@ararslan

Description

@ararslan

See https://github.com/JuliaLang/julia/blob/v1.1.0/base/reduce.jl#L462. If v == v produces something other than Bool, this fails, producing errors such as that seen in jump-dev/Convex.jl#275. In the case of Convex, == produces an EqConstraint.

Is the right solution here for packages to specialize mapreduce_impl on arrays with a particular eltype so that this logic doesn't get hit, or is there more generic solution that can replace the v == v check?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions