<commit_before>def resize_keypoint(keypoint, input_shape, output_shape):
    """Change values of keypoint according to paramters for resizing an image.

    Args:
        keypoint (~numpy.ndarray): Keypoints in the image.
            The shape of this array is :math:`(K, 2)`. :math:`K` is the number
            of keypoint in the image.
            The last dimension is composed of :math:`x` and :math:`y`
            coordinates of the keypoints.
        input_shape (tuple): A tuple of length 2. The height and the width
            of the image before resized.
        output_shape (tuple): A tuple of length 2. The height and the width
            of the image after resized.

    Returns:
        ~numpy.ndarray:
        keypoint rescaled according to the given image shapes.

    """
    keypoint = keypoint.copy()
    h_scale = float(output_shape[1]) / input_shape[1]
    v_scale = float(output_shape[0]) / input_shape[0]
    keypoint[:, 0] = h_scale * keypoint[:, 0]
    keypoint[:, 1] = v_scale * keypoint[:, 1]
    return keypoint<commit_msg>fix resize_keypoint<commit_after>def resize_keypoint(keypoint, input_shape, output_shape):
    """Change values of keypoint according to paramters for resizing an image.

    Args:
        keypoint (~numpy.ndarray): Keypoints in the image.
            The shape of this array is :math:`(K, 2)`. :math:`K` is the number
            of keypoint in the image.
            The last dimension is composed of :math:`x` and :math:`y`
            coordinates of the keypoints.
        input_shape (tuple): A tuple of length 2. The width and the height
            of the image before resized.
        output_shape (tuple): A tuple of length 2. The width and the height
            of the image after resized.

    Returns:
        ~numpy.ndarray:
        keypoint rescaled according to the given image shapes.

    """
    keypoint = keypoint.copy()
    h_scale = float(output_shape[0]) / input_shape[0]
    v_scale = float(output_shape[1]) / input_shape[1]
    keypoint[:, 0] = h_scale * keypoint[:, 0]
    keypoint[:, 1] = v_scale * keypoint[:, 1]
    return keypoint
{'fraction_non_alphanumeric': 0.09357277882797732, 'fraction_numerical': 0.010396975425330813, 'mean_word_length': 2.5760135135135136, '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': '3741646', 'n_tokens_mistral': 669, 'n_tokens_neox': 618, 'n_words': 232}