Skip to content

Commit

Permalink
[Typing][B-26,B-27] Add type annotations for `python/paddle/distribut…
Browse files Browse the repository at this point in the history
…ion/{transform,transformed_distribution}.py` (PaddlePaddle#65912)


---------

Co-authored-by: SigureMo <sigure.qaq@gmail.com>
  • Loading branch information
2 people authored and lixcli committed Jul 22, 2024
1 parent b022ab4 commit 869858e
Show file tree
Hide file tree
Showing 3 changed files with 160 additions and 116 deletions.
2 changes: 1 addition & 1 deletion python/paddle/distribution/constraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __call__(self, value: Tensor) -> Tensor:


class Range(Constraint):
def __init__(self, lower: Tensor, upper: Tensor) -> None:
def __init__(self, lower: float | Tensor, upper: float | Tensor) -> None:
self._lower = lower
self._upper = upper
super().__init__()
Expand Down
Loading

0 comments on commit 869858e

Please sign in to comment.