Skip to content

Commit aecaf62

Browse files
committed
XFAIL TypedList global constant
1 parent 19a2397 commit aecaf62

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/typed_list/test_rewriting.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import numpy as np
2+
import pytest
23

34
import pytensor
45
import pytensor.tensor as pt
56
import pytensor.typed_list
7+
from pytensor.compile import get_default_mode
68
from pytensor.compile.io import In
9+
from pytensor.link.numba import NumbaLinker
710
from pytensor.tensor.type import TensorType, matrix, scalar
811
from pytensor.typed_list.basic import Append, Extend, Insert, Remove, Reverse
912
from pytensor.typed_list.type import TypedListType
@@ -146,6 +149,10 @@ def test_remove_inplace(self):
146149
assert np.array_equal(f([x, y], y), [x])
147150

148151

152+
@pytest.mark.xfail(
153+
condition=isinstance(get_default_mode().linker, NumbaLinker),
154+
reason="Numba does not supported lists as a global constant: https://github.com/numba/numba/issues/10355",
155+
)
149156
def test_constant_folding():
150157
m = pt.ones((1,), dtype="int8")
151158
l = pytensor.typed_list.make_list([m, m])

0 commit comments

Comments
 (0)