How to interpolate the current matrix? Its lines are known to be linearly dependent. The second vector is 3.8 times the first, and the third is 1.36 times the second.
import numpy as np lst = [[0.0, 9.65482234954834, 0.0, 0.0, 0.0, 4392.50146484375, 4413.01416015625, 4279.15673828125, 4441.95751953125, 4356.40185546875, 4216.439453125, 4320.54736328125, 4313.57470703125, 4358.31298828125, 4172.80615234375, 4207.71875], [0.0, 0.0, 0.0, 0.0, 0.0, 15338.384765625, 15798.109375, 15535.3623046875, 16247.1298828125, 16105.185546875, 15691.068359375, 15853.0869140625, 15678.134765625, 15474.01171875, 15799.8740234375, 15546.822265625], [0.0, 0.0, 0.0, 0.0, 0.0, 22739.58203125, 22782.068359375, 22920.478515625, 23990.54296875, 23933.31640625, 23497.22265625, 23257.619140625, 23750.544921875, 22999.19921875, 22714.302734375, 22839.28125]] array = np.array(lst) array[array == 0] = np.nan
The best that came out for me (in df format, because I use Pandas):
Value_S10 Value_S11 Value_S12 Value_S13 Value_S14 \ 0 NaN 9.654822 1105.366483 2201.078144 3296.789804 1 NaN 36.688325 3862.112435 7687.536545 11512.960655 2 NaN 49.896122 5722.317599 11394.739077 17067.160554 Value_S15 Value_S16 Value_S17 Value_S2 Value_S3 \ 0 4392.501465 4413.014160 4279.156738 4441.957520 4356.401855 1 15338.384766 15798.109375 15535.362305 16247.129883 16105.185547 2 22739.582031 22782.068359 22920.478516 23990.542969 23933.316406 Value_S4 Value_S5 Value_S6 Value_S7 Value_S8 \ 0 4216.439453 4320.547363 4313.574707 4358.312988 4172.806152 1 15691.068359 15853.086914 15678.134766 15474.011719 15799.874023 2 23497.222656 23257.619141 23750.544922 22999.199219 22714.302734 Value_S9 0 4207.718750 1 15546.822266 2 22839.281250
All nan needs to be replaced by reasonable values. I did not completely get rid of nan. Help is needed