<commit_before>"""
This file defines the types for type annotations.

These names aren't part of the module namespace, but they are used in the
annotations in the function signatures. The functions in the module are only
valid for inputs that match the given type annotations.
"""

__all__ = ['Literal', 'Optional', 'Tuple', 'Union', 'array', 'device',
           'dtype', 'SupportsDLPack', 'SupportsBufferProtocol', 'PyCapsule']

from typing import Literal, Optional, Tuple, Union, TypeVar

import numpy as np

array = np.ndarray
device = TypeVar('device')
dtype = Literal[np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16,
                np.uint32, np.uint64, np.float32, np.float64]
SupportsDLPack = TypeVar('SupportsDLPack')
SupportsBufferProtocol = TypeVar('SupportsBufferProtocol')
PyCapsule = TypeVar('PyCapsule')<commit_msg>Use the array API types for the array API type annotations<commit_after>"""
This file defines the types for type annotations.

These names aren't part of the module namespace, but they are used in the
annotations in the function signatures. The functions in the module are only
valid for inputs that match the given type annotations.
"""

__all__ = ['Literal', 'Optional', 'Tuple', 'Union', 'array', 'device',
           'dtype', 'SupportsDLPack', 'SupportsBufferProtocol', 'PyCapsule']

from typing import Literal, Optional, Tuple, Union, TypeVar

from . import (ndarray, int8, int16, int32, int64, uint8, uint16, uint32,
               uint64, float32, float64)

array = ndarray
device = TypeVar('device')
dtype = Literal[int8, int16, int32, int64, uint8, uint16,
                uint32, uint64, float32, float64]
SupportsDLPack = TypeVar('SupportsDLPack')
SupportsBufferProtocol = TypeVar('SupportsBufferProtocol')
PyCapsule = TypeVar('PyCapsule')
{'fraction_non_alphanumeric': 0.10602678571428571, 'fraction_numerical': 0.030133928571428572, 'mean_word_length': 4.821428571428571, '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': '328402', 'n_tokens_mistral': 559, 'n_tokens_neox': 525, 'n_words': 194}