Skip to content

Instantly share code, notes, and snippets.

@Argysh
Argysh / npCache.md
Last active July 22, 2019 15:26 — forked from Susensio/numpy_lru_cache.md
Make function of numpy array cacheable

caching functions and methods with a numpy array as first argument

from copy import copy
from time import sleep

array = np.random.rand(900,600)
param = int(np.random.rand()*1000)

print('\nwith @npCache:')