设L是一个列表L = [A_1, A_2, ..., A_n],每个A_i都是长度为1024的numpy.int32数组。经过一些分析之后,我看到最耗时的操作之一是求和: # L is a global variable, modified outside of this function for a in L: return b
PS :我认为我不能定义一个大小为102
1] # Create a 1D array, of length 'size' array_wrapper.set_data(size, <void*> array)
ndarray = np.array(array_wrapper, copy=False)# Assign our object to the 'base' of the <