diff --git a/matplotlibcpp.h b/matplotlibcpp.h index 67700740..552a8653 100644 --- a/matplotlibcpp.h +++ b/matplotlibcpp.h @@ -152,6 +152,10 @@ struct _interpreter { #endif Py_SetProgramName(name); Py_Initialize(); + + wchar_t* args[1]; + args[0] = Py_DecodeLocale("", NULL); + PySys_SetArgv(0, args); #ifndef WITHOUT_NUMPY import_numpy(); // initialize numpy C-API @@ -312,9 +316,9 @@ template <> struct select_npy_type { const static NPY_TYPES type = NPY // Sanity checks; comment them out or change the numpy type below if you're compiling on // a platform where they don't apply -static_assert(sizeof(long long) == 8); +static_assert(sizeof(long long) == 8, "sizeof(long long) must be equal to 8."); template <> struct select_npy_type { const static NPY_TYPES type = NPY_INT64; }; -static_assert(sizeof(unsigned long long) == 8); +static_assert(sizeof(unsigned long long) == 8, "sizeof(unsigned long long) must be equal to 8."); template <> struct select_npy_type { const static NPY_TYPES type = NPY_UINT64; }; // TODO: add int, long, etc.