diff --git a/src/storage/matrix.cpp b/src/storage/matrix.cpp index b0e06da..9152157 100644 --- a/src/storage/matrix.cpp +++ b/src/storage/matrix.cpp @@ -37,6 +37,7 @@ void define_sparse_matrix(py::module& m) { .def_property_readonly("nr_columns", &SparseMatrix::getColumnCount, "Number of columns") .def_property_readonly("nr_entries", &SparseMatrix::getEntryCount, "Number of non-zero entries") .def_property_readonly("_row_group_indices", &SparseMatrix::getRowGroupIndices, "Starting rows of row groups") + .def_property_readonly("has_trivial_row_grouping", &SparseMatrix::hasTrivialRowGrouping, "Trivial row grouping") .def("get_row", [](SparseMatrix& matrix, entry_index row) { return matrix.getRows(row, row+1); }, py::return_value_policy::reference, py::keep_alive<1, 0>(), py::arg("row"), "Get row") @@ -82,6 +83,7 @@ void define_sparse_matrix(py::module& m) { .def_property_readonly("nr_columns", &SparseMatrix::getColumnCount, "Number of columns") .def_property_readonly("nr_entries", &SparseMatrix::getEntryCount, "Number of non-zero entries") .def_property_readonly("_row_group_indices", &SparseMatrix::getRowGroupIndices, "Starting rows of row groups") + .def_property_readonly("has_trivial_row_grouping", &SparseMatrix::hasTrivialRowGrouping, "Trivial row grouping") .def("get_row", [](SparseMatrix& matrix, entry_index row) { return matrix.getRows(row, row+1); }, py::return_value_policy::reference, py::keep_alive<1, 0>(), py::arg("row"), "Get row")