diff --git a/src/Data/Text/MatrixMarketWriter.cs b/src/Data/Text/MatrixMarketWriter.cs index bcc51529..b86bc5d5 100644 --- a/src/Data/Text/MatrixMarketWriter.cs +++ b/src/Data/Text/MatrixMarketWriter.cs @@ -77,7 +77,7 @@ namespace MathNet.Numerics.Data.Text public static void WriteVector(string filePath, Vector vector, Compression compression = Compression.Uncompressed) where T : struct, IEquatable, IFormattable { - using (var stream = File.OpenRead(filePath)) + using (var stream = File.OpenWrite(filePath)) { switch (compression) {