Skip to content

Error from uninitialised array of BigFloat #3

@mcabbott

Description

@mcabbott
julia> x = BigFloat[1, 2]
2-element Vector{BigFloat}:
 1.0  #    ┝━━━━━━━━━━━━━━━━╸
 2.0  #    ┝━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

julia> y = similar(x)
2-element Vector{BigFloat}:
Error showing value of type Vector{BigFloat}:
ERROR: UndefRefError: access to undefined reference
Stacktrace:
  [1] getindex
    @ ./essentials.jl:917 [inlined]
  [2] _mapreduce(f::Base.ExtremaMap{…}, op::typeof(Base._extrema_rf), ::IndexLinear, A::Vector{…})
    @ Base ./reduce.jl:435
  [3] _mapreduce_dim(f::Function, op::Function, ::Base._InitialValue, A::Vector{BigFloat}, ::Colon)
    @ Base ./reducedim.jl:337
  [4] mapreduce
    @ ./reducedim.jl:329 [inlined]
  [5] _extrema(f::Function, a::Vector{BigFloat}, ::Colon; kw::@Kwargs{})
    @ Base ./reducedim.jl:987
  [6] extrema
    @ ./reducedim.jl:983 [inlined]
  [7] print_matrix(io::IOContext{…}, X::AbstractVector{…}, pre::String, sep::String, post::String, hdots::String, vdots::String, ddots::String, hmod::Int64, vmod::Int64)
    @ InTheRed ~/.julia/dev/InTheRed/src/InTheRed.jl:327

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