TST: special: fix inf test to be compatible with old Numpy