Skip to content
Snippets Groups Projects
Commit eb806959 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

UFL classes are already immutable.

Directly return them.
parent e81362df
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,10 @@ def generate_cache_tuple(*args):
if isinstance(data, str):
return data
import ufl.classes
if isinstance(data, ufl.classes.Expr):
return data
# Check if the given data is already hashable
if isinstance(data, Hashable):
if isinstance(data, Iterable):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment