From 1b2c89cfc7d96aebd46fbefe45a86493abbf3e81 Mon Sep 17 00:00:00 2001 From: Pablo Brubeck Date: Tue, 21 Nov 2023 22:25:13 +0000 Subject: [PATCH] use numpy.vectorize --- FIAT/barycentric_interpolation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FIAT/barycentric_interpolation.py b/FIAT/barycentric_interpolation.py index fbc1316d0..5bb9e10b0 100644 --- a/FIAT/barycentric_interpolation.py +++ b/FIAT/barycentric_interpolation.py @@ -54,7 +54,7 @@ def tabulate(self, n, pts): results[results != results] = 1.0 if results.dtype == object: from sympy import simplify - results = numpy.array(list(map(simplify, results))) + results = numpy.vectorize(simplify)(results) return results def _tabulate(self, n, pts, order=0): @@ -64,7 +64,7 @@ def _tabulate(self, n, pts, order=0): vals = numpy.dot(self.dmat, vals) if vals.dtype == object: from sympy import simplify - vals = numpy.array(list(map(simplify, vals))) + vals = numpy.vectorize(simplify)(vals) results.append(vals) for r in range(order+1): shape = results[r].shape