Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion FIAT/discontinuous_lagrange.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# SPDX-License-Identifier: LGPL-3.0-or-later

import itertools
import math
import numpy as np
from FIAT import finite_element, polynomial_set, dual_set, functional, P0
from FIAT.reference_element import LINE, make_lattice
Expand All @@ -17,7 +18,7 @@

def make_entity_permutations(dim, npoints):
if npoints <= 0:
return {o: [] for o in range(np.math.factorial(dim + 1))}
return {o: [] for o in range(math.factorial(dim + 1))}
# DG nodes are numbered, in order of significance,
# - by g0: entity dim (vertices first, then edges, then ...)
# - by g1: entity ids (DoFs on entities of smaller ids first)
Expand Down
3 changes: 2 additions & 1 deletion FIAT/orientation_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import itertools
import math
from collections.abc import Sequence
import numpy as np

Expand Down Expand Up @@ -53,7 +54,7 @@ def make_entity_permutations_simplex(dim, npoints):
from FIAT.polynomial_set import mis

if npoints <= 0:
return {o: [] for o in range(np.math.factorial(dim + 1))}
return {o: [] for o in range(math.factorial(dim + 1))}
a = np.array(sorted(mis(dim + 1, npoints - 1)), dtype=int)[:, ::-1]
index_perms = sorted(itertools.permutations(range(dim + 1)))
perms = {}
Expand Down
2 changes: 1 addition & 1 deletion FIAT/reference_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ def is_simplex(self):
return True

def symmetry_group_size(self, dim):
return numpy.math.factorial(dim + 1)
return factorial(dim + 1)

def cell_orientation_reflection_map(self):
"""Return the map indicating whether each possible cell orientation causes reflection (``1``) or not (``0``)."""
Expand Down
5 changes: 3 additions & 2 deletions test/unit/test_kong_mulder_veldhuizen.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import math
import numpy as np
import pytest

Expand All @@ -12,7 +13,7 @@

@pytest.mark.parametrize("p_d", [(1, 1), (2, 3), (3, 4)])
def test_kmv_quad_tet_schemes(p_d): # noqa: W503
fct = np.math.factorial
fct = math.factorial
p, d = p_d
q = create_quadrature(Te, p, "KMV")
for i in range(d + 1):
Expand All @@ -30,7 +31,7 @@ def test_kmv_quad_tet_schemes(p_d): # noqa: W503

@pytest.mark.parametrize("p_d", [(1, 1), (2, 3), (3, 5), (4, 7), (5, 9)])
def test_kmv_quad_tri_schemes(p_d):
fct = np.math.factorial
fct = math.factorial
p, d = p_d
q = create_quadrature(T, p, "KMV")
for i in range(d + 1):
Expand Down