<commit_before>use tensor::Tensor;
use num::traits::cast;
use Numeric;

impl<T: Numeric> Tensor<T> {
    /// Returns a new tensor with the elements converted to the selected type.
    ///
    /// ```
    /// use numeric::Tensor;
    ///
    /// let tdouble = Tensor::new(vec![1.0f64, 2.0, 3.0]);
    /// let tsingle = tdouble.convert::<f32>();
    /// ```
    pub fn convert<D: Numeric>(&self) -> Tensor<D> {
        let mut t = Tensor::zeros(&self.shape);
        for i in 0..self.size() {
            t[i] = cast(self[i]).unwrap();
        }
        t
    }

    /// Short-hand for `convert::<f32>()`.
    pub fn to_f32(&self) -> Tensor<f32> {
        self.convert::<f32>()
    }

    /// Short-hand for `convert::<f64>()`.
    pub fn to_f65(&self) -> Tensor<f64> {
        self.convert::<f64>()
    }
}
<commit_msg>Function to_f64 accidentally called to_f65<commit_after>use tensor::Tensor;
use num::traits::cast;
use Numeric;

impl<T: Numeric> Tensor<T> {
    /// Returns a new tensor with the elements converted to the selected type.
    ///
    /// ```
    /// use numeric::Tensor;
    ///
    /// let tdouble = Tensor::new(vec![1.0f64, 2.0, 3.0]);
    /// let tsingle = tdouble.convert::<f32>();
    /// ```
    pub fn convert<D: Numeric>(&self) -> Tensor<D> {
        let mut t = Tensor::zeros(&self.shape);
        for i in 0..self.size() {
            t[i] = cast(self[i]).unwrap();
        }
        t
    }

    /// Short-hand for `convert::<f32>()`.
    pub fn to_f32(&self) -> Tensor<f32> {
        self.convert::<f32>()
    }

    /// Short-hand for `convert::<f64>()`.
    pub fn to_f64(&self) -> Tensor<f64> {
        self.convert::<f64>()
    }
}

{'fraction_non_alphanumeric': 0.2066066066066066, 'fraction_numerical': 0.034834834834834835, 'mean_word_length': 2.0794824399260627, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 31, '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': '4785175', 'n_tokens_mistral': 611, 'n_tokens_neox': 590, 'n_words': 130}