

@dec.skipif((NumpyVersion(np.__version__) < '1.8.0'))
def test_axis_kwd(self):
    a = np.array(([[[2, 1], [3, 4]]] * 2), 'd')
    b = norm(a, ord=np.inf, axis=(1, 0))
    c = norm(np.swapaxes(a, 0, 1), ord=np.inf, axis=(0, 1))
    d = norm(a, ord=1, axis=(0, 1))
    assert_allclose(b, c)
    assert_allclose(c, d)
    assert_allclose(b, d)
    assert_((b.shape == c.shape == d.shape))
    b = norm(a, ord=1, axis=(1, 0))
    c = norm(np.swapaxes(a, 0, 1), ord=1, axis=(0, 1))
    d = norm(a, ord=np.inf, axis=(0, 1))
    assert_allclose(b, c)
    assert_allclose(c, d)
    assert_allclose(b, d)
    assert_((b.shape == c.shape == d.shape))

dataset/ETHPy150Open scipy/scipy/scipy/linalg/tests/test_basic.py TestMatrixNorms.test_axis_kwd/original