Skip to content

Commit 3d8f00a

Browse files
committed
Xfail sparse test on numba
1 parent f373ac3 commit 3d8f00a

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

tests/test_splines.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,29 @@
1717
import pytensor.tensor as pt
1818
import pytest
1919

20+
from numba import TypingError
21+
from pytensor.compile import get_default_mode
22+
from pytensor.link.numba import NumbaLinker
2023
from pytensor.sparse import SparseTensorType
2124

2225
import pymc_extras as pmx
2326

2427

2528
@pytest.mark.parametrize("dtype", [np.float32, np.float64])
26-
@pytest.mark.parametrize("sparse", [True, False])
29+
@pytest.mark.parametrize(
30+
"sparse",
31+
[
32+
pytest.param(
33+
True,
34+
marks=pytest.mark.xfail(
35+
condition=isinstance(get_default_mode().linker, NumbaLinker),
36+
reason="numba backend does not yet support sparse variables",
37+
raises=TypingError,
38+
),
39+
),
40+
False,
41+
],
42+
)
2743
def test_spline_construction(dtype, sparse):
2844
x = np.linspace(0, 1, 20, dtype=dtype)
2945
np_out = pmx.utils.spline.numpy_bspline_basis(x, 10, 3)

0 commit comments

Comments
 (0)