Skip to content

Commit

Permalink
use numpy.vectorize
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed Nov 21, 2023
1 parent 20978c7 commit 1b2c89c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions FIAT/barycentric_interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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
Expand Down

0 comments on commit 1b2c89c

Please sign in to comment.