Stefan Behnel added the comment: Agreed that it's not a bug in CPython, but my guess is that it's not a bug in NumPy either. The C function you call (which IIRC creates a new NumPy array) almost certainly needs the GIL to protect it against race conditions, and since you mentioned OpenMP, you most likely released the GIL. So, just re-acquire the GIL around the call (and make sure you don't have any other threading problems in your code).
---------- nosy: +scoder _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22373> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com