<commit_before>﻿namespace TensorSharp.Operations
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    public class DivideDoubleDoubleOperation : IBinaryOperation<double, double, double>
    {
        public Tensor<double> Evaluate(Tensor<double> tensor1, Tensor<double> tensor2)
        {
            Tensor<double> result = new Tensor<double>();

            result.SetValue(tensor1.GetValue() / tensor2.GetValue());

            return result;
        }
    }
}<commit_msg>Refactor Divide Doubles operation to use GetValues and CloneWithValues<commit_after>﻿namespace TensorSharp.Operations
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    public class DivideDoubleDoubleOperation : IBinaryOperation<double, double, double>
    {
        public Tensor<double> Evaluate(Tensor<double> tensor1, Tensor<double> tensor2)
        {
            double[] values1 = tensor1.GetValues();
            int l = values1.Length;

            double value2 = tensor2.GetValue();

            double[] newvalues = new double[l];

            for (int k = 0; k < l; k++)
                newvalues[k] = values1[k] / value2;

            return tensor1.CloneWithNewValues(newvalues);
        }
    }
}
{'fraction_non_alphanumeric': 0.09692307692307692, 'fraction_numerical': 0.011538461538461539, 'mean_word_length': 2.5840220385674932, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 13, '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': '2978236', 'n_tokens_mistral': 363, 'n_tokens_neox': 354, 'n_words': 85}