From 537f90d31b6c59aa060a279865b7025f39b6f52c Mon Sep 17 00:00:00 2001
From: Brian Groenke <brian.groenke@awi.de>
Date: Fri, 21 Feb 2025 17:58:01 +0100
Subject: [PATCH] Re-add missing adstrip method

---
 src/Utils/Utils.jl | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/Utils/Utils.jl b/src/Utils/Utils.jl
index 4c20a1e7..6fa2948f 100644
--- a/src/Utils/Utils.jl
+++ b/src/Utils/Utils.jl
@@ -161,6 +161,14 @@ function ffill!(x::AbstractVector{T}) where {E,T<:Union{Missing,E}}
     return x
 end
 
+"""
+    adstrip(x)
+
+Strips autodiff type wrappers from `x`.
+"""
+adstrip(x) = x
+adstrip(x::ForwardDiff.Dual) = ForwardDiff.value(x)
+
 """
     pstrip(obj; keep_units=false)
 
-- 
GitLab