Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
decade-afk committed Oct 4, 2024
1 parent 7f7045f commit 9fb3c04
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/test_distributions_chi2_Chi2.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,37 +23,37 @@ def test_case_1():
pytorch_code = textwrap.dedent(
"""
import torch
normal_dist = torch.tensor([[1, 2], [3, 4]])
result = torch.distributions.chi2.Chi2(normal_dist).sample()
x = torch.tensor([1.0])
result = torch.distributions.chi2.Chi2(x).sample()
"""
)
obj.run(
pytorch_code,
["result"]
["result"], check_value=False
)

def test_case_2():
pytorch_code = textwrap.dedent(
"""
import torch
normal_dist = torch.tensor([[1, 2], [3, 4]])
result = torch.distributions.chi2.Chi2(df=normal_dist).sample()
x = torch.tensor([1.0])
result = torch.distributions.chi2.Chi2(df=x).sample()
"""
)
obj.run(
pytorch_code,
["result"]
["result"], check_value=False
)

def test_case_3():
pytorch_code = textwrap.dedent(
"""
import torch
normal_dist = torch.tensor([[1, 2], [3, 4]])
result = torch.distributions.chi2.Chi2(df=normal_dist, validate_args=None).sample()
x = torch.tensor([1.0])
result = torch.distributions.chi2.Chi2(df=x, validate_args=None).sample()
"""
)
obj.run(
pytorch_code,
["result"]
["result"], check_value=False
)

0 comments on commit 9fb3c04

Please sign in to comment.