<p dir="auto">When using <code class="notranslate">scipy.signal.savgol_filter</code>, the filter will randomly throw an error. It usually happens after 6 calls to <code class="notranslate">savgol_filter</code>. I was not able to get a reproducing code unfortunately :( (I mean I have my huge code that replicates the issue, but I can't reduce this to a snipnet.)</p>
<ul dir="auto">
<li>The error comes after a fixed number of calls to <code class="notranslate">savgol_filter</code> but calling them in a snipnet doesn't work. (It has to be in my code somehow)</li>
<li>Using a debugger, I can call <code class="notranslate">lapack_func(a1, b1, lwork, iwork, cond, False, False)</code> after the error occurs. It will fail the first time but subsequent calls with the same parameter will suceed.</li>
<li>I can fix the issue by adding in <code class="notranslate">scipy\linalg\basic.py</code> a second call to <code class="notranslate">lapack_func</code>:</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="                x, s, rank, info = lapack_func(a1, b1, lwork,
                                               iwork, cond, False, False)
                if info != 0:
                    x, s, rank, info = lapack_func(a1, b1, lwork,
                                                iwork, cond, False, False)"><pre class="notranslate"><code class="notranslate">                x, s, rank, info = lapack_func(a1, b1, lwork,
                                               iwork, cond, False, False)
                if info != 0:
                    x, s, rank, info = lapack_func(a1, b1, lwork,
                                                iwork, cond, False, False)
</code></pre></div>
<p dir="auto">What could I possibly do that would make <code class="notranslate">lapack_func</code> return different results for the same parameters? (the parameters are):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="IPdb [3]: a1, b1, lwork, iwork, cond
(array([[  1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,
          1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,
          1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,
          1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,
          1.,   1.,   1.,   1.,   1.,   1.,   1.],
       [ 25.,  24.,  23.,  22.,  21.,  20.,  19.,  18.,  17.,  16.,  15.,
         14.,  13.,  12.,  11.,  10.,   9.,   8.,   7.,   6.,   5.,   4.,
          3.,   2.,   1.,   0.,  -1.,  -2.,  -3.,  -4.,  -5.,  -6.,  -7.,
         -8.,  -9., -10., -11., -12., -13., -14., -15., -16., -17., -18.,
        -19., -20., -21., -22., -23., -24., -25.]]), array([1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
       0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
       0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]), 808, 22, 2.220446049250313e-16)"><pre class="notranslate"><code class="notranslate">IPdb [3]: a1, b1, lwork, iwork, cond
(array([[  1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,
          1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,
          1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,
          1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,   1.,
          1.,   1.,   1.,   1.,   1.,   1.,   1.],
       [ 25.,  24.,  23.,  22.,  21.,  20.,  19.,  18.,  17.,  16.,  15.,
         14.,  13.,  12.,  11.,  10.,   9.,   8.,   7.,   6.,   5.,   4.,
          3.,   2.,   1.,   0.,  -1.,  -2.,  -3.,  -4.,  -5.,  -6.,  -7.,
         -8.,  -9., -10., -11., -12., -13., -14., -15., -16., -17., -18.,
        -19., -20., -21., -22., -23., -24., -25.]]), array([1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
       0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
       0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]), 808, 22, 2.220446049250313e-16)
</code></pre></div>
<p dir="auto">What happens is:<br>
I run the code. After 6 calls to <code class="notranslate">savgol_filter</code>, I get:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
  File &quot;C:\Users\Quentin.Peter\AppData\Local\Continuum\anaconda3\lib\site-packages\scipy\signal\_savitzky_golay.py&quot;, line 335, in savgol_filter
    coeffs = savgol_coeffs(window_length, polyorder, deriv=deriv, delta=delta)

  File &quot;C:\Users\Quentin.Peter\AppData\Local\Continuum\anaconda3\lib\site-packages\scipy\signal\_savitzky_golay.py&quot;, line 137, in savgol_coeffs
    coeffs, _, _, _ = lstsq(A, y)

  File &quot;C:\Users\Quentin.Peter\AppData\Local\Continuum\anaconda3\lib\site-packages\scipy\linalg\basic.py&quot;, line 1228, in lstsq
    % (-info, lapack_driver))

