MCPcopy Create free account
hub / github.com/wjakob/nanobind / test27c_python_complex_array

Function test27c_python_complex_array

tests/test_ndarray.py:741–753  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

739
740
741def test27c_python_complex_array():
742 import array
743 try:
744 a = array.array('Zf', [1.0+2.0j, 3.0+4.0j])
745 except:
746 pytest.skip('your python does not support complex arrays')
747 assert t.check(a)
748 t.pass_complex64(a)
749 mv = memoryview(a)
750 assert t.check(mv)
751 t.pass_complex64(mv)
752 x = t.passthrough(a)
753 assert x is a
754
755
756def test28_check_bytearray():

Callers

nothing calls this directly

Calls 1

memoryviewClass · 0.85

Tested by

no test coverage detected