<commit_before>import math


def bng(input_lat, input_lon):
    """
    Convert lat and long to BNG
    Expects two floats as input
    Returns a tuple of Easting, Northing floats
    Accurate to ~5m

    For testing purposes:
    input: 51.44533267, -0.32824866
    output: 516275.97337480687, 173142.1442810801

    Entirely Based on code by <NAME> (CASA):
    hannahfry.co.uk/2012/02/01/converting-british-national-grid-to-latitude-and-longitude-ii/

    """
    # Simple bounds checking
    if not all([0 <= input_lat <= 90, -180 <= input_lon <= 180]):
        raise Exception(
            "input_lat should be between 0 and 90, input_lon should be between -180 and 80")<commit_msg>Fix lon and lat bounds in Python implementation<commit_after>import math


def bng(input_lat, input_lon):
    """
    Convert lat and long to BNG
    Expects two floats as input
    Returns a tuple of Easting, Northing floats
    Accurate to ~5m

    For testing purposes:
    input: 51.44533267, -0.32824866
    output: 516275.97337480687, 173142.1442810801

    Entirely Based on code by <NAME> (CASA):
    hannahfry.co.uk/2012/02/01/converting-british-national-grid-to-latitude-and-longitude-ii/

    """
    # Simple bounds checking
    if not all([-90 <= input_lat <= 90, -180 <= input_lon <= 180]):
        raise Exception(
            "input_lat should be between 0 and 90, input_lon should be between -180 and 80")
{'fraction_non_alphanumeric': 0.09588068181818182, 'fraction_numerical': 0.11150568181818182, 'mean_word_length': 2.9247910863509747, 'pattern_counts': {'":': 0, '<': 13, '<?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': '2284070', 'n_tokens_mistral': 584, 'n_tokens_neox': 454, 'n_words': 146}