Skip to content
Snippets Groups Projects
Commit 7e8dbd1d authored by Michael Langguth's avatar Michael Langguth
Browse files

Minor bugfix in type-checking of append_ds-method in main_visualize_postprocess.py.

parent 9ca43016
Branches
Tags
No related merge requests found
Pipeline #76920 passed
...@@ -1152,12 +1152,11 @@ class Postprocess(TrainModel): ...@@ -1152,12 +1152,11 @@ class Postprocess(TrainModel):
if not set(varnames).issubset(ds_in.data_vars): if not set(varnames).issubset(ds_in.data_vars):
raise ValueError("%{0}: Could not find all variables ({1}) in input dataset ds_in.".format(method, raise ValueError("%{0}: Could not find all variables ({1}) in input dataset ds_in.".format(method,
varnames_str)) varnames_str))
#Bing : why using dtype as an aurument since it seems you only want ton configure dtype as np.double
if dtype is None: if dtype is None:
dtype = np.double dtype = np.double
else: else:
if not isinstance(dtype, type(np.double)): if not np.issubdtype(dtype, np.dtype(float).type):
raise ValueError("%{0}: dytpe must be a NumPy datatype, but is of type '{1}'".format(method, type(dtype))) raise ValueError("%{0}: dytpe must be a NumPy datatype, but is '{1}'".format(method, np.dtype(dtype)))
if ds_preexist is None: if ds_preexist is None:
ds_preexist = ds_in[varnames].copy(deep=True) ds_preexist = ds_in[varnames].copy(deep=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment