diff --git a/sympyextensions.py b/sympyextensions.py index 51a2f77e2ccb971693b13dcec84c8559bcde3b46..b836d3d53ee870184ab63f602fa543ea21b2bd39 100644 --- a/sympyextensions.py +++ b/sympyextensions.py @@ -75,7 +75,7 @@ def tanh_step_function_approximation(x, step_location, kind='right', steepness=0 return (1 + sp.tanh((x - step_location) / steepness)) / 2 elif kind == 'middle': x1, x2 = step_location - return 1 - (tanh_step_function_approximation(x, x1, 'left', steepness) + \ + return 1 - (tanh_step_function_approximation(x, x1, 'left', steepness) + tanh_step_function_approximation(x, x2, 'right', steepness))