File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
python/paddle/distribution Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1111# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212# See the License for the specific language governing permissions and
1313# limitations under the License.
14+
15+ from __future__ import annotations
16+
17+ from typing import TYPE_CHECKING
18+
1419import paddle
1520from paddle .base .data_feeder import check_type , convert_dtype
1621from paddle .base .framework import Variable
1722from paddle .distribution .gamma import Gamma
1823from paddle .framework import in_dynamic_mode
1924
25+ if TYPE_CHECKING :
26+ from paddle import Tensor , dtype
27+
2028__all__ = ["Chi2" ]
2129
2230
@@ -39,7 +47,11 @@ class Chi2(Gamma):
3947
4048 """
4149
42- def __init__ (self , df ):
50+ df : Tensor
51+ rate : Tensor
52+ dtype : dtype
53+
54+ def __init__ (self , df : float | Tensor ) -> None :
4355 if not in_dynamic_mode ():
4456 check_type (
4557 df ,
You can’t perform that action at this time.
0 commit comments