Scipy.detrend: Function changes range of values

I am trying to detrend this one dimensional array:

array([13.64352283, 13.48914862, 13.00767009, 13.35416524, 13.60143818,
       13.40895156, 13.48349417, 13.65703125, 13.4959721 , 13.28891263,
       12.97999066, 13.01112397, 12.79519705, 13.32030445, 13.19949068,
       12.88691975, 13.32079707])

The function runs without errors but changes the range of values from ~[12,14] to ~[-0.4,0.4].
I believe it is due to the small std dev of the values that this happens.
Any ideas how to fix this, so I can plot the array with trend and the detrended one into one plot?
Normalization is not an option.

Please help.

Leave a Reply

Your email address will not be published. Required fields are marked *