How do you mean? For later lines I need `tri_idx` to be a flattened array, so I'm not sure how using `unravel_index()` would help me.