def isfinite(a): '''Return true if a is not infinite and not a NaN, itemwise''' return _cmps.isFinite(a)