Skip to content

Commit ca024f6

Browse files
committed
Update type check to get shape in replace
1 parent fbd288e commit ca024f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ufl/algorithms/replace.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
from ufl.algorithms.analysis import has_exact_type
1212
from ufl.algorithms.map_integrands import map_integrand_dags
13-
from ufl.classes import CoefficientDerivative, Form
13+
from ufl.classes import CoefficientDerivative, BaseForm
1414
from ufl.constantvalue import as_ufl
1515
from ufl.core.external_operator import ExternalOperator
1616
from ufl.core.interpolate import Interpolate
@@ -28,7 +28,7 @@ def __init__(self, mapping):
2828
# One can replace Coarguments by 1-Forms
2929
def get_shape(x):
3030
"""Get the shape of an object."""
31-
if isinstance(x, Form):
31+
if isinstance(x, BaseForm):
3232
return x.arguments()[0].ufl_shape
3333
return x.ufl_shape
3434

0 commit comments

Comments
 (0)