diff --git a/src/templates_front/templator_front.org b/src/templates_front/templator_front.org index c3f692f..fba7391 100644 --- a/src/templates_front/templator_front.org +++ b/src/templates_front/templator_front.org @@ -4667,7 +4667,7 @@ def write_$group_dset$(trexio_file: File, offset_file: int, buffer_size: int, ds if not isinstance(dset, (list, tuple, np.ndarray)): raise TypeError("dset argument has to be an array (list, tuple or NumPy ndarray).") - if isinstance(dset, np.ndarray) and not coefficients.dtype==np.float64: + if isinstance(dset, np.ndarray) and not dset.dtype==np.float64: # convert to float64 if input is in a different precision dset_64 = np.float64(dset) rc = pytr.trexio_write_safe_$group_dset$(trexio_file.pytrexio_s, offset_file, buffer_size, dset_64)