Skip to content

Instantly share code, notes, and snippets.

@cwidmer
Created March 20, 2014 23:58
Show Gist options
  • Save cwidmer/9676696 to your computer and use it in GitHub Desktop.
Save cwidmer/9676696 to your computer and use it in GitHub Desktop.
"""
cache linear algebra (or any other) operations
based on hashes of input arguments
"""
import numpy.linalg as la
from sklearn.external import joblib
mem = joblib.Memory(cachedir=cachedir, verbose=True, compress=True)
#mem.clear()
cached_eigh = mem.cache(la.eigh)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment