From a5ae73ac25aeeca53aa6bc0a823cb97611a3e7b5 Mon Sep 17 00:00:00 2001 From: "Sergey E. Koposov" Date: Sat, 16 Nov 2024 19:37:35 +0000 Subject: [PATCH] update test --- py/rvspecfit/serializer.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/py/rvspecfit/serializer.py b/py/rvspecfit/serializer.py index e84d495..6b6b0cb 100644 --- a/py/rvspecfit/serializer.py +++ b/py/rvspecfit/serializer.py @@ -165,7 +165,7 @@ def test_code(): # Example data containing various data types data = { 'x': np.int64(2), - 'vv': np.arange(1000, dtype=np.float64), + 'vv': np.arange(3, dtype=np.float64), 'y': { 'inside_y': np.arange(5) }, @@ -180,10 +180,11 @@ def test_code(): } # Save dictionary to an HDF5 file - save_dict_to_hdf5(data, 'data.h5', allow_pickle=True) + fname = 'data.h5' + save_dict_to_hdf5(fname, data, allow_pickle=True) # Load dictionary from HDF5 file - loaded_data = load_dict_from_hdf5('data.h5') + loaded_data = load_dict_from_hdf5(fname) print(loaded_data) print(verify_data(data, loaded_data))