I found it by visual inspection.

Since PyArray_NDIM is a macro and the fields have the same, it just worked ok.