File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 1717import pytensor .tensor as pt
1818import pytest
1919
20+ from numba import TypingError
21+ from pytensor .compile import get_default_mode
22+ from pytensor .link .numba import NumbaLinker
2023from pytensor .sparse import SparseTensorType
2124
2225import 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+ )
2743def 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 )
You can’t perform that action at this time.
0 commit comments