Skip to content

Commit

Permalink
Use more obvious magic number in node_validation
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobj committed Jul 14, 2020
1 parent cf3c81d commit 6faefd0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cgp/node_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def check_to_func(cls: Type["OperatorNode"]) -> None:
genome = _create_genome(cls)

f = CartesianGraph(genome).to_func()
x = [1.5]
x = [3.14159]
f(x)[0]


Expand All @@ -61,7 +61,7 @@ def check_to_numpy(cls: Type["OperatorNode"]) -> None:
genome = _create_genome(cls)

f = CartesianGraph(genome).to_numpy()
x = np.ones((3, 1)) * 1.5
x = np.ones((3, 1)) * 3.14159
f(x)[0]


Expand All @@ -76,7 +76,7 @@ def check_to_torch(cls: Type["OperatorNode"]) -> None:
genome = _create_genome(cls)

f = CartesianGraph(genome).to_torch()
x = torch.ones((3, 1)) * 1.5
x = torch.ones((3, 1)) * 3.14159
f(x)[0]


Expand All @@ -91,5 +91,5 @@ def check_to_sympy(cls: Type["OperatorNode"]) -> None:
genome = _create_genome(cls)

f = CartesianGraph(genome).to_sympy()[0]
x = [1.5]
x = [3.14159]
f.subs("x_0", x[0]).evalf()

0 comments on commit 6faefd0

Please sign in to comment.