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:
commit
d26d33347b
@ -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}' )
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user