Skip to content

Commit 9624b28

Browse files
committed
More debugging
1 parent 4f1936c commit 9624b28

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Libs/Optimize/Optimize.cpp

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,34 @@ bool Optimize::Run() {
9999
std::cerr << "Done calling py::initialize_interpreter\n";
100100

101101

102+
// Test if we can import the core numpy extension directly
103+
std::cerr << "Testing numpy core extension import...\n";
104+
try {
105+
py::exec("import numpy.core.multiarray");
106+
std::cerr << "numpy.core.multiarray import: SUCCESS\n";
107+
} catch (py::error_already_set &e) {
108+
std::cerr << "numpy.core.multiarray FAILED: " << e.what() << "\n";
109+
}
110+
111+
// Test if we can import numpy's _internal module
112+
std::cerr << "Testing numpy._internal import...\n";
113+
try {
114+
py::exec("import numpy._internal");
115+
std::cerr << "numpy._internal import: SUCCESS\n";
116+
} catch (py::error_already_set &e) {
117+
std::cerr << "numpy._internal FAILED: " << e.what() << "\n";
118+
}
119+
120+
// Test basic DLL loading capability
121+
std::cerr << "Testing basic extension import...\n";
122+
try {
123+
py::exec("import _ctypes"); // This is a built-in extension
124+
std::cerr << "_ctypes import: SUCCESS\n";
125+
} catch (py::error_already_set &e) {
126+
std::cerr << "_ctypes FAILED: " << e.what() << "\n";
127+
}
128+
129+
102130
// Test the actual failing import to get the real error
103131
std::cerr << "Testing numpy.__config__ import directly...\n";
104132
try {

0 commit comments

Comments
 (0)