99from pytensor .compile .sharedvalue import shared
1010from pytensor .configdefaults import config
1111from pytensor .graph .utils import MissingInputError
12- from pytensor .npy_2_compat import UintOverflowError
1312from pytensor .tensor .math import sum as pt_sum
1413from pytensor .tensor .type import (
1514 bscalar ,
@@ -239,11 +238,11 @@ def test_param_allow_downcast_int(self):
239238 assert np .all (f ([2 ** 20 ], np .ones (1 , dtype = "int8" ), 1 ) == 2 )
240239
241240 # Value too big for b, raises OverflowError in numpy >= 2.0, TypeError in numpy <2.0
242- with pytest .raises (UintOverflowError ):
241+ with pytest .raises (OverflowError ):
243242 f ([3 ], [312 ], 1 )
244243
245244 # Value too big for c, raises OverflowError in numpy >= 2.0, TypeError in numpy <2.0
246- with pytest .raises (UintOverflowError ):
245+ with pytest .raises (OverflowError ):
247246 f ([3 ], [6 ], 806 )
248247
249248 def test_param_allow_downcast_floatX (self ):
@@ -329,7 +328,7 @@ def test_allow_input_downcast_int(self):
329328 g ([3 ], np .array ([6 ], dtype = "int16" ), 0 )
330329
331330 # Value too big for b, raises OverflowError in numpy >= 2.0, TypeError in numpy <2.0
332- with pytest .raises (UintOverflowError ):
331+ with pytest .raises (OverflowError ):
333332 g ([3 ], [312 ], 0 )
334333
335334 h = pfunc ([a , b , c ], (a + b + c )) # Default: allow_input_downcast=None
@@ -340,7 +339,7 @@ def test_allow_input_downcast_int(self):
340339 h ([3 ], np .array ([6 ], dtype = "int16" ), 0 )
341340
342341 # Value too big for b, raises OverflowError in numpy >= 2.0, TypeError in numpy <2.0
343- with pytest .raises (UintOverflowError ):
342+ with pytest .raises (OverflowError ):
344343 h ([3 ], [312 ], 0 )
345344
346345 def test_allow_downcast_floatX (self ):
0 commit comments