Skip to content

Commit 3c988f3

Browse files
committed
[BUG] sigmoid_slope broken when was an array for finite faults
1 parent b4a9f07 commit 3c988f3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gempy_engine/modules/activator/activator_interface.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ def activate_formation_block(exported_fields: ExportedFields, ids: np.ndarray,
1212
Z_x: np.ndarray = exported_fields.scalar_field_everywhere
1313
scalar_value_at_sp: np.ndarray = exported_fields.scalar_field_at_surface_points
1414

15-
if LEGACY := True and sigmoid_slope > 0: # * Here we branch to the experimental activation function with hard sigmoid
15+
sigmoid_slope_negative = isinstance(sigmoid_slope, float) and sigmoid_slope < 0 # * sigmoid_slope can be array for finite faultskA
16+
17+
if LEGACY := True and not sigmoid_slope_negative: # * Here we branch to the experimental activation function with hard sigmoid
1618
sigm = activate_formation_block_from_args(Z_x, ids, scalar_value_at_sp, sigmoid_slope)
1719
else:
1820
from .torch_activation import activate_formation_block_from_args_hard_sigmoid

0 commit comments

Comments
 (0)