Skip to content

Commit

Permalink
Stringify annotations using optional dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mschmidt87 committed May 25, 2020
1 parent d352f84 commit 52530da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gp/cartesian_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def _f(x):

def to_torch(
self, parameter_names_to_values: Optional[Dict[str, float]] = None
) -> torch.nn.Module:
) -> "torch.nn.Module":
"""Compile the function(s) represented by the graph to a Torch class.
Generates a definition of the Torch class in Python code and
Expand Down Expand Up @@ -370,7 +370,7 @@ def to_sympy(
self,
simplify: Optional[bool] = True,
parameter_names_to_values: Optional[Dict[str, float]] = None,
) -> List[sympy_expr.Expr]:
) -> List["sympy_expr.Expr"]:
"""Compile the function(s) represented by the graph to a SymPy expression.
Generates one SymPy expression for each output node.
Expand Down

0 comments on commit 52530da

Please sign in to comment.