μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Functions | Variables
test_eigen_tensor Namespace Reference

Functions

def cleanup ()
 
def test_import_avoid_stl_array ()
 
def assert_equal_tensor_ref (mat, writeable=True, modified=None)
 
def test_reference_internal (m, member_name)
 
def test_convert_tensor_to_py (m, func_name)
 
def test_bad_cpp_to_python_casts (m)
 
def test_bad_python_to_cpp_casts (m)
 
def test_references_actually_refer (m)
 
def test_round_trip (m)
 
def test_round_trip_references_actually_refer (m)
 
def test_doc_string (m, doc)
 

Variables

 np = pytest.importorskip("numpy")
 
 eigen_tensor = pytest.importorskip("pybind11_tests.eigen_tensor")
 
list submodules = [eigen_tensor.c_style, eigen_tensor.f_style]
 
 tensor_ref = np.empty((3, 5, 2), dtype=np.int64)
 
tuple indices = (2, 3, 1)
 
list assert_equal_funcs
 
list assert_equal_const_funcs
 

Function Documentation

◆ assert_equal_tensor_ref()

def test_eigen_tensor.assert_equal_tensor_ref (   mat,
  writeable = True,
  modified = None 
)

◆ cleanup()

def test_eigen_tensor.cleanup ( )

Definition at line 34 of file test_eigen_tensor.py.

◆ test_bad_cpp_to_python_casts()

def test_eigen_tensor.test_bad_cpp_to_python_casts (   m)

Definition at line 109 of file test_eigen_tensor.py.

◆ test_bad_python_to_cpp_casts()

def test_eigen_tensor.test_bad_python_to_cpp_casts (   m)

Definition at line 131 of file test_eigen_tensor.py.

References assert_equal_tensor_ref().

◆ test_convert_tensor_to_py()

def test_eigen_tensor.test_convert_tensor_to_py (   m,
  func_name 
)

Definition at line 103 of file test_eigen_tensor.py.

References assert_equal_tensor_ref(), and getattr().

◆ test_doc_string()

def test_eigen_tensor.test_doc_string (   m,
  doc 
)

Definition at line 269 of file test_eigen_tensor.py.

◆ test_import_avoid_stl_array()

def test_eigen_tensor.test_import_avoid_stl_array ( )

Definition at line 44 of file test_eigen_tensor.py.

References len().

◆ test_reference_internal()

def test_eigen_tensor.test_reference_internal (   m,
  member_name 
)

Definition at line 61 of file test_eigen_tensor.py.

References assert_equal_tensor_ref(), getattr(), and hasattr().

◆ test_references_actually_refer()

def test_eigen_tensor.test_references_actually_refer (   m)

Definition at line 193 of file test_eigen_tensor.py.

References assert_equal_tensor_ref().

◆ test_round_trip()

def test_eigen_tensor.test_round_trip (   m)

Definition at line 209 of file test_eigen_tensor.py.

References assert_equal_tensor_ref().

◆ test_round_trip_references_actually_refer()

def test_eigen_tensor.test_round_trip_references_actually_refer (   m)

Definition at line 257 of file test_eigen_tensor.py.

References assert_equal_tensor_ref().

Variable Documentation

◆ assert_equal_const_funcs

list test_eigen_tensor.assert_equal_const_funcs
Initial value:
1= [
2 "reference_view_of_tensor_v2",
3 "reference_view_of_tensor_v4",
4 "reference_view_of_tensor_v6",
5 "reference_const_tensor",
6 "reference_const_tensor_v2",
7]

Definition at line 92 of file test_eigen_tensor.py.

◆ assert_equal_funcs

list test_eigen_tensor.assert_equal_funcs
Initial value:
1= [
2 "copy_tensor",
3 "copy_fixed_tensor",
4 "copy_const_tensor",
5 "move_tensor_copy",
6 "move_fixed_tensor_copy",
7 "take_tensor",
8 "take_fixed_tensor",
9 "reference_tensor",
10 "reference_tensor_v2",
11 "reference_fixed_tensor",
12 "reference_view_of_tensor",
13 "reference_view_of_tensor_v3",
14 "reference_view_of_tensor_v5",
15 "reference_view_of_fixed_tensor",
16]

Definition at line 75 of file test_eigen_tensor.py.

◆ eigen_tensor

test_eigen_tensor.eigen_tensor = pytest.importorskip("pybind11_tests.eigen_tensor")

Definition at line 6 of file test_eigen_tensor.py.

◆ indices

tuple test_eigen_tensor.indices = (2, 3, 1)

Definition at line 30 of file test_eigen_tensor.py.

◆ np

test_eigen_tensor.np = pytest.importorskip("numpy")

Definition at line 5 of file test_eigen_tensor.py.

◆ submodules

list test_eigen_tensor.submodules = [eigen_tensor.c_style, eigen_tensor.f_style]

Definition at line 7 of file test_eigen_tensor.py.

◆ tensor_ref

test_eigen_tensor.tensor_ref = np.empty((3, 5, 2), dtype=np.int64)

Definition at line 23 of file test_eigen_tensor.py.