# [−][src]Function arrayfire::diag_extract

`pub fn diag_extract<T>(input: &Array<T>, dim: i32) -> Array<T> where`

T: HasAfEnum,

Extract diagonal from a given Matrix

# Parameters

`input`

is the input Matrix`dim`

is the index of the diagonal that has to be extracted from the input Matrix

# Return Values

An Array with values of the diagonal from input Array