title: python linspace in c++
body: <p>im trying to write a similar version of python's numpy.linspace function.</p>
  
  <pre><code>double linspace(int a, int b, int c){
      double line[c];
      double delta =b-a/(c-1);
      for (int i=0; i&lt;c; ++i){
              line[i]=0 + (i*delta);
      }
      return line;
  </code></pre>
  
  <p>with a and b being the first and the last component in the array, and c specifying the number of elements in the array. But when i compile this script it returns:</p>
  
  <pre><code>linspace.cpp: In function ‘double linspace(int, int, int)’:
  linspace.cpp:11:9: error: cannot convert ‘double*’ to ‘double’ in return
    return line;
           ^
  </code></pre>
  
  <p>would anyone happen to knw how to solve this problem?</p>