Skip to content

Commit c814779

Browse files
feat: allow specifying eltype of numeric buffer in better_varmap_to_vars
1 parent b228fd9 commit c814779

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/systems/problem_utils.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ Keyword arguments:
362362
- `is_initializeprob, guesses`: Used to determine whether the system is missing guesses.
363363
"""
364364
function better_varmap_to_vars(varmap::AbstractDict, vars::Vector;
365-
tofloat = true, container_type = Array,
365+
tofloat = true, container_type = Array, floatT = Float64,
366366
toterm = default_toterm, promotetoconcrete = nothing, check = true,
367367
allow_symbolic = false, is_initializeprob = false)
368368
isempty(vars) && return nothing
@@ -385,6 +385,8 @@ function better_varmap_to_vars(varmap::AbstractDict, vars::Vector;
385385
is_initializeprob ? throw(MissingGuessError(missingsyms, missingvals)) :
386386
throw(UnexpectedSymbolicValueInVarmap(missingsyms[1], missingvals[1]))
387387
end
388+
389+
vals = floatT.(vals)
388390
end
389391

390392
if container_type <: Union{AbstractDict, Tuple, Nothing, SciMLBase.NullParameters}

0 commit comments

Comments
 (0)