<commit_before>using System;
using System.Text;

namespace Sparrow.Numerics
{
    public struct Matrix
    {
        public Matrix(double[,] items) { this.items = items; }
        private Matrix(int size) : this(size, size) {}
        private Matrix(int width, int height) : this(new double[width,height]) {}
        
        private double[,] items;

        public double this[int x, int y]
        {
            get { return items[x, y]; }
            private set { items[x, y] = value; }
        }

        public int Width { get { return items.GetLength(0); } }
        public int Height { get { return items.GetLength(1); } }

        public Matrix Transposition
        {
            get
            {
                var result = new Matrix(Height, Width);
                for (int i = Width; i-- != 0;)
                    for (int j = Height; j-- != 0;)
                        result[j, i] = this[i, j];
                return result;
            }
        }

        public Vector Column(int x)
        {
            var result = new double[x];
            for (int i = items.GetLength(1); i-- != 0;)
                result[i] = this[x, i];
            return new Vector(result);
        }

        public Vector Row(int y)
        {
            var result = new double[y];
            for (int i = items.GetLength(0); i-- != 0;)
                result[i] = this[i, y];
            return new Vector(result);
        }

        public Matrix Empty(int size) { return new Matrix(size); }
        public Matrix Empty(int x, int y) { return new Matrix(x, y); }

        public Matrix Identity(int size)
        {
            var result = new Matrix(size);
            for (int i = size; i-- != 0;)
                result[i,i] = 1;
            return result;
        }<commit_msg>Fixed Issue with Matrix<commit_after>using System;
using System.Text;

namespace Sparrow.Numerics
{
    public struct Matrix
    {
        public Matrix(double[,] items) { this.items = items; }
        private Matrix(int size) : this(size, size) {}
        private Matrix(int width, int height) : this(new double[width,height]) {}
        
        private double[,] items;

        public double this[int x, int y]
        {
            get { return items[x, y]; }
            private set { items[x, y] = value; }
        }

        public int Width { get { return items.GetLength(0); } }
        public int Height { get { return items.GetLength(1); } }

        public Matrix Transposition
        {
            get
            {
                var result = new Matrix(Height, Width);
                for (int i = Width; i-- != 0;)
                    for (int j = Height; j-- != 0;)
                        result[j, i] = this[i, j];
                return result;
            }
        }

        public Vector Column(int x)
        {
            var result = new double[Height];
            for (int i = Height; i-- != 0;)
                result[i] = this[x, i];
            return new Vector(result);
        }

        public Vector Row(int y)
        {
            var result = new double[Width];
            for (int i = Width; i-- != 0;)
                result[i] = this[i, y];
            return new Vector(result);
        }

        public Matrix Empty(int size) { return new Matrix(size); }
        public Matrix Empty(int x, int y) { return new Matrix(x, y); }

        public Matrix Identity(int size)
        {
            var result = new Matrix(size);
            for (int i = size; i-- != 0;)
                result[i,i] = 1;
            return result;
        }
{'fraction_non_alphanumeric': 0.1165266106442577, 'fraction_numerical': 0.005042016806722689, 'mean_word_length': 1.3870320855614973, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3275062', 'n_tokens_mistral': 1044, 'n_tokens_neox': 976, 'n_words': 319}