title: PyArrayObject has no members
body: <p>I am trying to write a simple c++ extension to my python/numpy code. However, I am not able to compile the extension script because PyArrayObject from the function input has no members. It seems to me that I am doing the same as for example <a href="https://stackoverflow.com/questions/7744149/typecasting-pyarrayobject-data-to-a-c-array">this post</a>, but I suppose I have missed something. Here is an example that fails to compile because I try to retrieve the dimensions member:</p>
  
  <pre><code>#include &lt;Python.h&gt;
  #include &lt;stdio.h&gt;
  #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
  #include "numpy/arrayobject.h"
  
  static PyObject *function(PyObject *self, PyObject *args) { 
  
      PyObject *input;
      PyArrayObject *array;
  
      if (!PyArg_ParseTuple(args, "O", &amp;input))
          return NULL;
  
      array= (PyArrayObject *)
          PyArray_ContiguousFromObject(input, NPY_DOUBLE, 2, 2);
      long n=array-&gt;dimensions[1];
  }
  </code></pre>
  
  <p>This is compiled on a linux system and a windows 7 computer, using the MVS 14.0 c++ compiler, so the problem seems to be platform independent. </p>
  
  <p>Python version: 3.5</p>
  
  <p>Exception output from the windows system:</p>
  
  <pre><code>paneltime/cfunctions.cpp(20): error C2039: 'dimensions': is not a member of 'tagPyArrayObject'c:\anaconda3\lib\site-packages\numpy\core\include\numpy\ndarraytypes.h(692): note: see declaration of 'tagPyArrayObject'
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
  </code></pre>