BUG: np.inf**2 fails on python2.6; replace by np.inf*np.inf