From 890adb78a41f05227fe79c7449e4de6b634219cb Mon Sep 17 00:00:00 2001 From: Pablo Brubeck Date: Mon, 6 Nov 2023 23:44:34 +0000 Subject: [PATCH] better reindexing --- FIAT/expansions.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/FIAT/expansions.py b/FIAT/expansions.py index 0d307a74d..fb7ea5930 100644 --- a/FIAT/expansions.py +++ b/FIAT/expansions.py @@ -270,10 +270,7 @@ def tabulate_jet(self, n, pts, order=1): for r in range(1, order+1): v = numpy.zeros((D,)*r + v0.shape, dtype=v0.dtype) for index in zip(*[range(D) for k in range(r)]): - alpha = [0] * D - for i in index: - alpha[i] += 1 - v[index] = vals[tuple(alpha)] + v[index] = vals[tuple(map(index.count, range(D)))] data.append(v.transpose((r, r+1) + tuple(range(r)))) return data