Код: Выделить всё
import numpy as np
Orig_list = [[[1,2,3], [4,5,6], [7,8,9]], [[11,3,4], [22, 4, 5], [22, 5, 1]], [[7,6,7], [2,5,6], [4,6,7]], [[234, 56, 22], [44, 66, 33], [44, 66, 33]]]
Result_list = [np.nan] * 4
Result_list[0] = Orig_list[0]
for i in range(1, len(Result_list)):
Result_list[i] = (np.array(Result_list[i - 1]) @ np.array(Orig_list[i])).tolist()
Есть ли что-нибудь вроде более прямой функции/метода кумулятивного произведения для приведенных выше вычислений?>
Подробнее здесь: https://stackoverflow.com/questions/797 ... t-elements