| Conditions | 2 | 
| Total Lines | 12 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | # Licensed under a 3-clause BSD style license - see LICENSE  | 
            ||
| 10 | def memoize(f):  | 
            ||
| 11 | """Decorator for recursive memoization."""  | 
            ||
| 12 |     memo = {} | 
            ||
| 13 | |||
| 14 | def helper(a, b):  | 
            ||
| 15 | x = np.array([a, b], dtype="object")  | 
            ||
| 16 | y = bytes(x)  | 
            ||
| 17 | if y not in memo:  | 
            ||
| 18 | memo[y] = f(a, b)  | 
            ||
| 19 | return memo[y]  | 
            ||
| 20 | |||
| 21 | return helper  | 
            ||
| 22 | |||
| 46 | return xs, ys  | 
            ||