zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
U
O±d‹ ã@sŽdZdd„edƒDƒZedd…Zedd…Zd ed    d…eedd    …¡Zd ed    d…eedd    …¡Zd
d „Zd d „Z    dd„Z
d    S)zf
String-handling utilities to avoid locale-dependence.
 
Used primarily to generate type name aliases.
cCsg|] }t|ƒ‘qS©)Úchr)Ú.0Ú_mrrúQd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\numpy/core/_string_helpers.pyÚ
<listcomp>    srééAé[éaé{ÚNcCs| t¡}|S)aï Apply English case rules to convert ASCII strings to all lower case.
 
    This is an internal utility function to replace calls to str.lower() such
    that we can avoid changing behavior with changing locales. In particular,
    Turkish has distinct dotted and dotless variants of the Latin letter "I" in
    both lowercase and uppercase. Thus, "I".lower() != "i" in a "tr" locale.
 
    Parameters
    ----------
    s : str
 
    Returns
    -------
    lowered : str
 
    Examples
    --------
    >>> from numpy.core.numerictypes import english_lower
    >>> english_lower('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_')
    'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789_'
    >>> english_lower('')
    ''
    )Ú    translateÚ LOWER_TABLE)ÚsZloweredrrrÚ english_lowers
rcCs| t¡}|S)aï Apply English case rules to convert ASCII strings to all upper case.
 
    This is an internal utility function to replace calls to str.upper() such
    that we can avoid changing behavior with changing locales. In particular,
    Turkish has distinct dotted and dotless variants of the Latin letter "I" in
    both lowercase and uppercase. Thus, "i".upper() != "I" in a "tr" locale.
 
    Parameters
    ----------
    s : str
 
    Returns
    -------
    uppered : str
 
    Examples
    --------
    >>> from numpy.core.numerictypes import english_upper
    >>> english_upper('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_')
    'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'
    >>> english_upper('')
    ''
    )r Ú UPPER_TABLE)rZupperedrrrÚ english_upper,s
rcCs$|rt|dƒ|dd…S|SdS)a, Apply English case rules to convert the first character of an ASCII
    string to upper case.
 
    This is an internal utility function to replace calls to str.capitalize()
    such that we can avoid changing behavior with changing locales.
 
    Parameters
    ----------
    s : str
 
    Returns
    -------
    capitalized : str
 
    Examples
    --------
    >>> from numpy.core.numerictypes import english_capitalize
    >>> english_capitalize('int8')
    'Int8'
    >>> english_capitalize('Int8')
    'Int8'
    >>> english_capitalize('')
    ''
    ééN)r)rrrrÚenglish_capitalizeHsr) Ú__doc__ÚrangeZ
_all_charsZ _ascii_upperZ _ascii_lowerÚjoinrrrrrrrrrÚ<module>s  ""