tweak warn message
This commit is contained in:
parent
ee6f6ca52a
commit
cba0d34f99
1 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ function check(f, Jf, x, constant_components::Vector{Int}=Int[]; f_kwargs...)
|
|||
error_array = [norm(vec(f(x + ε * direction; f_kwargs...) - f_x) - ε * Jf_x * direction) for ε in ε_array]
|
||||
else
|
||||
@tensor begin
|
||||
Jf_x_direction[i,j] := Jf_x[i,j,k] * direction[k]
|
||||
Jf_x_direction[i, j] := Jf_x[i, j, k] * direction[k]
|
||||
end
|
||||
|
||||
error_array = [norm(f(x + ε * direction; f_kwargs...) - f_x - ε * Jf_x_direction) for ε in ε_array]
|
||||
|
@ -52,7 +52,7 @@ function check(f, Jf, x, constant_components::Vector{Int}=Int[]; f_kwargs...)
|
|||
|
||||
m = maximum(error_array)
|
||||
if m < 1e-8
|
||||
@warn "f looks linear!"
|
||||
@warn "f looks constant or linear!"
|
||||
return true
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue