nan/inf handling is broken in older numpy in almost all assert_ functions. Better use `np.assert_(np.isinf(...))`