Skip to content

Commit 5944836

Browse files
committed
Add typing generics Form
1 parent de6166c commit 5944836

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

python/dolfinx/fem/forms.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@
3232
from dolfinx.mesh import EntityMap as _EntityMap
3333
from dolfinx.mesh import Mesh, MeshTags
3434

35+
_S = typing.TypeVar("_S", np.float32, np.float64, np.complex64, np.complex128) # scalar
3536

36-
class Form:
37+
38+
class Form(typing.Generic[_S]):
3739
"""A finite element form."""
3840

3941
_cpp_object: (

0 commit comments

Comments
 (0)