ValueError: illegal value in 4-th argument of internal None"><pre class="notranslate"><code class="notranslate">
  File "C:\Users\Quentin.Peter\AppData\Local\Continuum\anaconda3\lib\site-packages\scipy\signal\_savitzky_golay.py", line 335, in savgol_filter
    coeffs = savgol_coeffs(window_length, polyorder, deriv=deriv, delta=delta)

  File "C:\Users\Quentin.Peter\AppData\Local\Continuum\anaconda3\lib\site-packages\scipy\signal\_savitzky_golay.py", line 137, in savgol_coeffs
    coeffs, _, _, _ = lstsq(A, y)

  File "C:\Users\Quentin.Peter\AppData\Local\Continuum\anaconda3\lib\site-packages\scipy\linalg\basic.py", line 1228, in lstsq
    % (-info, lapack_driver))

ValueError: illegal value in 4-th argument of internal None
</code></pre></div>
<p dir="auto">Trying to use <code class="notranslate">lstsq</code> after that leads to:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):

  File &quot;C:\Users\Quentin.Peter\OneDrive - Fluidic Analytics\Desktop\untitled4.py&quot;, line 59, in &lt;module&gt;
    lstsq(A, y)

  File &quot;C:\Users\Quentin.Peter\AppData\Local\Continuum\anaconda3\lib\site-packages\scipy\linalg\basic.py&quot;, line 1224, in lstsq
    raise LinAlgError(&quot;SVD did not converge in Linear Least Squares&quot;)

LinAlgError: SVD did not converge in Linear Least Squares"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):

  File "C:\Users\Quentin.Peter\OneDrive - Fluidic Analytics\Desktop\untitled4.py", line 59, in &lt;module&gt;
    lstsq(A, y)

  File "C:\Users\Quentin.Peter\AppData\Local\Continuum\anaconda3\lib\site-packages\scipy\linalg\basic.py", line 1224, in lstsq
    raise LinAlgError("SVD did not converge in Linear Least Squares")

LinAlgError: SVD did not converge in Linear Least Squares
</code></pre></div>
<p dir="auto">Any repeat after that will work.</p>
<h4 dir="auto">Scipy/Numpy/Python version information:</h4>

<p dir="auto"><code class="notranslate">1.5.3 1.19.1 sys.version_info(major=3, minor=7, micro=6, releaselevel='final', serial=0)</code></p>
<p dir="auto">PS: The calls to lstsq are as follow but this doesn't trigger the bug:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np
from scipy.linalg import lstsq

