From cba0d34f990b35b31d6f5b1f10aa92ac4c196427 Mon Sep 17 00:00:00 2001 From: Gaspard Jankowiak Date: Tue, 11 Feb 2025 13:41:56 +0100 Subject: [PATCH] tweak warn message --- src/TaylorTest.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TaylorTest.jl b/src/TaylorTest.jl index 6db043a..96575ef 100644 --- a/src/TaylorTest.jl +++ b/src/TaylorTest.jl @@ -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