Is there a better pythonic way of checking if a ndarray is diagonally symmetric in a particular dimension? i.e for all of x
(arr[:,:,x].T==arr[:,:,x]).all()
If I understand you correctly, you want to do the check
all((arr[:,:,x].T==arr[:,:,x]).all() for x in range(arr.shape[2]))
without the Python loop. Here is how to do it:
(arr.transpose(1, 0, 2) == arr).all()