Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
ced9f6f4
Commit
ced9f6f4
authored
Dec 20, 2017
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the global optimizer work in python3
parent
affaead6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
global_optimization.cpp
tools/python/src/global_optimization.cpp
+4
-1
No files found.
tools/python/src/global_optimization.cpp
View file @
ced9f6f4
...
...
@@ -49,7 +49,10 @@ boost::python::list mat_to_list (
size_t
num_function_arguments
(
object
f
)
{
return
boost
::
python
::
extract
<
std
::
size_t
>
(
f
.
attr
(
"func_code"
).
attr
(
"co_argcount"
));
if
(
hasattr
(
f
,
"func_code"
))
return
boost
::
python
::
extract
<
std
::
size_t
>
(
f
.
attr
(
"func_code"
).
attr
(
"co_argcount"
));
else
return
boost
::
python
::
extract
<
std
::
size_t
>
(
f
.
attr
(
"__code__"
).
attr
(
"co_argcount"
));
}
double
call_func
(
object
f
,
const
matrix
<
double
,
0
,
1
>&
args
)
...
...
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