<commit_before>from skyfield.constants import DAY_S
from skyfield.timescales import JulianDate
from datetime import datetime

one_second = 1.0 / DAY_S
epsilon = one_second * 42.0e-6  # 20.1e-6 is theoretical best precision

def test_building_JulianDate_from_single_datetime():
    jd = JulianDate(utc=datetime(1973, 12, 29, 23, 59, 48))
    assert jd.tai == 2442046.5

def test_building_JulianDate_from_list_of_datetimes():
    jd = JulianDate(utc=[
        datetime(1973, 12, 29, 23, 59, 48),
        datetime(1973, 12, 30, 23, 59, 48),
        datetime(1973, 12, 31, 23, 59, 48),
        datetime(1974, 1, 1, 23, 59, 47),<commit_msg>Confirm that UTC tuples can include array values<commit_after>import numpy as np
from skyfield.constants import DAY_S
from skyfield.timescales import JulianDate
from datetime import datetime

one_second = 1.0 / DAY_S
epsilon = one_second * 42.0e-6  # 20.1e-6 is theoretical best precision

def test_building_JulianDate_from_tuple_with_array_inside():
    seconds = np.arange(48.0, 58.0, 1.0)
    jd = JulianDate(utc=(1973, 12, 29, 23, 59, seconds))
    assert seconds.shape == jd.shape
    for i, second in enumerate(seconds):
        assert jd.tai[i] == JulianDate(utc=(1973, 12, 29, 23, 59, second)).tai

def test_building_JulianDate_from_single_datetime():
    jd = JulianDate(utc=datetime(1973, 12, 29, 23, 59, 48))
    assert jd.tai == 2442046.5

def test_building_JulianDate_from_list_of_datetimes():
    jd = JulianDate(utc=[
        datetime(1973, 12, 29, 23, 59, 48),
        datetime(1973, 12, 30, 23, 59, 48),
        datetime(1973, 12, 31, 23, 59, 48),
        datetime(1974, 1, 1, 23, 59, 47),
{'fraction_non_alphanumeric': 0.11639244363193176, 'fraction_numerical': 0.12431444241316271, 'mean_word_length': 3.9161676646706587, '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': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5304401', 'n_tokens_mistral': 762, 'n_tokens_neox': 573, 'n_words': 165}