Commit 7b38ea6f authored by Davis King's avatar Davis King

Numpy's import_array() macro in python3 requires the calling function to return

void*.  But the previous code didn't so it wouldn't compile.  Fixed that
problem.
parent b096bddc
......@@ -21,7 +21,7 @@ void bind_correlation_tracker();
void bind_face_recognition();
void bind_cnn_face_detection();
void bind_global_optimization();
void bind_numpy_returns();
void* bind_numpy_returns();
#ifndef DLIB_NO_GUI_SUPPORT
void bind_gui();
......
......@@ -125,7 +125,7 @@ BOOST_PYTHON_FUNCTION_OVERLOADS(get_face_chips_with_defaults, get_face_chips, 2,
// ----------------------------------------------------------------------------------------
void bind_numpy_returns()
void* bind_numpy_returns()
{
using boost::python::arg;
import_array();
......@@ -146,4 +146,6 @@ void bind_numpy_returns()
"Takes an image and a full_object_detections object that reference faces in that image and returns the faces as a list of Numpy arrays representing the image. The faces will be rotated upright and scaled to 150x150 pixels or with the optional specified size and padding.",
(arg("img"), arg("faces"), arg("size"), arg("padding"))
));
}
\ No newline at end of file
return 0;
}
......@@ -44,7 +44,7 @@ BOOST_PYTHON_FUNCTION_OVERLOADS(get_face_chips_with_defaults, get_face_chips, 2,
// ----------------------------------------------------------------------------------------
void bind_numpy_returns()
void* bind_numpy_returns()
{
using boost::python::arg;
......@@ -64,4 +64,6 @@ void bind_numpy_returns()
"Takes an image and a full_object_detections object that reference faces in that image and returns the faces as a list of Numpy arrays representing the image. The faces will be rotated upright and scaled to 150x150 pixels or with the optional specified size and padding.",
(arg("img"), arg("faces"), arg("size"), arg("padding"))
));
}
\ No newline at end of file
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment