gemseo.caches.utils module#
Some cache utilities.
- hash_data(data)[source]#
Hash data using xxh3_64 from the xxhash library.
- Parameters:
- Returns:
The hash value of the data.
- Return type:
Examples
>>> from gemseo.caches.utils import hash_data >>> from numpy import array >>> data = {"x": array([1.0, 2.0]), "y": array([3.0])} >>> hash_data(data) 13252388834746642440 >>> hash_data(data, "x") 4006190450215859422