Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita6dc86a

Browse files
committed
FIX: log
1 parent2758e27 commita6dc86a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

‎numpy/_core/src/multiarray/unique.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ unique_vstring(PyArrayObject *self, bool equal_nan)
273273

274274
npy_intp length = hashset.size();
275275

276+
std::cerr <<"hashset size:" << length << std::endl;
276277
PyEval_RestoreThread(_save1);
277278
NPY_ALLOW_C_API;
278279
// NumPy API calls and Python object manipulations require holding the GIL.
@@ -287,23 +288,30 @@ unique_vstring(PyArrayObject *self, bool equal_nan)
287288
NPY_ARRAY_WRITEABLE,// flags
288289
NULL// obj
289290
);
290-
291+
std::cerr <<"res_obj:" << (void*)res_obj << std::endl;
291292
if (res_obj ==NULL) {
292293
returnNULL;
293294
}
295+
std::cerr <<"res_obj created successfully." << std::endl;
294296
PyArray_Descr *res_descr =PyArray_DESCR((PyArrayObject *)res_obj);
297+
std::cerr <<"res_descr:" << (void*)res_descr << std::endl;
295298
// NumPy API calls and Python object manipulations require holding the GIL.
296299
Py_INCREF(res_descr);
300+
std::cerr <<"res_descr incremented successfully." << std::endl;
297301
NPY_DISABLE_C_API;
298302
PyThreadState *_save2 =PyEval_SaveThread();
303+
std::cerr <<"save2:" << (void*)_save2 << std::endl;
299304
auto save2_dealloc =finally([&]() {
300305
PyEval_RestoreThread(_save2);
301306
});
307+
std::cerr <<"save2_dealloc completed successfully." << std::endl;
302308

303309
npy_string_allocator *out_allocator =NpyString_acquire_allocator((PyArray_StringDTypeObject *)res_descr);
310+
std::cerr <<"out_allocator:" << (void*)out_allocator << std::endl;
304311
auto out_allocator_dealloc =finally([&]() {
305312
NpyString_release_allocator(out_allocator);
306313
});
314+
std::cerr <<"out_allocator_dealloc completed successfully." << std::endl;
307315

308316
char *odata =PyArray_BYTES((PyArrayObject *)res_obj);
309317
npy_intp ostride =PyArray_STRIDES((PyArrayObject *)res_obj)[0];

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp