Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Use fecr instead of fenics_numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanYashchuk committed Feb 28, 2021
1 parent 3f165ef commit 31ca1cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/fenics/test_assemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from fenics_pymc3 import create_fenics_theano_op
from fenics_pymc3 import FenicsVJPOp

from fenics_numpy import evaluate_primal, evaluate_vjp
from fecr import evaluate_primal, evaluate_pullback

theano.config.optimizer = "fast_compile"
theano.config.compute_test_value = "ignore"
Expand Down Expand Up @@ -59,7 +59,9 @@ def test_theano_vjp():
f = theano.function([g], vjp_op(g))
theano_output = f(np.ones(1))

numpy_output = evaluate_vjp(np.ones(1), fenics_output, tuple(fenics_inputs), tape)
numpy_output = evaluate_pullback(
fenics_output, tuple(fenics_inputs), tape, np.ones(1)
)
for to, no in zip(theano_output, numpy_output):
with check:
assert np.allclose(to, no)

0 comments on commit 31ca1cf

Please sign in to comment.