11#define PY_ARRAY_UNIQUE_SYMBOL CORE_ARRAY_API
12#define NO_IMPORT_ARRAY
13#include <numpy/arrayobject.h>
20 return reinterpret_cast<PyArrayObject *
>(PyArray_NewFromDescr(&PyArray_Type, PyArray_DescrFromType(datatype),
23 nullptr,
nullptr, 0,
nullptr));
31 auto *nparray =
reinterpret_cast<PyArrayObject *
>(PyArray_NewFromDescr(&PyArray_Type, descr, ndims,
33 nullptr,
nullptr, 0,
nullptr));
39 PyObject *data_type = Py_BuildValue(
"s", datadescr);
41 PyArray_DescrConverter(data_type, &descr);
42 Py_XDECREF(data_type);
tagPyArrayObject PyArrayObject
_PyArray_Descr PyArray_Descr
MANTID_PYTHONINTERFACE_CORE_DLL PyArrayObject * func_PyArray_NewFromDescr(int datatype, int ndims, Py_intptr_t *dims)
equivalent to macro PyArray_NewFromDescr
MANTID_PYTHONINTERFACE_CORE_DLL PyArray_Descr * func_PyArray_Descr(const char *datadescr)
MANTID_PYTHONINTERFACE_CORE_DLL PyObject * func_PyArray_IterNew(PyArrayObject *arr)
equivalent to macro PyArray_IterNew