From 46845010f337d5960fa6c048a044753a5a39e15a Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Fri, 4 Mar 2022 11:03:06 +0100 Subject: [PATCH] Fixed numpy abs --- swash/processing/post.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swash/processing/post.py b/swash/processing/post.py index 9032879..7fec275 100644 --- a/swash/processing/post.py +++ b/swash/processing/post.py @@ -31,9 +31,9 @@ x, t = data["x"], data["t"] # Cospectral calculations x0 = config.getint("post", "x0") -arg_x0 = (x - x0).abs().argmin() +arg_x0 = np.abs(x - x0).argmin() t0 = config.getfloat("post", "t0") -arg_t0 = (t - t0).abs().argmin() +arg_t0 = np.abs(t - t0).argmin() dt = config.getfloat("post", "dt") f = 1 / dt log.info(f"Computing reflection coefficient at x={x0}")