title: Scipy spline interpolation: Determine array length of vector of knots / B-spline coefficients in tck before actual computation
body: <p>Is it somehow possible to determine the array length of the arrays in the <code>tck</code> tuple returned by <code>scipy.interpolate.splprep</code> before computing the values?</p>
  
  <p>I have to fit a spline interpolation to noisy data with 5 million data points (or less, can be varying). 
  My observation is that the interpolation at an array length of ~ 90 is pretty good, while it takes a long time to compute the interpolation for higher array lengths (it sometimes also directly jumps from ~ 90 to ~ 1000 while making <strong>s</strong> one step smaller and the interpolation also becomes noisy) and it is not appropriate enough, if the array length is far less (&lt;50)...</p>
  
  <p>Actually, this array length depends on the smoothing factor <strong>s</strong> provided to the <code>splprep</code> function, but for different measurement data, <strong>s</strong> varies a lot to get a consistent array length of around 90. E.g. for <code>data1</code> <strong>s</strong> has a value of around 1000 to get <code>len(cfk[0])</code> equals to 90, for <code>data2</code> <strong>s</strong> has a value of around 100 to get <code>len(cfk[0])</code> equals to 90 at same lengths of <code>data1</code> and <code>data2</code>. It might be dependent on the noise of the data...</p>
  
  <p>I have thought about a loop where <strong>s</strong> starts at some point and decreases through the loop while <code>len(cfk[0])</code> is constantly being checked - but this takes ages, especially if <code>len(cfk[0])</code> gets closer to 90.</p>
  
  <p>Therefore, it would be useful to somehow know the smoothing factor to get the desired array length before computing the cfk tuple.</p>