-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
I just installed the latest versions of Julia (1.12.0) and Omniscape (0.6.2), but cannot get the examples from https://docs.circuitscape.org/Omniscape.jl/stable/examples to run successfully. The following code chunk fails:
currmap, flow_pot, norm_current = run_omniscape(config,
land_cover,
reclass_table = reclass_table,
wkt = wkt,
geotransform = transform,
write_outputs = true)
MethodError: no method matching missingarray_to_array(::Matrix{Union{Missing, Float64}}, ::Int64)
This error has been manually thrown, explicitly, so the method may exist but be intentionally marked as unimplemented.
Closest candidates are:
missingarray_to_array(::Array{Union{Missing, T}, N} where {N, T<:Number}, ::Number)
@ Omniscape ~/.julia/packages/Omniscape/VSLPS/src/utils.jl:614
Stacktrace:
[1] calc_correction(arguments::Dict{String, Int64}, os_flags::Omniscape.OmniscapeFlags, cs_cfg::Dict{String, String}, condition_layers::Omniscape.ConditionLayers{Float64}, conditions::Omniscape.Conditions, precision::DataType)
@ Omniscape ~/.julia/packages/Omniscape/VSLPS/src/utils.jl:471
[2] run_omniscape(cfg::Dict{String, String}, resistance::Matrix{Union{Missing, Float64}}; reclass_table::Matrix{Union{Missing, Float64}}, source_strength::Matrix{Union{Missing, Float64}}, condition1::Nothing, condition2::Nothing, condition1_future::Nothing, condition2_future::Nothing, wkt::String, geotransform::Vector{Float64}, write_outputs::Bool)
@ Omniscape ~/.julia/packages/Omniscape/VSLPS/src/main.jl:252
[3] top-level scope
@ ~/example-connectivity/jl_notebook_cell_df34fa98e69747e1a8f8a730347b8e2f_X13sZmlsZQ==.jl:1
Based on the error message and the stacktrace, it appears to be a method dispatch problem, but I'm not sure why Int64
is not considered a Number
(or perhaps methods must be strictly typed).
Metadata
Metadata
Assignees
Labels
No labels