Skip to content

Possible bug: StackOverflowError with inds::Tuple{Int32,Colon} #235

Closed
@toollu

Description

@toollu
Vec64  = zeros(6)
Vec32  = Float32.(zeros(6))
ind_a_64 = 3
ind_a_32 =Int32.(ind_a_64)
julia> reshape(Vec64,ind_a_64,:)
3×2 Matrix{Float64}:
 0.0  0.0
 0.0  0.0
 0.0  0.0

julia> reshape(Vec32,ind_a_64,:)
3×2 Matrix{Float32}:
 0.0  0.0
 0.0  0.0
 0.0  0.0

julia> reshape(Vec64,ind_a_32,:)
ERROR: StackOverflowError:
Stacktrace:
 [1] reshape(A::Vector{Float64}, inds::Tuple{Int32, Colon}) (repeats 79984 times)
   @ OffsetArrays ~/.julia/packages/OffsetArrays/5zoKM/src/OffsetArrays.jl:306

julia> reshape(Vec32,ind_a_32,:)
ERROR: StackOverflowError:
Stacktrace:
 [1] reshape(A::Vector{Float32}, inds::Tuple{Int32, Colon}) (repeats 79984 times)
   @ OffsetArrays ~/.julia/packages/OffsetArrays/5zoKM/src/OffsetArrays.jl:306

julia> reshape(Vec32,ind_a_32,2)
3×2 Matrix{Float32}:
 0.0  0.0
 0.0  0.0
 0.0  0.0
julia> VERSION
v"1.6.0"

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