mirror of
https://github.com/TREX-CoE/trexio.git
synced 2025-01-03 10:06:01 +01:00
Fix bug in python interface for writing CI coefficients
This commit is contained in:
parent
d8a37b26bf
commit
cb629ccb03
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user