SVD did not converge in Linear Least Squares under continuous loop

Viewed 104

When running the following python code, it runs without errors. However, when the same numbers are put into flatten_power from a IOT sensor i.e running continuous in a loop I get the error "SVD did not converge in Linear Least Squares". The number in the array below have been copied and pasted from when its given the error "SVD did not converge in Linear Least Squares".
in the terminal window i get

On entry to DLASCLS parameter number 4 had an illegal value

On entry to DLASCLS parameter number 4 had an illegal value"

from scipy import signal
import numpy as np
flatten_power = np.array([  23.16,   22.46,   22.57,   25.27,   21.29,   22.78,   23.69,
         22.82,   21.3 ,   23.45,   23.99,   22.07,   22.54,   22.78,
         21.57,   23.27,   22.88,   24.06,   23.95,   20.61,   22.62,
         25.06,   22.94,   24.31,   22.83,   23.74,   22.1 ,   23.39,
         22.6 ,   25.08,   23.43,   22.09,   23.73,   23.35,   23.52,
         21.71,   22.72,   21.2 ,   23.34,   22.04,   21.82,   24.89,
         22.19,   24.13,   23.56,   22.53,   21.81,   28.48,   23.63,
         22.3 ,   22.46,   23.58,   23.02,   23.13,   24.33,   22.49,
         24.6 ,   23.72,   21.27,   23.25,   22.94,   24.45,   24.61,
         23.75,   22.96,   22.11,   22.84,   23.44,   23.11,   21.19,
         22.02,   23.22,   23.72,   20.9 ,   23.76,   22.86,   22.04,
         22.19,   22.68,   23.24,   23.5 ,   21.58,   23.92,   24.67,
         22.64,   24.35,   22.33,   21.35,   21.15,   24.52,   23.26,
         20.41,   22.13,   22.22,   22.47,   22.72,   21.35,   23.22,
         25.18,   21.6 ,   24.16,   25.02,   23.68,   25.23,   23.14,
         25.26,   25.96,   23.74,   25.14,   25.43,   24.25,   28.33,
         26.07,   34.77,   23.77,   26.13,   25.05,   23.5 ,   24.67,
         24.05,   23.38,   27.03,   27.13,   23.64,   25.36,   25.71,
         26.04,   25.3 ,   24.62,   23.78,   24.26,   28.86,   23.62,
         26.85,   25.39,   24.84,   27.19,   26.29,   24.53,   25.82,
         25.91,   25.61,   26.35,   23.22,   24.91,   22.39,   25.66,
         28.78,   23.64,   22.91,   25.6 ,   22.96,   22.49,   21.91,
         22.41,   22.4 ,   22.97,   24.75,   23.35,   23.38,   24.9 ,
         21.94,   21.57,   23.3 ,   22.83,   23.61,   22.85,   23.74,
         22.95,   23.64,   22.96,   23.32,   22.29,   21.88,   22.35,
         25.28,   22.62,   23.29,   22.85,   23.79,   24.46,   21.79,
         22.23,   21.79,   22.84,   24.61,   23.52,   22.82,   22.99,
         22.91,   24.56,   23.11,   23.76,   22.85,   22.06,   21.99,
         24.47,   22.67,   22.64,   22.46,   24.66,   22.14,   25.58,
         23.11,   23.  ,   22.65,   22.48,   24.96,   22.64,   22.16,
        621.04,  269.5 ,   29.33, 1035.99,  170.67,  673.22,  181.29,
        216.2 ,  844.08,  115.34,  133.18,   96.98,   98.93,  278.49,
        104.94,  311.92, 1037.68,  322.75,  561.8 ,  989.76,  652.98,
        574.07,  676.87,  660.16,  604.62,  689.59,  653.65,  753.52,
        681.86,  701.36,  679.6 ,  698.15,  638.34,  714.32,  662.22,
        634.62,  668.27,  702.85,  667.87,  750.7 ,  746.33,  590.96,
        646.18,  712.75,  650.15,  671.42,  737.9 ,  635.75,  672.51,
        682.16,  612.88,  696.04,  685.16,  655.46,  666.21,  654.82,
        718.76,  661.24,  468.6 ,  485.03,  439.47,  511.13,  457.96,
        554.79,  481.19,  442.89,  530.47,  391.72,  524.2 ,  582.09,
        372.63])
smoothed_power = signal.savgol_filter(flatten_power, window_length=101, polyorder=2)
0 Answers
Related