From cb629ccb03d910d3b3b29fb57210f316cf2814ba Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 2 Jun 2023 15:09:02 +0200 Subject: [PATCH] Fix bug in python interface for writing CI coefficients --- src/templates_front/templator_front.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)