Fixed simd warning message not working.

This commit is contained in:
Davis King 2018-01-16 19:23:08 -05:00
parent 15b8b54a59
commit 28f9111901
2 changed files with 3 additions and 2 deletions

View File

@ -32,6 +32,8 @@ void bind_gui(py::module& m);
PYBIND11_MODULE(dlib, m)
{
warn_about_unavailable_but_used_cpu_instructions();
// Disable printing of the C++ function signature in the python __doc__ string
// since it is full of huge amounts of template clutter.
py::options options;
@ -41,7 +43,6 @@ PYBIND11_MODULE(dlib, m)
#define DLIB_QUOTE_STRING2(x) #x
m.attr("__version__") = DLIB_QUOTE_STRING(DLIB_VERSION);
warn_about_unavailable_but_used_cpu_instructions();
bind_matrix(m);
bind_vector(m);

View File

@ -5,7 +5,6 @@
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <numpy/ndarrayobject.h>
dlib::rand rnd_jitter;
using namespace dlib;
using namespace std;
@ -16,6 +15,7 @@ namespace py = pybind11;
py::list get_jitter_images(py::object img, size_t num_jitters = 1, bool disturb_colors = false)
{
static dlib::rand rnd_jitter;
if (!is_rgb_python_image(img))
throw dlib::error("Unsupported image type, must be RGB image.");