efficient algorithm instead of looping
问题 I have a data set where each samples has a structure similar to this X=[ [[],[],[],[]], [[],[]] , [[],[],[]] ,[[][]]] for example: X=np.array([ [ [1,2,3], [2,4,5] ,[2,3,4] ] , [ [5,6], [6,6] ] , [[2,3,1],[2,3,10],[23,1,2],[1,4,5]] ] ,"object") Y=np.array([ [ [12,14,15] ,[12,13,14] ] , [ [15,16], [16,16] ] , [[22,23,21],[32,33,11],[12,44,55]] ] ,"object") so for every sample I need to calculate the dot product between every element of x with corresponding element of y of same index and sum the