diff --git a/src/Numerics/LinearAlgebra/Matrix.cs b/src/Numerics/LinearAlgebra/Matrix.cs index 118f6302..b6c18723 100644 --- a/src/Numerics/LinearAlgebra/Matrix.cs +++ b/src/Numerics/LinearAlgebra/Matrix.cs @@ -177,14 +177,10 @@ namespace MathNet.Numerics.LinearAlgebra /// public void ClearSubMatrix(int rowIndex, int rowCount, int columnIndex, int columnCount) { - if (rowCount < 1) + if (rowCount < 1 || columnCount < 1) { - throw new ArgumentOutOfRangeException("rowCount", Resources.ArgumentMustBePositive); - } - - if (columnCount < 1) - { - throw new ArgumentOutOfRangeException("columnCount", Resources.ArgumentMustBePositive); + // nothing to do (but no need to fail either) + return; } if (rowIndex + rowCount > RowCount || rowIndex < 0)