diff --git a/Project.toml b/Project.toml index e0490035c..ce6ef2777 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "JUDI" uuid = "f3b833dc-6b2e-5b9c-b940-873ed6319979" authors = ["Philipp Witte, Mathias Louboutin"] -version = "3.3.8" +version = "3.3.9" [deps] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" diff --git a/src/pysource/propagators.py b/src/pysource/propagators.py index 21a9f9e4c..109b6b760 100644 --- a/src/pysource/propagators.py +++ b/src/pysource/propagators.py @@ -95,11 +95,11 @@ def gradient(model, residual, rcv_coords, u, return_op=False, space_order=8, fw= """ # Setting adjoint wavefieldgradient v = wavefield(model, space_order, fw=not fw) - if as_tuple(u)[0].indices[0].is_Conditional: + try: t_sub = as_tuple(u)[0].indices[0]._factor if isinstance(t_sub, Constant): t_sub = t_sub.data - else: + except AttributeError: t_sub = 1 # Setup gradient wrt m