Match along last axis in numpy array
问题 I saw a lot of articles and answers to other questions about slicing 3D lists in python, but I can't apply those methods to my case. I have a 3D list: list = [ [[0, 56, 78], [4, 86, 90], [7, 87, 34]], [[1, 49, 76], [0, 76, 78], [8, 60, 7]], [[9, 6, 58], [6, 57, 78], [10, 46, 2]] ] The the last 2 values of the 3rd dimension stay constant but change every time I rerun the code. What the code needs to do is find 2 specific pairs of those last 2 values and slice from one pair to the other. So for