1
Fork 0

Switched genfromtxt to loadtxt

This commit is contained in:
Edgar P. Burkhart 2022-03-11 16:02:36 +01:00
parent 847c252ef3
commit 1c930431fe
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
2 changed files with 3 additions and 2 deletions

View file

@ -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(

View file

@ -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'")