`nogil`'s Strict Python Object Restrictions

Code within a `with nogil:` block cannot interact with Python objects, including standard Python lists, dictionaries, or even direct NumPy arrays; all variables must be `cdef`'ed C-level types, and any called functions must also be declared `nogil`.

Sources

Open the full topic