A = np.asarray([
     np.fromstring(&quot;&quot;&quot;1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00&quot;&quot;&quot;, sep=' '),
   np.fromstring(&quot;&quot;&quot;4.800e+01  4.700e+01  4.600e+01  4.500e+01  4.400e+01  4.300e+01
   4.200e+01  4.100e+01  4.000e+01  3.900e+01  3.800e+01  3.700e+01
   3.600e+01  3.500e+01  3.400e+01  3.300e+01  3.200e+01  3.100e+01
   3.000e+01  2.900e+01  2.800e+01  2.700e+01  2.600e+01  2.500e+01
   2.400e+01  2.300e+01  2.200e+01  2.100e+01  2.000e+01  1.900e+01
   1.800e+01  1.700e+01  1.600e+01  1.500e+01  1.400e+01  1.300e+01
   1.200e+01  1.100e+01  1.000e+01  9.000e+00  8.000e+00  7.000e+00
   6.000e+00  5.000e+00  4.000e+00  3.000e+00  2.000e+00  1.000e+00
   0.000e+00 -1.000e+00 -2.000e+00 -3.000e+00 -4.000e+00 -5.000e+00
  -6.000e+00 -7.000e+00 -8.000e+00 -9.000e+00 -1.000e+01 -1.100e+01
  -1.200e+01 -1.300e+01 -1.400e+01 -1.500e+01 -1.600e+01 -1.700e+01
  -1.800e+01 -1.900e+01 -2.000e+01 -2.100e+01 -2.200e+01 -2.300e+01
  -2.400e+01 -2.500e+01 -2.600e+01 -2.700e+01 -2.800e+01 -2.900e+01
  -3.000e+01 -3.100e+01 -3.200e+01 -3.300e+01 -3.400e+01 -3.500e+01
  -3.600e+01 -3.700e+01 -3.800e+01 -3.900e+01 -4.000e+01 -4.100e+01
  -4.200e+01 -4.300e+01 -4.400e+01 -4.500e+01 -4.600e+01 -4.700e+01
  -4.800e+01&quot;&quot;&quot;, sep=' '),
   np.fromstring(&quot;&quot;&quot;2.304e+03  2.209e+03  2.116e+03  2.025e+03  1.936e+03  1.849e+03
   1.764e+03  1.681e+03  1.600e+03  1.521e+03  1.444e+03  1.369e+03
   1.296e+03  1.225e+03  1.156e+03  1.089e+03  1.024e+03  9.610e+02
   9.000e+02  8.410e+02  7.840e+02  7.290e+02  6.760e+02  6.250e+02
   5.760e+02  5.290e+02  4.840e+02  4.410e+02  4.000e+02  3.610e+02
   3.240e+02  2.890e+02  2.560e+02  2.250e+02  1.960e+02  1.690e+02
   1.440e+02  1.210e+02  1.000e+02  8.100e+01  6.400e+01  4.900e+01
   3.600e+01  2.500e+01  1.600e+01  9.000e+00  4.000e+00  1.000e+00
   0.000e+00  1.000e+00  4.000e+00  9.000e+00  1.600e+01  2.500e+01
   3.600e+01  4.900e+01  6.400e+01  8.100e+01  1.000e+02  1.210e+02
   1.440e+02  1.690e+02  1.960e+02  2.250e+02  2.560e+02  2.890e+02
   3.240e+02  3.610e+02  4.000e+02  4.410e+02  4.840e+02  5.290e+02
   5.760e+02  6.250e+02  6.760e+02  7.290e+02  7.840e+02  8.410e+02
   9.000e+02  9.610e+02  1.024e+03  1.089e+03  1.156e+03  1.225e+03
   1.296e+03  1.369e+03  1.444e+03  1.521e+03  1.600e+03  1.681e+03
   1.764e+03  1.849e+03  1.936e+03  2.025e+03  2.116e+03  2.209e+03
   2.304e+03&quot;&quot;&quot;, sep=' ')
   ])

y = np.asarray([1., 0., 0.])
lstsq(A, y)

A = np.asarray([
     np.fromstring(&quot;&quot;&quot; 1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.&quot;&quot;&quot;, sep=' '),
   np.fromstring(&quot;&quot;&quot;25.  24.  23.  22.  21.  20.  19.  18.  17.  16.  15.  14.  13.  12.
   11.  10.   9.   8.   7.   6.   5.   4.   3.   2.   1.   0.  -1.  -2.
   -3.  -4.  -5.  -6.  -7.  -8.  -9. -10. -11. -12. -13. -14. -15. -16.
  -17. -18. -19. -20. -21. -22. -23. -24. -25.&quot;&quot;&quot;, sep=' ')
   ])

y = np.asarray([1., 0.])
lstsq(A, y)

