Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions python/basix/finite_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# SPDX-License-Identifier: MIT
"""Functions for creating finite elements."""

from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Self
from warnings import warn

import numpy as np
Expand Down Expand Up @@ -295,7 +295,7 @@ def entity_transformations(self) -> dict:
"""
return self._e.entity_transformations()

def get_tensor_product_representation(self) -> list[list["FiniteElement"]]:
def get_tensor_product_representation(self) -> list[list[Self]]:
"""Get the tensor product representation of this element.

Raises an exception if no such factorisation exists.
Expand All @@ -312,7 +312,7 @@ def get_tensor_product_representation(self) -> list[list["FiniteElement"]]:
The tensor product representation
"""
factors = self._e.get_tensor_product_representation()
return [[FiniteElement(e) for e in elements] for elements in factors]
return [[type(self)(e) for e in elements] for elements in factors]

def permute_subentity_closure(
self,
Expand Down
Loading