From b9cfb56d6a0f4d3e44b0356dfe79a68aa592f0d2 Mon Sep 17 00:00:00 2001 From: Michal Januszewski Date: Wed, 8 Nov 2023 08:53:34 -0800 Subject: [PATCH] Support flow volumes with negative delta_z in reconcile_flows. PiperOrigin-RevId: 580548736 --- flow_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow_utils.py b/flow_utils.py index 90cad1b..9401926 100644 --- a/flow_utils.py +++ b/flow_utils.py @@ -104,7 +104,7 @@ def reconcile_flows(flows: Sequence[np.ndarray], max_gradient: float, # Try to fill any invalid values. m = np.repeat(np.isnan(ret[0:1, ...]), ret.shape[0], 0) if ret.shape[0] == 3: - m &= np.repeat(f[2:3, ...] >= min_delta_z, 3, 0) + m &= np.repeat(np.abs(f[2:3, ...]) >= min_delta_z, 3, 0) ret[m] = f[m] if max_gradient > 0: