As recently discussed on the mailing list, the NumPy API's array data-structure information is unnecessarily hard to access from non-C languages because the accessor functions PyArray_NDIM etcetera are defined either as macros or as inline functions, neither of which are exported for dynamic linking.
Please consider exporting (non-inline) versions of these functions (adding them to PyArray_API for dynamic linking). e.g. you could call them PyArray_ndim etcetera.
(This is very similar to how, in the Python API, important macros like Py_XDECREF have equivalent exported functions Py_DecRef "for runtime dynamic embedding".)
See also #2998. @stevengj A list of functions you would like to see would be helpful.