diff --git a/tools/python/src/basic.cpp b/tools/python/src/basic.cpp index 88a6c3e63..84e10a15a 100644 --- a/tools/python/src/basic.cpp +++ b/tools/python/src/basic.cpp @@ -145,7 +145,9 @@ void resize(T& v, unsigned long n) { v.resize(n); } void bind_basic_types() { - class_ >("array", init<>()) + class_ >("array", "This object represents a 1D array of floating point numbers. " + "Moreover, it binds directly to the C++ type std::vector.", init<>() + ) .def(vector_indexing_suite >()) .def("__init__", make_constructor(&array_from_object)) .def("__str__", array__str__) diff --git a/tools/python/src/matrix.cpp b/tools/python/src/matrix.cpp index 441035d90..9fbbb0f29 100644 --- a/tools/python/src/matrix.cpp +++ b/tools/python/src/matrix.cpp @@ -193,7 +193,8 @@ void bind_matrix() .def("__setitem__", &mat_row__setitem__) .def("__getitem__", &mat_row__getitem__); - class_ >("matrix", init<>()) + class_ >("matrix", "This object represents a dense 2D matrix of floating point numbers." + "Moreover, it binds directly to the C++ type dlib::matrix.", init<>()) .def("__init__", make_constructor(&make_matrix_from_size)) .def("set_size", &matrix_set_size, (arg("rows"), arg("cols")), "Set the size of the matrix to the given number of rows and columns.") .def("__init__", make_constructor(&from_object)) diff --git a/tools/python/src/sequence_segmenter.cpp b/tools/python/src/sequence_segmenter.cpp index fb0b968df..1b6b166e4 100644 --- a/tools/python/src/sequence_segmenter.cpp +++ b/tools/python/src/sequence_segmenter.cpp @@ -796,13 +796,15 @@ train_sequence_segmenter() and cross_validate_sequence_segmenter() routines. " .def("__str__",&segmenter_params__str__) .def_pickle(serialize_pickle()); - class_ ("segmenter_type") + class_ ("segmenter_type", "This object represents a sequence segmenter and is the type of object " + "returned by the dlib.train_sequence_segmenter() routine.") .def("__call__", &segmenter_type::segment_sequence_dense) .def("__call__", &segmenter_type::segment_sequence_sparse) .def_readonly("weights", &segmenter_type::get_weights) .def_pickle(serialize_pickle()); - class_ ("segmenter_test") + class_ ("segmenter_test", "This object is the output of the dlib.test_sequence_segmenter() and " + "dlib.cross_validate_sequence_segmenter() routines.") .def_readwrite("precision", &segmenter_test::precision) .def_readwrite("recall", &segmenter_test::recall) .def_readwrite("f1", &segmenter_test::f1)