1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2025-04-26 02:14:54 +02:00

Merge branch 'TREX-CoE:master' into master

This commit is contained in:
joguenzl 2023-06-02 15:20:45 +02:00 committed by GitHub
commit d26d33347b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -16,8 +16,10 @@ done
# check that both variables are set
if [[ -z ${H5_LDFLAGS_LOCAL} ]] || [[ -z ${H5_CFLAGS_LOCAL} ]]; then
if [[ -z ${H5_LDFLAGS} ]] || [[ -z ${H5_CFLAGS} ]]; then
which h5cc &> /dev/null
if [[ $? -eq 0 ]] ; then
# If pkg-config fails, try to locate hdf5 using h5cc
which h5cc &> /dev/null && HAS_H5CC=1
pkg-config --libs hdf5
if [[ $? -ne 0 && $HAS_H5CC == "1" ]] ; then
HDF5_tmp_flags=$(h5cc -showconfig \
| grep 'FLAGS\|Extra libraries:' \
| awk -F: '{printf("%s "), $2}' )

View File

@ -4669,7 +4669,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)