mtnlion.tools.cache module

File caching tools.

mtnlion.tools.cache.persist_to_npy_file(file_name: str, do_cache: Callable[[numpy.ndarray, Any], bool] = <function <lambda>>) → Callable[source]

Decorator to cache numpy arrays to a file.

Parameters
  • file_name – name of the cached file

  • do_cache – function to determine if caching should be performed