FIX: More robust test_extmath.py, compatible with older numpy