File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55# SPDX-License-Identifier: MIT
66"""Functions for creating finite elements."""
77
8- from typing import TYPE_CHECKING
8+ from typing import TYPE_CHECKING , Self
99from warnings import warn
1010
1111import numpy as np
@@ -295,7 +295,7 @@ def entity_transformations(self) -> dict:
295295 """
296296 return self ._e .entity_transformations ()
297297
298- def get_tensor_product_representation (self ) -> list [list ["FiniteElement" ]]:
298+ def get_tensor_product_representation (self ) -> list [list [Self ]]:
299299 """Get the tensor product representation of this element.
300300
301301 Raises an exception if no such factorisation exists.
@@ -312,7 +312,7 @@ def get_tensor_product_representation(self) -> list[list["FiniteElement"]]:
312312 The tensor product representation
313313 """
314314 factors = self ._e .get_tensor_product_representation ()
315- return [[FiniteElement (e ) for e in elements ] for elements in factors ]
315+ return [[type ( self ) (e ) for e in elements ] for elements in factors ]
316316
317317 def permute_subentity_closure (
318318 self ,
You can’t perform that action at this time.
0 commit comments