A = np.asarray([
     np.fromstring(&quot;&quot;&quot; 1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.&quot;&quot;&quot;, sep=' '),
   np.fromstring(&quot;&quot;&quot; 25.  24.  23.  22.  21.  20.  19.  18.  17.  16.  15.  14.  13.  12.
   11.  10.   9.   8.   7.   6.   5.   4.   3.   2.   1.   0.  -1.  -2.
   -3.  -4.  -5.  -6.  -7.  -8.  -9. -10. -11. -12. -13. -14. -15. -16.
  -17. -18. -19. -20. -21. -22. -23. -24. -25.&quot;&quot;&quot;, sep=' ')
   ])

y = np.asarray([1., 0.])
lstsq(A, y)

A = np.asarray([
     np.fromstring(&quot;&quot;&quot; 1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.&quot;&quot;&quot;, sep=' '),
   np.fromstring(&quot;&quot;&quot;25.  24.  23.  22.  21.  20.  19.  18.  17.  16.  15.  14.  13.  12.
   11.  10.   9.   8.   7.   6.   5.   4.   3.   2.   1.   0.  -1.  -2.
   -3.  -4.  -5.  -6.  -7.  -8.  -9. -10. -11. -12. -13. -14. -15. -16.
  -17. -18. -19. -20. -21. -22. -23. -24. -25.&quot;&quot;&quot;, sep=' ')
   ])

y = np.asarray([1., 0.])
lstsq(A, y)

A = np.asarray([
     np.fromstring(&quot;&quot;&quot; 1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.&quot;&quot;&quot;, sep=' '),
   np.fromstring(&quot;&quot;&quot;25.  24.  23.  22.  21.  20.  19.  18.  17.  16.  15.  14.  13.  12.
   11.  10.   9.   8.   7.   6.   5.   4.   3.   2.   1.   0.  -1.  -2.
   -3.  -4.  -5.  -6.  -7.  -8.  -9. -10. -11. -12. -13. -14. -15. -16.
  -17. -18. -19. -20. -21. -22. -23. -24. -25.&quot;&quot;&quot;, sep=' ')
   ])
y = np.asarray([1., 0.])
lstsq(A, y)

A = np.asarray([
     np.fromstring(&quot;&quot;&quot; 1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.&quot;&quot;&quot;, sep=' '),
   np.fromstring(&quot;&quot;&quot;25.  24.  23.  22.  21.  20.  19.  18.  17.  16.  15.  14.  13.  12.
   11.  10.   9.   8.   7.   6.   5.   4.   3.   2.   1.   0.  -1.  -2.
   -3.  -4.  -5.  -6.  -7.  -8.  -9. -10. -11. -12. -13. -14. -15. -16.
  -17. -18. -19. -20. -21. -22. -23. -24. -25.&quot;&quot;&quot;, sep=' ')
   ])
y = np.asarray([1., 0.])
lstsq(A, y)"><pre class="notranslate"><code class="notranslate">import numpy as np
from scipy.linalg import lstsq

