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 inaomIIsfarell committed Jul 31, 2024
1 parent 81bf297 commit 3f345de
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 3f345de

Please sign in to comment.