Exemplo n.º 1
0
def test_matrix_slice():
    a = numpy.ones((10, 10), dtype=float)

    dbl_0 = te.dbl_numpy_mat(a[3:7])
    assert dbl_0.shape == (4, 10)
    assert (dbl_0 == 2).all()

    try:
        dbl_0 = te.dbl_numpy_mat(a[:, 3:7])
        assert False
    except TypeError:
        pass
Exemplo n.º 2
0
def test_matrix_slice():
    a = numpy.ones((10, 10), dtype=float)

    dbl_0 = te.dbl_numpy_mat(a[3:7])
    assert dbl_0.shape == (4, 10)
    assert (dbl_0 == 2).all()

    try:
        dbl_0 = te.dbl_numpy_mat(a[:, 3:7])
        assert False
    except TypeError:
        pass
Exemplo n.º 3
0
def test_matrix():
    a = numpy.ones((10, 10), dtype=float)

    dbl_0 = te.dbl_numpy_mat(a)
    assert dbl_0.shape == (10, 10)
    assert (dbl_0 == 2).all()

    dbl_1 = te.dbl_ublas_mat(a)
    assert dbl_1.shape == (10, 10)
    assert (dbl_1 == 2).all()
Exemplo n.º 4
0
def test_matrix():
    a = numpy.ones((10, 10), dtype=float)

    dbl_0 = te.dbl_numpy_mat(a)
    assert dbl_0.shape == (10, 10)
    assert (dbl_0 == 2).all()

    dbl_1 = te.dbl_ublas_mat(a)
    assert dbl_1.shape == (10, 10)
    assert (dbl_1 == 2).all()