title: ArgumentError:expected LP_c_float instance instead of pointer to LP_c_float_Array_50000
body: <p>I have a function in dll file that takes float pointer as one of argument(argument 9: float *result). </p>
  
  <pre><code>void generate_codebook(int *nodestatus, int *nofnode, int *noftree, int *terminal,  int *nofterminal, int *nofobservations, int *total, int *nofseries,  float *result)
  </code></pre>
  
  <p>Here is the python code where I am facing issue:</p>
  
  <pre><code>nofseries=c_int(len(nofobservations))
  noftree=c_int(terminal.shape[1])
  nofnode=c_int(nodestatus.shape[0])
  total=c_int(np.sum(nofobservations,dtype=np.int64))
  nofentry=ctypes.POINTER(ctypes.c_float *(len(nofobservations)*nofterminal*terminal.shape[1]))()
  mydll.generate_codebook.argtypes = [POINTER(c_int), POINTER(c_int), POINTER(c_int), POINTER(c_int),
                                    POINTER(c_int), POINTER(c_int), POINTER(c_int), POINTER(c_int), POINTER(c_float)]
  result=mydll.generate_codebook(nodestatus.ctypes.data_as(ctypes.POINTER(ctypes.c_int)),
                                 nofnode,noftree,terminal.ctypes.data_as(ctypes.POINTER(ctypes.c_int)),
                                 c_int(nofterminal),
                                 nofobservations.ctypes.data_as(ctypes.POINTER(ctypes.c_int)),total,
                                 nofseries,
                                ctypes.byref(nofentry))
  </code></pre>
  
  <p>While calling generate_codebook function I am facing argument error in last argument where LP_c_float instance is expected. Below is the error:</p>
  
  <pre><code>&lt;ipython-input-28-f73a7383211e&gt; in generatecodebook(nodestatus, terminal, nofterminal, nofobservations)
   16                                    nofobservations.ctypes.data_as(ctypes.POINTER(ctypes.c_int)),total,
   17                                    nofseries,
  ---&gt; 18                                   ctypes.byref(nofentry))
  
  ArgumentError: argument 9: &lt;class 'TypeError'&gt;: expected LP_c_float instance instead of pointer to LP_c_float_Array_50000
  </code></pre>
  
  <p>I went through <a href="https://stackoverflow.com/questions/1413851/expected-lp-c-double-instance-instead-of-c-double-array-python-ctypes-error">this</a> question's solution but not able to resolve error.
  Thank you in advance!</p>