ndarray.diagonal(offset=0,axis1=0,axis2=1)¶Return specified diagonals. In NumPy 1.9 the returned array is aread-only view instead of a copy as in previous NumPy versions. Ina future version the read-only restriction will be removed.
Refer tonumpy.diagonal for full documentation.
See also
numpy.diagonal