From fff06571a82bad65f09e5d4fdc47924c05fc1503 Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Mon, 19 Jul 2021 13:41:39 -0400 Subject: [PATCH] make x_of_nans work on 0-dimensional arrays --- src/NLSolversBase.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NLSolversBase.jl b/src/NLSolversBase.jl index 47d07b0..84c216f 100644 --- a/src/NLSolversBase.jl +++ b/src/NLSolversBase.jl @@ -57,7 +57,7 @@ end is_finitediff(autodiff) = autodiff ∈ (:central, :finite, :finiteforward, :finitecomplex) is_forwarddiff(autodiff) = autodiff ∈ (:forward, :forwarddiff, true) -x_of_nans(x, Tf=eltype(x)) = fill!(Tf.(x), Tf(NaN)) +x_of_nans(x, Tf=eltype(x)) = fill!(map(Tf,x), Tf(NaN)) include("objective_types/inplace_factory.jl") include("objective_types/abstract.jl")