Esempio n. 1
0
def test_make_c_f_array():
    from pybind11_tests.array import make_c_array, make_f_array

    assert make_c_array().flags.c_contiguous
    assert not make_c_array().flags.f_contiguous
    assert make_f_array().flags.f_contiguous
    assert not make_f_array().flags.c_contiguous
def test_make_c_f_array():
    from pybind11_tests.array import (
        make_c_array, make_f_array
    )
    assert make_c_array().flags.c_contiguous
    assert not make_c_array().flags.f_contiguous
    assert make_f_array().flags.f_contiguous
    assert not make_f_array().flags.c_contiguous
Esempio n. 3
0
def test_make_c_f_array():
    from pybind11_tests.array import (make_c_array, make_f_array)
    if not make_c_array().flags.c_contiguous:
        raise AssertionError
    if make_c_array().flags.f_contiguous:
        raise AssertionError
    if not make_f_array().flags.f_contiguous:
        raise AssertionError
    if make_f_array().flags.c_contiguous:
        raise AssertionError