Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
a09a8f6a
Commit
a09a8f6a
authored
Aug 09, 2013
by
Davis King
Browse files
Added more python doc strings
parent
9df06775
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
tools/python/src/basic.cpp
tools/python/src/basic.cpp
+3
-1
tools/python/src/matrix.cpp
tools/python/src/matrix.cpp
+2
-1
tools/python/src/sequence_segmenter.cpp
tools/python/src/sequence_segmenter.cpp
+4
-2
No files found.
tools/python/src/basic.cpp
View file @
a09a8f6a
...
...
@@ -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__
)
...
...
tools/python/src/matrix.cpp
View file @
a09a8f6a
...
...
@@ -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
))
...
...
tools/python/src/sequence_segmenter.cpp
View file @
a09a8f6a
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment