This commit is contained in:
wangjiyu 2025-04-16 17:46:00 +08:00
parent df30aa53c9
commit 0bee448294
1 changed files with 1 additions and 1 deletions

View File

@ -712,7 +712,7 @@ np::ndarray RTCContext::getNumpydata() {
std::cout << "step4" << std::endl;
PyGILState_STATE gstate = PyGILState_Ensure();
np::ndarray result;
np::ndarray result = np::empty(bp::make_tuple(length), np::dtype::get_builtin<int16_t>());
try {
if (!data_ptr || length == 0) {
result = np::zeros(bp::make_tuple(0), np::dtype::get_builtin<int16_t>());