diff --git a/src/Numerics/LinearAlgebra/Double/SymmetricDenseMatrix.cs b/src/Numerics/LinearAlgebra/Double/SymmetricDenseMatrix.cs index d989a081..f5624d1e 100644 --- a/src/Numerics/LinearAlgebra/Double/SymmetricDenseMatrix.cs +++ b/src/Numerics/LinearAlgebra/Double/SymmetricDenseMatrix.cs @@ -529,14 +529,9 @@ namespace MathNet.Numerics.LinearAlgebra.Double /// Computes the trace of this matrix. /// /// The trace of this matrix - /// If the matrix is not square public override double Trace() { - if (RowCount != ColumnCount) - { - throw new ArgumentException(Resources.ArgumentMatrixSquare); - } - + // Matrix is always square. var sum = 0.0; for (var i = 0; i < RowCount; i++) { diff --git a/src/Numerics/LinearAlgebra/Single/SymmetricDenseMatrix.cs b/src/Numerics/LinearAlgebra/Single/SymmetricDenseMatrix.cs index 2f9d7251..7b6068c4 100644 --- a/src/Numerics/LinearAlgebra/Single/SymmetricDenseMatrix.cs +++ b/src/Numerics/LinearAlgebra/Single/SymmetricDenseMatrix.cs @@ -529,14 +529,9 @@ namespace MathNet.Numerics.LinearAlgebra.Single /// Computes the trace of this matrix. /// /// The trace of this matrix - /// If the matrix is not square public override float Trace() { - if (RowCount != ColumnCount) - { - throw new ArgumentException(Resources.ArgumentMatrixSquare); - } - + // Matrix is always square. var sum = 0.0f; for (var i = 0; i < RowCount; i++) {