Re: [sage-devel] cached_function: cache a(n) only when n is *not* a prime power

2014-05-14 Thread Daniel Krenn
Am 2014-05-14 12:54, schrieb Nathann Cohen: > 2) If not, do you think that implementing this is a nice idea ? (I am > worried of making the standard use case slower) Yes, I would need this as well. So also my other posting in the thread "cached_function: a filter to only cache some inputs ?" Da

[sage-devel] cached_function: cache a(n) only when n is *not* a prime power

2014-05-14 Thread Nathann Cohen
Helloo everybody ! This thread is obviously totally unrelated to the other one. I have a function named "a" which takes an integer as input. Unfortunately when 'n' is a prime power, a(n) returns a very large matrix (but quick to compute). Thus, I would love to cache only the answers of a(n)