@@ -129,16 +129,18 @@ def test_pass_readonly_array():
129
129
130
130
def test_nonunit_stride_from_python ():
131
131
from pybind11_tests import (
132
- double_row , double_col , double_mat_cm , double_mat_rm ,
132
+ double_row , double_col , double_complex , double_mat_cm , double_mat_rm ,
133
133
double_threec , double_threer )
134
134
135
135
counting_mat = np .arange (9.0 , dtype = np .float32 ).reshape ((3 , 3 ))
136
136
second_row = counting_mat [1 , :]
137
137
second_col = counting_mat [:, 1 ]
138
138
np .testing .assert_array_equal (double_row (second_row ), 2.0 * second_row )
139
139
np .testing .assert_array_equal (double_col (second_row ), 2.0 * second_row )
140
+ np .testing .assert_array_equal (double_complex (second_row ), 2.0 * second_row )
140
141
np .testing .assert_array_equal (double_row (second_col ), 2.0 * second_col )
141
142
np .testing .assert_array_equal (double_col (second_col ), 2.0 * second_col )
143
+ np .testing .assert_array_equal (double_complex (second_col ), 2.0 * second_col )
142
144
143
145
counting_3d = np .arange (27.0 , dtype = np .float32 ).reshape ((3 , 3 , 3 ))
144
146
slices = [counting_3d [0 , :, :], counting_3d [:, 0 , :], counting_3d [:, :, 0 ]]
@@ -564,14 +566,17 @@ def test_special_matrix_objects():
564
566
565
567
566
568
def test_dense_signature (doc ):
567
- from pybind11_tests import double_col , double_row , double_mat_rm
569
+ from pybind11_tests import double_col , double_row , double_complex , double_mat_rm
568
570
569
571
assert doc (double_col ) == """
570
572
double_col(arg0: numpy.ndarray[float32[m, 1]]) -> numpy.ndarray[float32[m, 1]]
571
573
"""
572
574
assert doc (double_row ) == """
573
575
double_row(arg0: numpy.ndarray[float32[1, n]]) -> numpy.ndarray[float32[1, n]]
574
576
"""
577
+ assert doc (double_complex ) == """
578
+ double_complex(arg0: numpy.ndarray[complex64[m, 1]]) -> numpy.ndarray[complex64[m, 1]]
579
+ """
575
580
assert doc (double_mat_rm ) == """
576
581
double_mat_rm(arg0: numpy.ndarray[float32[m, n]]) -> numpy.ndarray[float32[m, n]]
577
582
"""
0 commit comments