Applying operation to unevenly split portions of numpy array
问题 I have three 1D numpy arrays: A list of times at which some measurements occurred ( t ). A list of measurements that occurred at each of the times in t ( y ). A (shorter) list of times for some some external changes that affected these measurements ( b ). Here is an example: t = np.array([0.33856697, 1.69615293 , 1.70257872 , 2.32510279, 2.37788203, 2.45102176, 2.87518307, 3.60941650, 3.78275907 , 4.37970516 , 4.56480259, 5.33306546, 6.00867792, 7.40217571, 7.46716989, 7.6791613 , 7.96938078,