From 1c930431fe9c51796f2707aa70d30e9ac5a55207 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Fri, 11 Mar 2022 16:02:36 +0100 Subject: [PATCH] Switched genfromtxt to loadtxt --- data/processing/projection.py | 2 +- data/processing/subdomain.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data/processing/projection.py b/data/processing/projection.py index dbf8adf..dc3fa20 100644 --- a/data/processing/projection.py +++ b/data/processing/projection.py @@ -63,7 +63,7 @@ log.info("Interpolating bathymetry in 1D") z = interpolate.griddata(bathy[:, :2], bathy[:, 2], coords) log.debug(f"z: {z}") -_hires = np.genfromtxt(hires_inp)[::-1] +_hires = np.loadtxt(hires_inp)[::-1] bathy_hires = np.stack( ( np.linspace( diff --git a/data/processing/subdomain.py b/data/processing/subdomain.py index 73f62bd..a2d6e13 100644 --- a/data/processing/subdomain.py +++ b/data/processing/subdomain.py @@ -38,7 +38,7 @@ out_root = pathlib.Path(config.get("out", "root")) bathy_inp = inp_root.joinpath(config.get("inp", "base")) bathy_out = out_root.joinpath(config.get("out", "sub")) log.info(f"Reading bathymetry from '{bathy_inp}'") -raw_bathy = np.genfromtxt(bathy_inp) +raw_bathy = np.loadtxt(bathy_inp) log.debug(f"Initial size: {raw_bathy.shape}") bathy = raw_bathy[ @@ -46,6 +46,7 @@ bathy = raw_bathy[ axis=1 ) ] +del raw_bathy log.debug(f"Final size: {bathy.shape}") log.info(f"Saving subdomain to 'bathy'")