diff --git a/util/RTCContext.h b/util/RTCContext.h index de7fa89..cedae0c 100644 --- a/util/RTCContext.h +++ b/util/RTCContext.h @@ -60,25 +60,7 @@ public: static RTCContext instance; return instance; } - static void** numpy_api() { - static void** api = [](){ - // 强制初始化NumPy - if (_import_array() < 0) { - PyErr_Print(); - throw std::runtime_error("NumPy initialization failed"); - } - void** ptr = reinterpret_cast(RTC_PLUGINS_ARRAY_API); - std::cout << "ptr:" << ptr << std::endl; - if (!ptr || !ptr[93]) { - std::cerr << "NumPy API corrupt! Expected at 93: " - << (ptr ? (void*)ptr[93] : nullptr) << std::endl; - abort(); - } - return ptr; - }(); - return api; - } RTCContext(const RTCContext&) = delete; RTCContext& operator=(const RTCContext&) = delete; mrtc::IMRTCEngine* getRtcEngine() const;