

def test_stable(self):
    a = array(([10000.0] + ([1] * 10000)), dtype=float32)
    try:
        assert_allclose((norm(a) - 10000.0), 0.5, atol=0.01)
    except AssertionError:
        msg = ': Result should equal either 0.0 or 0.5 (depending on implementation of snrm2).'
        assert_almost_equal((norm(a) - 10000.0), 0.0, err_msg=msg)

dataset/ETHPy150Open scipy/scipy/scipy/linalg/tests/test_basic.py TestVectorNorms.test_stable/original