Skip to content

Commit

Permalink
add 2d cutpoints and positive sigma
Browse files Browse the repository at this point in the history
  • Loading branch information
danhphan committed Feb 5, 2022
1 parent 466a941 commit 9b311bf
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions pymc/tests/test_distributions_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,9 @@ class TestOrderedLogistic(BaseTestDistributionRandom):
(0, [-2.0, 0, 2.0], (4,)),
([-1], [-2.0, 0, 2.0], (1, 4)),
([1.0, -2.0], [-1.0, 0, 1.0], (2, 4)),
([[1.0, -1.0, 0.0], [-1.0, 3.0, 5.0]], [-2.0, 0, 1.0], (2, 3, 4)),
(np.zeros((3, 2)), [-2.0, 0, 1.0], (3, 2, 4)),
(np.ones((5, 2)), [[-2.0, 0, 1.0], [-1.0, 0, 1.0]], (5, 2, 4)),
(np.ones((3, 5, 2)), [[-2.0, 0, 1.0], [-1.0, 0, 1.0]], (3, 5, 2, 4)),
],
)
def test_shape_inputs(self, eta, cutpoints, expected):
Expand Down Expand Up @@ -1722,16 +1724,12 @@ class TestOrderedProbit(BaseTestDistributionRandom):
"eta, cutpoints, sigma, expected",
[
(0, [-2.0, 0, 2.0], 1.0, (4,)),
([-1], [-2.0, 0, 2.0], [2.0], (1, 4)),
([-1], [-1.0, 0, 2.0], [2.0], (1, 4)),
([1.0, -2.0], [-1.0, 0, 1.0], 1.0, (2, 4)),
([1.0, -2.0, 3.0], [-2.0, 0, 2.0], [-1.0, -2.0, 5.0], (3, 4)),
([[1.0, -1.0, 0.0], [-1.0, 3.0, 5.0]], [-2.0, 0, 1.0], [-1.0, -2.0, 5.0], (2, 3, 4)),
(
[[1.0, -2.0, 3.0], [1.0, 2.0, -4.0]],
[-2.0, 0, 1.0],
[[0.0, 2.0, -4.0], [-1.0, 1.0, 3.0]],
(2, 3, 4),
),
([1.0, -2.0, 3.0], [-1.0, 0, 2.0], np.ones((1, 3)), (1, 3, 4)),
(np.zeros((2, 3)), [-2.0, 0, 1.0], [1.0, 2.0, 5.0], (2, 3, 4)),
(np.ones((2, 3)), [-1.0, 0, 1.0], np.ones((2, 3)), (2, 3, 4)),
(np.zeros((5, 2)), [[-2, 0, 1], [-1, 0, 1]], np.ones((2, 5, 2)), (2, 5, 2, 4)),
],
)
def test_shape_inputs(self, eta, cutpoints, sigma, expected):
Expand Down

0 comments on commit 9b311bf

Please sign in to comment.