A = np.asarray([
     np.fromstring("""1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00  1.000e+00
   1.000e+00""", sep=' '),
   np.fromstring("""4.800e+01  4.700e+01  4.600e+01  4.500e+01  4.400e+01  4.300e+01
   4.200e+01  4.100e+01  4.000e+01  3.900e+01  3.800e+01  3.700e+01
   3.600e+01  3.500e+01  3.400e+01  3.300e+01  3.200e+01  3.100e+01
   3.000e+01  2.900e+01  2.800e+01  2.700e+01  2.600e+01  2.500e+01
   2.400e+01  2.300e+01  2.200e+01  2.100e+01  2.000e+01  1.900e+01
   1.800e+01  1.700e+01  1.600e+01  1.500e+01  1.400e+01  1.300e+01
   1.200e+01  1.100e+01  1.000e+01  9.000e+00  8.000e+00  7.000e+00
   6.000e+00  5.000e+00  4.000e+00  3.000e+00  2.000e+00  1.000e+00
   0.000e+00 -1.000e+00 -2.000e+00 -3.000e+00 -4.000e+00 -5.000e+00
  -6.000e+00 -7.000e+00 -8.000e+00 -9.000e+00 -1.000e+01 -1.100e+01
  -1.200e+01 -1.300e+01 -1.400e+01 -1.500e+01 -1.600e+01 -1.700e+01
  -1.800e+01 -1.900e+01 -2.000e+01 -2.100e+01 -2.200e+01 -2.300e+01
  -2.400e+01 -2.500e+01 -2.600e+01 -2.700e+01 -2.800e+01 -2.900e+01
  -3.000e+01 -3.100e+01 -3.200e+01 -3.300e+01 -3.400e+01 -3.500e+01
  -3.600e+01 -3.700e+01 -3.800e+01 -3.900e+01 -4.000e+01 -4.100e+01
  -4.200e+01 -4.300e+01 -4.400e+01 -4.500e+01 -4.600e+01 -4.700e+01
  -4.800e+01""", sep=' '),
   np.fromstring("""2.304e+03  2.209e+03  2.116e+03  2.025e+03  1.936e+03  1.849e+03
   1.764e+03  1.681e+03  1.600e+03  1.521e+03  1.444e+03  1.369e+03
   1.296e+03  1.225e+03  1.156e+03  1.089e+03  1.024e+03  9.610e+02
   9.000e+02  8.410e+02  7.840e+02  7.290e+02  6.760e+02  6.250e+02
   5.760e+02  5.290e+02  4.840e+02  4.410e+02  4.000e+02  3.610e+02
   3.240e+02  2.890e+02  2.560e+02  2.250e+02  1.960e+02  1.690e+02
   1.440e+02  1.210e+02  1.000e+02  8.100e+01  6.400e+01  4.900e+01
   3.600e+01  2.500e+01  1.600e+01  9.000e+00  4.000e+00  1.000e+00
   0.000e+00  1.000e+00  4.000e+00  9.000e+00  1.600e+01  2.500e+01
   3.600e+01  4.900e+01  6.400e+01  8.100e+01  1.000e+02  1.210e+02
   1.440e+02  1.690e+02  1.960e+02  2.250e+02  2.560e+02  2.890e+02
   3.240e+02  3.610e+02  4.000e+02  4.410e+02  4.840e+02  5.290e+02
   5.760e+02  6.250e+02  6.760e+02  7.290e+02  7.840e+02  8.410e+02
   9.000e+02  9.610e+02  1.024e+03  1.089e+03  1.156e+03  1.225e+03
   1.296e+03  1.369e+03  1.444e+03  1.521e+03  1.600e+03  1.681e+03
   1.764e+03  1.849e+03  1.936e+03  2.025e+03  2.116e+03  2.209e+03
   2.304e+03""", sep=' ')
   ])

y = np.asarray([1., 0., 0.])
lstsq(A, y)

A = np.asarray([
     np.fromstring(""" 1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.""", sep=' '),
   np.fromstring("""25.  24.  23.  22.  21.  20.  19.  18.  17.  16.  15.  14.  13.  12.
   11.  10.   9.   8.   7.   6.   5.   4.   3.   2.   1.   0.  -1.  -2.
   -3.  -4.  -5.  -6.  -7.  -8.  -9. -10. -11. -12. -13. -14. -15. -16.
  -17. -18. -19. -20. -21. -22. -23. -24. -25.""", sep=' ')
   ])

y = np.asarray([1., 0.])
lstsq(A, y)

A = np.asarray([
     np.fromstring(""" 1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.""", sep=' '),
   np.fromstring(""" 25.  24.  23.  22.  21.  20.  19.  18.  17.  16.  15.  14.  13.  12.
   11.  10.   9.   8.   7.   6.   5.   4.   3.   2.   1.   0.  -1.  -2.
   -3.  -4.  -5.  -6.  -7.  -8.  -9. -10. -11. -12. -13. -14. -15. -16.
  -17. -18. -19. -20. -21. -22. -23. -24. -25.""", sep=' ')
   ])

