- Timestamp:
- 12/06/13 14:38:34 (2 years ago)
- Location:
- branches/decorate
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/decorate/memoize.py
r709 r710 4 4 from functools import update_wrapper, wraps as functools_wraps 5 5 from klepto.rounding import deep_round, simple_round 6 from klepto.archives import archive_dict6 from klepto.archives import cache as archive_dict 7 7 from klepto.keymaps import stringmap 8 8 from klepto import inf_cache -
branches/decorate/surrogate.py
r709 r710 22 22 from klepto.safe import inf_cache as memoized 23 23 #from klepto import inf_cache as memoized 24 from klepto.archives import archive_dict, file_archive24 from klepto.archives import cache, file_archive 25 25 from klepto.keymaps import picklemap, stringmap, hashmap 26 26 dumps = picklemap(flat=False) 27 27 encode = stringmap(flat=False) 28 28 hashed = hashmap(flat=False) 29 cache = archive_dict(archive=file_archive('surrogate.pkl'))29 cache = cache(archive=file_archive('surrogate.pkl')) 30 30 #@memoized(keymap=dumps, tol=0, deep=True) # slower, but more robust 31 31 #@memoized(keymap=encode, tol=0, deep=True)
Note: See TracChangeset
for help on using the changeset viewer.