Skip to content

Commit 3e38169

Browse files
committed
Set rows and cols in exposeMatrixQ with def and not prop
1 parent c9a1abe commit 3e38169

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/nanoeigenpy/decompositions/sparse/sparse-qr.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ void exposeMatrixQ(nb::module_ m) {
4343
nb::class_<QType>(m, "SparseQRMatrixQReturnType")
4444
.def(nb::init<const SparseQRType&>(), "qr"_a)
4545

46-
.def_prop_ro("rows", &QType::rows)
47-
.def_prop_ro("cols", &QType::cols)
46+
.def("rows", &QType::rows)
47+
.def("cols", &QType::cols)
4848

4949
.def(
5050
"__matmul__",

tests/test_sparse_qr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
R = spqr.matrixR()
4141
P = spqr.colsPermutation()
4242

43-
assert spqr.matrixQ().rows == dim
44-
assert spqr.matrixQ().cols == dim
43+
assert spqr.matrixQ().rows() == dim
44+
assert spqr.matrixQ().cols() == dim
4545
assert R.shape[0] == dim
4646
assert R.shape[1] == dim
4747
assert P.indices().size == dim

0 commit comments

Comments
 (0)