Last active
May 23, 2020 11:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Define our function | |
def func(x): | |
print("Example of Computationally intensive function!") | |
print("The result is not cached for this particular input") | |
sleep(4.0) | |
return np.square(x) | |
# Pass it to Memory.cache method | |
func_mem = mem.cache(func, verbose=0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment