<commit_before>import numpy as np


class StandardScaler(object):
    def __init__(self, mean=0.0, std=1.0):
        self.mean = mean
        self.std = std
        self._x_mean = None
        self._x_std = None

    def fit(self, x):
        self._x_mean = np.mean(x)
        self._x_std = np.std(x)

    def fit_transform(self, x, copy=True):<commit_msg>use float64 for better accuracy<commit_after>import numpy as np


class StandardScaler(object):
    def __init__(self, mean=0.0, std=1.0):
        self.mean = mean
        self.std = std
        self._x_mean = None
        self._x_std = None

    def fit(self, x):
        self._x_mean = np.mean(x, dtype=np.float64).astype(x.dtype)
        self._x_std = np.std(x, dtype=np.float64).astype(x.dtype)

    def fit_transform(self, x, copy=True):
{'fraction_non_alphanumeric': 0.12531328320802004, 'fraction_numerical': 0.017543859649122806, 'mean_word_length': 2.489082969432314, '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': '6511771', 'n_tokens_mistral': 293, 'n_tokens_neox': 285, 'n_words': 63}