zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
U
O±d¡0ã@spdZddlZddlZddlmZddlmZddlmZdd„Z    e    dd    d
d d d dddddddddddddgƒZ
dd„Z e ƒ\Z Z de ›de ›dZd d!„Zed"d#gd$ƒed%gd&ƒed'gd(ƒed)gd*ƒed+gd,ƒed-gd.ƒed/gd0ƒed1gd2ƒed3gd4ƒed5gd6ƒed7gd8ƒed9gd:ƒed;gd<ƒed=d>gd?ƒed@dAgdBƒedCdDgdEƒedFdGdHgdIƒedJdKdLgdMƒedNgdOƒedPdQgdRƒedSdTgdUƒedVgdWƒedXgdYƒedZgd[ƒed\d]d^ƒd_D]BZed\ed`dajedbfƒed\edcdde›dee›dfe›dgfƒqÞdhD]DZed\edidde›dje›dkeeƒj ¡r^dle›dmndnfƒq&dS)oz¹
This file is separate from ``_add_newdocs.py`` so that it can be mocked out by
our sphinx ``conf.py`` during doc builds, where we want to avoid showing
platform-dependent information.
éN)Údtype)Ú numerictypes)Ú
add_newdoccs‡fdd„}t|ƒƒS)Nc    3sBˆD]8\}}ztt|ƒ}Wntk
r.YqX|||fVqdS)N)ÚgetattrÚ _numerictypesÚAttributeError)ÚaliasÚdocÚ
alias_type©Úaliases©úVd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\numpy/core/_add_newdocs_scalars.pyÚtype_aliases_gens  z.numeric_type_aliases.<locals>.type_aliases_gen)Úlist)r rr r rÚnumeric_type_aliasess     r)Úint8z*8-bit signed integer (``-128`` to ``127``))Úint16z116-bit signed integer (``-32_768`` to ``32_767``))Úint32z?32-bit signed integer (``-2_147_483_648`` to ``2_147_483_647``))Úint64zW64-bit signed integer (``-9_223_372_036_854_775_808`` to ``9_223_372_036_854_775_807``))ZintpzJSigned integer large enough to fit pointer, compatible with C ``intptr_t``)Úuint8z)8-bit unsigned integer (``0`` to ``255``))Úuint16z-16-bit unsigned integer (``0`` to ``65_535``))Úuint32z432-bit unsigned integer (``0`` to ``4_294_967_295``))Úuint64zA64-bit unsigned integer (``0`` to ``18_446_744_073_709_551_615``))ZuintpzMUnsigned integer large enough to fit pointer, compatible with C ``uintptr_t``)Úfloat16zX16-bit-precision floating-point number type: sign bit, 5 bits exponent, 10 bits mantissa)Úfloat32zX32-bit-precision floating-point number type: sign bit, 8 bits exponent, 23 bits mantissa)Úfloat64zY64-bit precision floating-point number type: sign bit, 11 bits exponent, 52 bits mantissa)Zfloat96z496-bit extended-precision floating-point number type)Zfloat128z5128-bit extended-precision floating-point number type)Z    complex64zIComplex number type composed of 2 32-bit-precision floating-point numbers)Z
complex128zIComplex number type composed of 2 64-bit-precision floating-point numbers)Z
complex192zRComplex number type composed of 2 96-bit extended-precision floating-point numbers)Z
complex256zSComplex number type composed of 2 128-bit extended-precision floating-point numberscCsdzt ¡\}}}}}WnDtk
rZtj}|dkrRtj dd¡pNtj dd¡}nd}YnX||fS)NÚwin32ÚPROCESSOR_ARCHITEW6432ÚÚPROCESSOR_ARCHITECTUREÚunknown)ÚosÚunamerÚsysÚplatformÚenvironÚget)ÚsystemÚ_Úmachiner r rÚ_get_platform_and_machine6s ÿ
r+z:Alias on this platform (ú z):cs˜tt|ƒ‰tˆƒj}|ˆjkr"dn
d|›d}|rHd dd„|Dƒ¡}nd}|d ‡fdd„tDƒ¡7}d| ¡›d|›d    |›|›d}td
||ƒdS) Nrz:Canonical name: `numpy.ú`
    css|]}d|›dVqdS)z:Alias: `numpy.r-Nr )Ú.0rr r rÚ    <genexpr>Osÿz-add_newdoc_for_scalar_type.<locals>.<genexpr>c3s2|]*\}}}|ˆkrt›d|›d|›dVqdS)z `numpy.z`: z.
    N)Ú_doc_alias_string)r.r
rr    ©Úor rr/Ssÿz
    z
 
    :Character code: ``'z'``
    únumpy.core.numerictypes)    rrrÚcharÚ__name__ÚjoinÚpossible_aliasesÚstripr)ÚobjZ fixed_aliasesr    Zcharacter_codeZcanonical_name_docZ    alias_docZ    docstringr r1rÚadd_newdoc_for_scalar_typeGs.
 
 
ÿ
ÿ
ÿ
ÿýüür:Zbool_Zbool8aD
    Boolean type (True or False), stored as a byte.
 
    .. warning::
 
       The :class:`bool_` type is not a subclass of the :class:`int_` type
       (the :class:`bool_` is not even a number type). This is different
       than Python's default implementation of :class:`bool` as a
       sub-class of :class:`int`.
    Úbytez:
    Signed integer type, compatible with C ``char``.
    Úshortz;
    Signed integer type, compatible with C ``short``.
    Zintcz9
    Signed integer type, compatible with C ``int``.
    Úint_zK
    Signed integer type, compatible with Python `int` and C ``long``.
    Zlonglongz?
    Signed integer type, compatible with C ``long long``.
    ZubytezE
    Unsigned integer type, compatible with C ``unsigned char``.
    ZushortzF
    Unsigned integer type, compatible with C ``unsigned short``.
    ZuintczD
    Unsigned integer type, compatible with C ``unsigned int``.
    ZuintzE
    Unsigned integer type, compatible with C ``unsigned long``.
    Z    ulonglongzH
    Signed integer type, compatible with C ``unsigned long long``.
    Úhalfz4
    Half-precision floating-point number type.
    ÚsinglezS
    Single-precision floating-point number type, compatible with C ``float``.
    ÚdoubleZfloat_zk
    Double-precision floating-point number type, compatible with Python `float`
    and C ``double``.
    Ú
longdoubleZ    longfloatz•
    Extended-precision floating-point number type, compatible with C
    ``long double`` but not necessarily with IEEE 754 quadruple-precision.
    ZcsingleZ singlecomplexzZ
    Complex number type composed of two single-precision floating-point
    numbers.
    ZcdoubleZcfloatZcomplex_z|
    Complex number type composed of two double-precision floating-point
    numbers, compatible with Python `complex`.
    Z clongdoubleZ
clongfloatZ longcomplexz\
    Complex number type composed of two extended-precision floating-point
    numbers.
    Zobject_z
    Any Python object.
    Zstr_Zunicode_aV
    A unicode string.
 
    When used in arrays, this type strips trailing null codepoints.
 
    Unlike the builtin `str`, this supports the :ref:`python:bufferobjects`, exposing its
    contents as UCS4:
 
    >>> m = memoryview(np.str_("abc"))
    >>> m.format
    '3w'
    >>> m.tobytes()
    b'a\x00\x00\x00b\x00\x00\x00c\x00\x00\x00'
    Úbytes_Zstring_zX
    A byte string.
 
    When used in arrays, this type strips trailing null bytes.
    Zvoidaô
    np.void(length_or_data, /, dtype=None)
 
    Create a new structured or unstructured void scalar.
 
    Parameters
    ----------
    length_or_data : int, array-like, bytes-like, object
       One of multiple meanings (see notes).  The length or
       bytes data of an unstructured void.  Or alternatively,
       the data to be stored in the new scalar when `dtype`
       is provided.
       This can be an array-like, in which case an array may
       be returned.
    dtype : dtype, optional
        If provided the dtype of the new scalar.  This dtype must
        be "void" dtype (i.e. a structured or unstructured void,
        see also :ref:`defining-structured-types`).
 
       ..versionadded:: 1.24
 
    Notes
    -----
    For historical reasons and because void scalars can represent both
    arbitrary byte data and structured dtypes, the void constructor
    has three calling conventions:
 
    1. ``np.void(5)`` creates a ``dtype="V5"`` scalar filled with five
       ``\0`` bytes.  The 5 can be a Python or NumPy integer.
    2. ``np.void(b"bytes-like")`` creates a void scalar from the byte string.
       The dtype itemsize will match the byte string length, here ``"V10"``.
    3. When a ``dtype=`` is passed the call is rougly the same as an
       array creation.  However, a void scalar rather than array is returned.
 
    Please see the examples which show all three different conventions.
 
    Examples
    --------
    >>> np.void(5)
    void(b'\x00\x00\x00\x00\x00')
    >>> np.void(b'abcd')
    void(b'\x61\x62\x63\x64')
    >>> np.void((5, 3.2, "eggs"), dtype="i,d,S5")
    (5, 3.2, b'eggs')  # looks like a tuple, but is `np.void`
    >>> np.void(3, dtype=[('x', np.int8), ('y', np.int8)])
    (3, 3)  # looks like a tuple, but is `np.void`
 
    Z
datetime64a±
    If created from a 64-bit integer, it represents an offset from
    ``1970-01-01T00:00:00``.
    If created from string, the string can be in ISO 8601 date
    or datetime format.
 
    >>> np.datetime64(10, 'Y')
    numpy.datetime64('1980')
    >>> np.datetime64('1980', 'Y')
    numpy.datetime64('1980')
    >>> np.datetime64(10, 'D')
    numpy.datetime64('1970-01-11')
 
    See :ref:`arrays.datetime` for more information.
    Z timedelta64zg
    A timedelta stored as a 64-bit integer.
 
    See :ref:`arrays.datetime` for more information.
    r3Úinteger)Ú
is_integerzõ
    integer.is_integer() -> bool
 
    Return ``True`` if the number is finite with integral value.
 
    .. versionadded:: 1.22
 
    Examples
    --------
    >>> np.int64(-2).is_integer()
    True
    >>> np.uint32(5).is_integer()
    True
    )r>r?r@rAÚas_integer_ratioaÒ
        {ftype}.as_integer_ratio() -> (int, int)
 
        Return a pair of integers, whose ratio is exactly equal to the original
        floating point number, and with a positive denominator.
        Raise `OverflowError` on infinities and a `ValueError` on NaNs.
 
        >>> np.{ftype}(10.0).as_integer_ratio()
        (10, 1)
        >>> np.{ftype}(0.0).as_integer_ratio()
        (0, 1)
        >>> np.{ftype}(-.25).as_integer_ratio()
        (-1, 4)
        )ZftyperDz    
        zÞ.is_integer() -> bool
 
        Return ``True`` if the floating point number is finite with integral
        value, and ``False`` otherwise.
 
        .. versionadded:: 1.22
 
        Examples
        --------
        >>> np.z0(-2.0).is_integer()
        True
        >>> np.z)(3.2).is_integer()
        False
        ) rrrrrrrrrrrrZ    bit_countzÚ.bit_count() -> int
 
        Computes the number of 1-bits in the absolute value of the input.
        Analogous to the builtin `int.bit_count` or ``popcount`` in C++.
 
        Examples
        --------
        >>> np.z(127).bit_count()
        7z
        >>> np.z%(-127).bit_count()
        7
        r)Ú__doc__r$r"Z
numpy.corerrrZnumpy.core.function_baserrr7r+Z_systemZ_machiner0r:Z
float_nameÚformatZint_namer4Úislowerr r r rÚ<module>s
    í
ÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿ
ÿÿÿÿÿ2ÿÿ  óÿÿÿÿÿ
ÿÿ ýÿóÿ