<commit_before># -*- coding: utf-8 -*-

'''This module contains helper functions used by :class:`~apexpy.Apex`.'''

from __future__ import division, print_function, absolute_import

import numpy as np
import time
import datetime as dt

# constants
WGS84_e2 = 0.006694379990141317
WGS84_a = 6378.137
d2r = np.pi/180
r2d = 180/np.pi


def checklat(lat, name='lat'):
    '''Makes sure the latitude is inside [-90, 90], clipping close values (tolerance 1e-4).

    Parameters
    ==========
    lat : array_like
        latitude
    name : str, optional
        parameter name to use in the exception message

    Returns
    =======
    lat : ndarray or float
        latitude where values just outside the range have been
        clipped to [-90, 90]

    Raises
    ======
    ValueError
        if any values are too far outside the range [-90, 90]
    '''

    if np.all(np.float64(lat) >= -90) and np.all(np.float64(lat) <= 90):
        return lat
<commit_msg>rtd testing stuff<commit_after># -*- coding: utf-8 -*-

'''This module contains helper functions used by :class:`~apexpy.Apex`.'''

from __future__ import division, print_function, absolute_import

import numpy as np
import time
import datetime as dt

# constants
WGS84_e2 = 0.006694379990141317
WGS84_a = 6378.137
d2r = np.pi/180
r2d = 180/np.pi


def checklat(lat, name='lat'):
    '''Makes sure the latitude is inside [-90, 90], clipping close values (tolerance 1e-4).

    Parameters
    ==========
    lat : array_like
        latitude
    name : str, optional
        parameter name to use in the exception message

    Returns
    =======
    lat : ndarray or float
        Same as input where values just outside the range have been
        clipped to [-90, 90]

    Raises
    ======
    ValueError
        if any values are too far outside the range [-90, 90]
    '''

    if np.all(np.float64(lat) >= -90) and np.all(np.float64(lat) <= 90):
        return lat

{'fraction_non_alphanumeric': 0.11691670977754785, 'fraction_numerical': 0.06414899120538024, 'mean_word_length': 2.7553398058252427, 'pattern_counts': {'":': 0, '<': 5, '<?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': '315647', 'n_tokens_mistral': 705, 'n_tokens_neox': 598, 'n_words': 216}