Extract diagonal from DiagonalLinearOperator.