Hi All, Just noting an oddity when the diagonal method is called on arrays with ndim
2
In [1]: a = arange(8).reshape(2,2,2) In [2]: a.diagonal() Out[2]: array([[0, 6], [1, 7]]) The diagonal is taken over the first two indices while the rightmost indices vary the slowest. I would expect things to be the other way around. In particular, it would work better with the arrays of matrices proposed by Tim. I suppose another logical extrapolation from two dimensions would be to take the "diagonal" on all three indices. But the current behaviour strikes me as a bit unexpected. Chuck
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion