Skip to content

Bug in function all #45562

@zdlspace0528

Description

@zdlspace0528

I find a bug about all.

here is the result.

julia> all([3, 3, 3], dims = 1)
1-element Vector{Bool}:
 1

The result maybe wrong.

julia> for i in 1:10
           @show all(i * ones(Int, 3), dims = 1)
       end
all(i * ones(Int, 3), dims = 1) = Bool[1]
all(i * ones(Int, 3), dims = 1) = Bool[0]
all(i * ones(Int, 3), dims = 1) = Bool[1]
all(i * ones(Int, 3), dims = 1) = Bool[0]
all(i * ones(Int, 3), dims = 1) = Bool[1]
all(i * ones(Int, 3), dims = 1) = Bool[0]
all(i * ones(Int, 3), dims = 1) = Bool[1]
all(i * ones(Int, 3), dims = 1) = Bool[0]
all(i * ones(Int, 3), dims = 1) = Bool[1]
all(i * ones(Int, 3), dims = 1) = Bool[0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorcorrectness bug ⚠Bugs that are likely to lead to incorrect results in user code without throwing

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions