Пример #1
0
def test_bug44():
    "Bug 44"
    # In instances where axis=None, the operation runs
    # on the flattened array. Here it makes sense to return
    # the op on the underlying np.ndarray.
    A = [[1,2,3],[4,5,6]]
    x = DataArray(A, 'xy').std()
    y = np.std(A)
    nt.assert_equal( x.sum(), y.sum() )
Пример #2
0
def test_bug44():
    "Bug 44"
    # In instances where axis=None, the operation runs
    # on the flattened array. Here it makes sense to return
    # the op on the underlying np.ndarray.
    A = [[1, 2, 3], [4, 5, 6]]
    x = DataArray(A, 'xy').std()
    y = np.std(A)
    nt.assert_equal(x.sum(), y.sum())
Пример #3
0
def test_bug3():
    "Bug 3"
    x = np.array([1,2,3])
    y = DataArray(x, 'x')
    nt.assert_equal( x.sum(), y.sum() )
    nt.assert_equal( x.max(), y.max() )
Пример #4
0
def test_bug3():
    "Bug 3"
    x = np.array([1, 2, 3])
    y = DataArray(x, 'x')
    nt.assert_equal(x.sum(), y.sum())
    nt.assert_equal(x.max(), y.max())