I am writing a code, trying to get used to the C API of NumPy arrays.
#include
#include \"numpy/arrayobject.h\"
#include
#inclu
From the docs:
O
(object) [PyObject *]
Store a Python object (without any conversion) in a C object pointer. The C program thus receives the actual object that was passed. The object’s reference count is not increased. The pointer stored is not NULL.
O!
(object) [typeobject, PyObject *]
Store a Python object in a C object pointer. This is similar toO
, but...
You're returning a stolen reference. Increment it first.