Skip to content

Commit

Permalink
check for cache kwarg in get_contraction() calls
Browse files Browse the repository at this point in the history
  • Loading branch information
mattorourke17 committed Feb 21, 2022
1 parent 81f553d commit 36dedb7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions quimb/tensor/tensor_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ def get_contraction(eq, *shapes, cache=True, get='expr',
expr = expr_fn(eq, *shapes, optimize=optimize, **kwargs)
return expr

# check for user-supplied cache kwarg
if 'cache' in kwargs:
cache = kwargs['cache']

# make sure shapes are hashable + concrete python ints
if not (
isinstance(shapes[0], tuple) and
Expand Down

0 comments on commit 36dedb7

Please sign in to comment.