<commit_before># coding: utf-8
import numpy as np

from hrv.utils import validate_rri


def time_domain(rri):
    rri = validate_rri(rri)
    diff_rri = np.diff(rri)
    rmssd = np.sqrt(np.mean(diff_rri ** 2))
    sdnn = np.std(diff_rri, ddof=1)  # make it calculates N-1
    nn50 = sum(abs(diff_rri) > 50)
    pnn50 = nn50 / float(len(diff_rri))
    mrri = np.mean(rri)
    mhr = np.mean(60 / (rri / 1000.0))

    return dict(rmssd=rmssd, sdnn=sdnn, nn50=nn50, pnn50=pnn50,<commit_msg>Remove float from division<commit_after># coding: utf-8
import numpy as np

from hrv.utils import validate_rri


def time_domain(rri):
    rri = validate_rri(rri)
    diff_rri = np.diff(rri)
    rmssd = np.sqrt(np.mean(diff_rri ** 2))
    sdnn = np.std(diff_rri, ddof=1)  # make it calculates N-1
    nn50 = sum(abs(diff_rri) > 50)
    pnn50 = nn50 / len(diff_rri)
    mrri = np.mean(rri)
    mhr = np.mean(60 / (rri / 1000.0))

    return dict(rmssd=rmssd, sdnn=sdnn, nn50=nn50, pnn50=pnn50,
{'fraction_non_alphanumeric': 0.13701431492842536, 'fraction_numerical': 0.05521472392638037, 'mean_word_length': 3.331858407079646, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2591492', 'n_tokens_mistral': 472, 'n_tokens_neox': 431, 'n_words': 90}