y = np.asarray([1., 0.])
lstsq(A, y)

A = np.asarray([
     np.fromstring(""" 1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.""", sep=' '),
   np.fromstring("""25.  24.  23.  22.  21.  20.  19.  18.  17.  16.  15.  14.  13.  12.
   11.  10.   9.   8.   7.   6.   5.   4.   3.   2.   1.   0.  -1.  -2.
   -3.  -4.  -5.  -6.  -7.  -8.  -9. -10. -11. -12. -13. -14. -15. -16.
  -17. -18. -19. -20. -21. -22. -23. -24. -25.""", sep=' ')
   ])

y = np.asarray([1., 0.])
lstsq(A, y)

A = np.asarray([
     np.fromstring(""" 1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.""", sep=' '),
   np.fromstring("""25.  24.  23.  22.  21.  20.  19.  18.  17.  16.  15.  14.  13.  12.
   11.  10.   9.   8.   7.   6.   5.   4.   3.   2.   1.   0.  -1.  -2.
   -3.  -4.  -5.  -6.  -7.  -8.  -9. -10. -11. -12. -13. -14. -15. -16.
  -17. -18. -19. -20. -21. -22. -23. -24. -25.""", sep=' ')
   ])
y = np.asarray([1., 0.])
lstsq(A, y)

A = np.asarray([
     np.fromstring(""" 1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.   1.
    1.   1.   1.   1.   1.   1.   1.   1.   1.""", sep=' '),
   np.fromstring("""25.  24.  23.  22.  21.  20.  19.  18.  17.  16.  15.  14.  13.  12.
   11.  10.   9.   8.   7.   6.   5.   4.   3.   2.   1.   0.  -1.  -2.
   -3.  -4.  -5.  -6.  -7.  -8.  -9. -10. -11. -12. -13. -14. -15. -16.
  -17. -18. -19. -20. -21. -22. -23. -24. -25.""", sep=' ')
   ])
y = np.asarray([1., 0.])
lstsq(A, y)
</code></pre></div>
<p dir="auto">From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/opoplawski/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/opoplawski">@opoplawski</a>: With Fedora Rawhide (but not Fedora 19) I'm seeing:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: test_fitpack.TestSplder.test_kink
----------------------------------------------------------------------
Traceback (most recent call last):
   File &quot;/usr/lib/python2.7/site-packages/nose/case.py&quot;, line 197, in runTest
     self.test(*self.arg)
   File
&quot;/builddir/build/BUILDROOT/scipy-0.13.0-0.1.b1.fc21.x86_64/usr/lib64/python2.7/site-packages/scipy/interpolate/tests/test_fitpack.py&quot;,
line 326, in test_kink
     splder(spl2, 2)  # Should work
   File
&quot;/builddir/build/BUILDROOT/scipy-0.13.0-0.1.b1.fc21.x86_64/usr/lib64/python2.7/site-packages/scipy/interpolate/fitpack.py&quot;,
line 1186, in splder
     &quot;and is not differentiable %d times&quot;) % n)
ValueError: The spline has internal repeated knots and is not differentiable 2
times"><pre class="notranslate"><code class="notranslate">ERROR: test_fitpack.TestSplder.test_kink
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
     self.test(*self.arg)
   File
"/builddir/build/BUILDROOT/scipy-0.13.0-0.1.b1.fc21.x86_64/usr/lib64/python2.7/site-packages/scipy/interpolate/tests/test_fitpack.py",
line 326, in test_kink
     splder(spl2, 2)  # Should work
   File
"/builddir/build/BUILDROOT/scipy-0.13.0-0.1.b1.fc21.x86_64/usr/lib64/python2.7/site-packages/scipy/interpolate/fitpack.py",
line 1186, in splder
     "and is not differentiable %d times") % n)
ValueError: The spline has internal repeated knots and is not differentiable 2
times
</code></pre></div>
<p dir="auto">and the same with python3.</p>