debug
This commit is contained in:
parent
37d164e7b4
commit
0ea089203c
|
@ -174,6 +174,12 @@ void init_numpy() {
|
||||||
BOOST_PYTHON_MODULE(rtc_plugins) {
|
BOOST_PYTHON_MODULE(rtc_plugins) {
|
||||||
try {
|
try {
|
||||||
init_numpy();
|
init_numpy();
|
||||||
|
void** numpy_api = (void**)PyArray_API;
|
||||||
|
if (!numpy_api || !numpy_api[93]) { // 93是PyArray_SimpleNew的偏移量
|
||||||
|
std::cout << "NumPy API corrupt! Key functions missing." << std::endl;
|
||||||
|
PyErr_Print();
|
||||||
|
throw std::runtime_error("Invalid NumPy API state");
|
||||||
|
}
|
||||||
|
|
||||||
if (!PyArray_API) {
|
if (!PyArray_API) {
|
||||||
std::cout << "PyArray_API is null" << std::endl;
|
std::cout << "PyArray_API is null" << std::endl;
|
||||||
|
|
Loading…
Reference in New Issue