Skip to content

Commit

Permalink
Merge pull request #179 from jakobj/fix/test-to-torch
Browse files Browse the repository at this point in the history
Actually use `to_torch` in `_test_to_torch`
  • Loading branch information
jakobj committed Jul 7, 2020
2 parents 6705227 + b6c8ecb commit 66a8e5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def _test_to_numpy(genome, x, y_target):
def _test_to_torch(genome, x, y_target):
torch = pytest.importorskip("torch")
graph = cgp.CartesianGraph(genome)
assert graph.to_numpy()(torch.Tensor(x).reshape(1, -1)) == pytest.approx(y_target)
assert graph.to_torch()(torch.Tensor(x).reshape(1, -1)) == pytest.approx(y_target)


def _test_to_sympy(genome, x, y_target):
Expand Down

0 comments on commit 66a8e5b

Please sign in to comment.