I'm new to the Python C-API.
Currently I get objects from the embedded Python module via
PyObject* a = (PyObject*) PyObject_GetAttrString(pModule, "a");
std::cout << "a as long is " << PyLong_AsLong(a) << std::endl;
I access numpy objects via
PyArrayObject* array = (PyArrayObject*) PyObject_GetAttrString(pModule, "A");
How can I test if the object is a really a PyArrayObject
? In other words how to do what I would do in Python via isinstance(a, numpy.ndarray)
?