mirror of https://github.com/davisking/dlib.git
Added more python doc strings
This commit is contained in:
parent
9df0677555
commit
a09a8f6a95
|
@ -145,7 +145,9 @@ void resize(T& v, unsigned long n) { v.resize(n); }
|
|||
|
||||
void bind_basic_types()
|
||||
{
|
||||
class_<std::vector<double> >("array", init<>())
|
||||
class_<std::vector<double> >("array", "This object represents a 1D array of floating point numbers. "
|
||||
"Moreover, it binds directly to the C++ type std::vector<double>.", init<>()
|
||||
)
|
||||
.def(vector_indexing_suite<std::vector<double> >())
|
||||
.def("__init__", make_constructor(&array_from_object))
|
||||
.def("__str__", array__str__)
|
||||
|
|
|
@ -193,7 +193,8 @@ void bind_matrix()
|
|||
.def("__setitem__", &mat_row__setitem__)
|
||||
.def("__getitem__", &mat_row__getitem__);
|
||||
|
||||
class_<matrix<double> >("matrix", init<>())
|
||||
class_<matrix<double> >("matrix", "This object represents a dense 2D matrix of floating point numbers."
|
||||
"Moreover, it binds directly to the C++ type dlib::matrix<double>.", 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))
|
||||
|
|
|
@ -796,13 +796,15 @@ train_sequence_segmenter() and cross_validate_sequence_segmenter() routines. "
|
|||
.def("__str__",&segmenter_params__str__)
|
||||
.def_pickle(serialize_pickle<segmenter_params>());
|
||||
|
||||
class_<segmenter_type> ("segmenter_type")
|
||||
class_<segmenter_type> ("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<segmenter_type>());
|
||||
|
||||
class_<segmenter_test> ("segmenter_test")
|
||||
class_<segmenter_test> ("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)
|
||||
|
|
Loading…
Reference in New Issue