Когда я копирую и вставляю через определение x0
:
In [41]: x0
Out[41]: array([0, 0])
и выполняю тестовый расчет в начальной точке:
In [42]: model(x0, 0)
/usr/local/bin/ipython3:29: VisibleDeprecationWarning:
Creating an ndarray from ragged nested sequences (which is a
list-or-tuple of lists-or-tuples-or ndarrays with different
lengths or shapes) is deprecated. If you meant to do this, you
must specify 'dtype=object' when creating the ndarray
Out[42]:
array([0,
array([100. , 99.49028159, 97.9663226 , 95.44365884,
91.94800728, 87.51500386, 82.18984026, 76.02680317,
69.08872084, 61.44632264, 53.17751801, 44.36660217,
35.10339685, 25.48233457, 15.60149599, 5.56161002,
-4.53497306, -14.58532495, -24.48698867, -34.139023 ,
-43.44303157, -52.30416587, -60.63209224, -68.34191273,
-75.35503059, -81.59995152, -87.01301249, -91.53903077,
-95.13186646, -97.75489286, -99.38136988, -99.99471662,
-99.58868039, -98.16740047, -95.74536592, -92.34726785,
-88.00774772, -82.7710442 , -76.69054217, -69.8282285 ,
-62.25406016, -54.04525101, -45.28548466, -36.0640614 ,
-26.47498782, -16.61601846, -6.58765929, 3.5078569 ,
13.56761271, 23.48905528, 33.17104177, 42.51487044,
51.42528687, 59.81145498, 67.58788309, 74.67529543,
81.00144031, 86.50182667, 91.12038155, 94.81002171,
97.53313359, 99.26195678, 99.97886703, 99.67655589,
98.35810522, 96.03695581, 92.73677031, 88.49119201,
83.34350191, 77.34617746, 70.56035759, 63.05521944,
54.90727317, 46.19958194, 37.02091515, 27.46484351,
17.62878515, 7.61301246, -2.48037008, -12.54846682,
-22.48863986, -32.19955543, -41.58221687, -50.54097388,
-58.98449759, -66.8267116 , -73.98766951, -80.39436986,
-85.9815004 , -90.69210386, -94.47815861, -97.30106822,
-99.1320549 , -99.95245291, -99.7538988 , -98.53841671,
-96.31839771, -93.11647348, -88.96528564, -83.90715291])],
dtype=object)
In [43]: _.shape
Out[43]: (2,)
model
возвращает Массив объектов из 2 элементов, содержащий скаляр 0 и массив (100,). Это не то, с чем может работать odeint
!