@@ -1412,30 +1412,34 @@ def _grad_list(self):
1412
1412
"uint8" ,
1413
1413
"uint16" ,
1414
1414
"uint32" ,
1415
- pytest . param ( "uint64" , marks = pytest . mark . xfail ( reason = "Fails due to #770" )) ,
1415
+ "uint64" ,
1416
1416
),
1417
1417
)
1418
1418
def test_uint (self , dtype ):
1419
1419
itype = np .iinfo (dtype )
1420
- data = np .array ([itype .min + 3 , itype .min , itype .max - 5 , itype .max ], dtype )
1421
- n = as_tensor_variable (data )
1420
+ data = np .array (
1421
+ [itype .min + 3 , itype .min , itype .max - 5 , itype .max ], dtype = dtype
1422
+ )
1423
+ n = vector ("n" , shape = (None ,), dtype = dtype )
1422
1424
1423
- assert min (n ).dtype == dtype
1424
- i_min = eval_outputs (min (n ))
1425
+ min_out = min (n )
1426
+ assert min_out .dtype == dtype
1427
+ i_min = function ([n ], min_out )(data )
1425
1428
assert i_min == itype .min
1426
1429
1427
- assert max (n ).dtype == dtype
1428
- i_max = eval_outputs (max (n ))
1430
+ max_out = max (n )
1431
+ assert max_out .dtype == dtype
1432
+ i_max = function ([n ], max_out )(data )
1429
1433
assert i_max == itype .max
1430
1434
1431
1435
@pytest .mark .xfail (reason = "Fails due to #770" )
1432
1436
def test_uint64_special_value (self ):
1433
1437
"""Example from issue #770"""
1434
1438
dtype = "uint64"
1435
1439
data = np .array ([0 , 9223372036854775 ], dtype = dtype )
1436
- n = as_tensor_variable ( data )
1440
+ n = vector ( "n" , shape = ( None ,), dtype = dtype )
1437
1441
1438
- i_max = eval_outputs ( max (n ))
1442
+ i_max = function ([ n ], max (n ))( data )
1439
1443
assert i_max == data .max ()
1440
1444
1441
1445
def test_bool (self ):
0 commit comments