Skip to content

Commit 965534a

Browse files
committed
Fix test failures due to changes in numpy API
1 parent 3ae5095 commit 965534a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/logprob/test_transforms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ class TestLocScaleRVTransform:
249249
@pytest.mark.parametrize(
250250
"rv_size, loc_type, addition",
251251
[
252-
(None, pt.scalar, True),
252+
((), pt.scalar, True),
253253
(2, pt.vector, False),
254254
((2, 1), pt.col, True),
255255
],

tests/test_pytensorf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
)
6161
def test_pd_dataframe_as_tensor_variable(np_array: np.ndarray) -> None:
6262
df = pd.DataFrame(np_array)
63-
np.testing.assert_array_equal(x=pt.as_tensor_variable(x=df).eval(), y=np_array)
63+
np.testing.assert_array_equal(pt.as_tensor_variable(df).eval(), np_array)
6464

6565

6666
@pytest.mark.parametrize(
@@ -69,7 +69,7 @@ def test_pd_dataframe_as_tensor_variable(np_array: np.ndarray) -> None:
6969
)
7070
def test_pd_series_as_tensor_variable(np_array: np.ndarray) -> None:
7171
df = pd.Series(np_array)
72-
np.testing.assert_array_equal(x=pt.as_tensor_variable(x=df).eval(), y=np_array)
72+
np.testing.assert_array_equal(pt.as_tensor_variable(df).eval(), np_array)
7373

7474

7575
def test_pd_as_tensor_variable_multiindex() -> None:
@@ -80,7 +80,7 @@ def test_pd_as_tensor_variable_multiindex() -> None:
8080
df = pd.DataFrame({"A": [12.0, 80.0, 30.0, 20.0], "B": [120.0, 700.0, 30.0, 20.0]}, index=index)
8181
np_array = np.array([[12.0, 80.0, 30.0, 20.0], [120.0, 700.0, 30.0, 20.0]]).T
8282
assert isinstance(df.index, pd.MultiIndex)
83-
np.testing.assert_array_equal(x=pt.as_tensor_variable(x=df).eval(), y=np_array)
83+
np.testing.assert_array_equal(pt.as_tensor_variable(df).eval(), np_array)
8484

8585

8686
class TestBroadcasting:

0 commit comments

Comments
 (0)