Skip to content

Commit

Permalink
Fallback for printing string variables
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Aug 2, 2023
1 parent 2b7fde4 commit d505a2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Equation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ function string_constant(val, bracketed::Bool)
end

function string_variable(feature, variable_names)
if variable_names === nothing
if variable_names === nothing || feature > lastindex(variable_names)
return "x" * string(feature)
else
return variable_names[feature]
Expand Down

0 comments on commit d505a2f

Please sign in to comment.