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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
Ë
Kñúhà“ãó —dZddlZddlZddlmZddlmZddlmZddl    m
Z ddl    m Z dd    lmZgd
¢Ze j"Zd d d d d d ddd d d ddddœZe j&Zed«d„«Zed«Gd„d««ZGd„de j.«Zed«Gd„de««Zd„Zed«        d d„«Zed«        d d„«Zed«        d!d„«Zd„Zed«        d!d„«Zed«        d"d„«Z y)#z<
This module contains a set of functions for record arrays.
éN)ÚCounter)Ú nullcontext)Ú
set_moduleé)Únumeric)Ú numerictypes)Ú_get_legacy_print_mode)    ÚrecordÚrecarrayÚ format_parserÚ
fromarraysÚ fromrecordsÚ
fromstringÚfromfileÚarrayÚfind_duplicateú>ú<ú=Úsú|)ÚbÚlÚnÚBÚLÚNÚSrrrrrÚIÚiz    numpy.reccóp—t|«j«Dcgc] \}}|dkDr|‘Œc}}Scc}}w)z@Find duplication in a list, return a list of duplicated elementsr)rÚitems)ÚlistÚitemÚcountss   úFH:\Change_password\venv_build\Lib\site-packages\numpy/_core/records.pyrr/s<€ô
$ D›M×/Ñ/Ó1÷ á ˆD&Ø AŠ:ò     ó ðùó s2có,—eZdZdZdd„Zdd„Zd„Zd„Zy)    r aˆ
    Class to convert formats, names, titles description to a dtype.
 
    After constructing the format_parser object, the dtype attribute is
    the converted data-type:
    ``dtype = format_parser(formats, names, titles).dtype``
 
    Attributes
    ----------
    dtype : dtype
        The converted data-type.
 
    Parameters
    ----------
    formats : str or list of str
        The format description, either specified as a string with
        comma-separated format descriptions in the form ``'f8, i4, S5'``, or
        a list of format description strings  in the form
        ``['f8', 'i4', 'S5']``.
    names : str or list/tuple of str
        The field names, either specified as a comma-separated string in the
        form ``'col1, col2, col3'``, or as a list or tuple of strings in the
        form ``['col1', 'col2', 'col3']``.
        An empty list can be used, in that case default field names
        ('f0', 'f1', ...) are used.
    titles : sequence
        Sequence of title strings. An empty list can be used to leave titles
        out.
    aligned : bool, optional
        If True, align the fields by padding as the C-compiler would.
        Default is False.
    byteorder : str, optional
        If specified, all the fields will be changed to the
        provided byte-order.  Otherwise, the default byte-order is
        used. For all available string specifiers, see `dtype.newbyteorder`.
 
    See Also
    --------
    numpy.dtype, numpy.typename
 
    Examples
    --------
    >>> import numpy as np
    >>> np.rec.format_parser(['<f8', '<i4'], ['col1', 'col2'],
    ...                      ['T1', 'T2']).dtype
    dtype([(('T1', 'col1'), '<f8'), (('T2', 'col2'), '<i4')])
 
    `names` and/or `titles` can be empty lists. If `titles` is an empty list,
    titles will simply not appear. If `names` is empty, default field names
    will be used.
 
    >>> np.rec.format_parser(['f8', 'i4', 'a5'], ['col1', 'col2', 'col3'],
    ...                      []).dtype
    dtype([('col1', '<f8'), ('col2', '<i4'), ('col3', '<S5')])
    >>> np.rec.format_parser(['<f8', '<i4', '<a5'], [], []).dtype
    dtype([('f0', '<f8'), ('f1', '<i4'), ('f2', 'S5')])
 
    Ncón—|j||«|j||«|j|«y©N)Ú _parseFormatsÚ_setfieldnamesÚ _createdtype)ÚselfÚformatsÚnamesÚtitlesÚalignedÚ    byteorders      r&Ú__init__zformat_parser.__init__vs0€Ø ×ј7 GÔ,Ø ×јE 6Ô*Ø ×ј)Õ$ócó—|€ td«‚t|t«r8tjt |«Dcgc] \}}d|›|f‘Œc}}|«}ntj||«}|j }|€%tjd|fg|«}|j }|j}|Dcgc]
}||d‘Œ c}|_|Dcgc]
}||d‘Œ c}|_    t|«|_ ycc}}wcc}wcc}w)z Parse the field formats NzNeed formats argumentÚfÚf1rr) Ú
ValueErrorÚ
isinstancer#ÚsbÚdtypeÚ    enumerateÚfieldsr/Ú
_f_formatsÚ_offsetsÚlenÚ_nfields)    r-r.r1r Úformat_r;r=ÚkeysÚkeys             r&r*zformat_parser._parseFormats{sò€ð ˆ?ÜÐ4Ó5Ð 5Ü gœtÔ $Ü—H‘Hô'0°Ó&8÷á"˜˜7𘘐W˜gÒ&óðó ‰Eô—H‘H˜W gÓ.ˆEØ—‘ˆØ ˆ>Ü—H‘H˜t U˜m˜_¨gÓ6ˆEØ—\‘\ˆF؏{‰{ˆØ59Ö:¨c˜6 #™; q›>Ò:ˆŒØ37Ö8¨C˜ ™ Q›Ò8ˆŒ ܘD›    ˆ ùóùò;ùÚ8s»C2
Â/C8Ã
C=có$—|r‚t|«ttfvrn9t|t«r|j d«}nt dt|«›«‚|d|jDcgc]}|j«‘Œc}|_
ng|_
|xjtt|j«|j«Dcgc]}d|z‘Œ    c}z c_
t|j«}|rtd|›«‚|r1|d|jDcgc]}|j«‘Œc}|_n    g|_g}|jt|«kDr0|xjdg|jt|«z
zz c_yycc}wcc}wcc}w)zQconvert input field names into a list and assign to the _names
        attribute ú,zillegal input names Nzf%dzDuplicate field names: )Útyper#Útupler9ÚstrÚsplitÚ    NameErrorÚreprrAÚstripÚ_namesÚranger@rr8Ú_titles)r-r/r0rr Ú_dups      r&r+zformat_parser._setfieldnames“sT€ñ ܐE‹{œt¤U˜mÑ+ØÜ˜E¤3Ô'ØŸ ™  CÓ(‘äÐ"6´t¸E³{°mРDÓEÐEà.3°N°T·]±]Ð.CÖD¨˜1Ÿ7™79ÒDˆDKàˆDŒKð       Š ¬5´°T·[±[Ó1AØ15·±ó,@öA a˜ ›    òAñ    A ô˜dŸk™kÓ*ˆÙ ÜÐ6°t°fÐ=Ó>Ð >á Ø/5°n°t·}±}Ð/EÖF¨!˜AŸG™GIÒFˆDLàˆDŒL؈Fà =‰=œ3˜v›;Ò &Ø LŠL˜T˜F d§m¡m´c¸&³kÑ&AÑBÑ BŽLð 'ùò+EùòAùòGsÁ%Fà FÄF cóԗtj|j|j|j|j
dœ«}|t |d}|j|«}||_y)N)r/r.Úoffsetsr0r)r:r;rNr>r?rPÚ_byteorderconvÚ newbyteorder)r-r2r;s   r&r,zformat_parser._createdtype·s^€Ü—‘Ø—[‘[Ø—‘Ø—}‘}Ø—l‘lñ    
ó ˆð Ð  Ü& y°¡|Ñ4ˆIØ×&Ñ& yÓ1ˆEàˆ
r4)FN)F)Ú__name__Ú
__module__Ú __qualname__Ú__doc__r3r*r+r,©r4r&r r 9s„ñ9óv%ó
"ò0"CóH r4r cóL‡—eZdZdZdZdZˆfd„Zˆfd„Zd„Zd„Zd„Zd„Z    ˆxZ
S)    r
zEA data-type scalar that allows field access as attribute lookup.
    ÚnumpycóZ•—t«dkr|j«St‰| «S©Néq)r    Ú__str__ÚsuperÚ__repr__©r-Ú    __class__s €r&rbzrecord.__repr__Îs(ø€Ü !Ó # sÒ *Ø—<‘<“>Ð !܉wÑÓ!Ð!r4cól•—t«dkrt|j««St‰|«Sr^)r    rIr$rar`rcs €r&r`zrecord.__str__Ós,ø€Ü !Ó # sÒ *ܐt—y‘y“{Ó#Ð #܉w‰Ó Ð r4có—|dvr tjj||«S    tjj||«S#t$rYnwxYwtjj|d«j}|j |d«}|rf|j |ddŽ}    |j}n#t$r|cYSwxYw|j'|j|j|jf«S|Std|›d«‚)N©ÚsetfieldÚgetfieldr;r;éú"'record' object has no attribute 'ú') ÚntÚvoidÚ__getattribute__ÚAttributeErrorr=Úgetrir;r/Úviewrd)r-ÚattrÚ    fielddictÚresÚobjÚdts      r&rozrecord.__getattribute__Øsù€Ø Ð4Ñ 4Ü—7‘7×+Ñ+¨D°$Ó7Ð 7ð    Ü—7‘7×+Ñ+¨D°$Ó7Ð 7øÜò    Ù ð    úä—G‘G×,Ñ,¨T°7Ó;×BÑBˆ    Øm‰m˜D $Ó'ˆÙ ؐ$—-‘-  R a Ð)ˆCð Ø—Y‘Y‘øÜ!ò à’
ð úðx‰xÐ#Ø—x‘x §¡°·±Р;Ó<Ð<؈Jä Ð#EÀdÀVÈ1Ð!MÓNÐ Ns#¦AÁ    AÁAÂ& B3Â3 CÃCcóJ—|dvrtd|›d«‚tjj|d«j}|j |d«}|r|j |g|dd¢­ŽSt||d«r!tjj|||«Std|›d«‚)Nrgz Cannot set 'z ' attributer;rjrkrl)    rprmrnror=rqrhÚgetattrÚ __setattr__)r-rsÚvalrtrus     r&rzzrecord.__setattr__ðs¤€Ø Ð4Ñ 4Ü  <°¨v°[Ð!AÓBÐ BÜ—G‘G×,Ñ,¨T°7Ó;×BÑBˆ    Øm‰m˜D $Ó'ˆÙ Ø 4—=‘= Ð/ s¨2¨A wÒ/Ð /Ü T˜4 Ô &Ü—7‘7×&Ñ& t¨T°3Ó7Ð 7ä Ð#EÀdÀVÈ1Ð!MÓNÐ Nr4cóô—tjj||«}t|tj«r=|jj
'|j |j|jf«S|Sr))rmrnÚ __getitem__r9r;r/rrrd)r-Úindxrvs   r&r}zrecord.__getitem__üsX€Üg‰g×!Ñ! $¨Ó-ˆô cœ2Ÿ7™7Ô #¨¯    ©    ¯©Ð(CØ—8‘8˜TŸ^™^¨S¯Y©YÐ7Ó8Ð 8ðˆJr4c    óė|jj}td„|D««}d|z}|Dcgc]}||t||«fz‘Œ}}dj    |«Scc}w)zPretty-print all fields.c3ó2K—|]}t|«–—Œy­wr))r@)Ú.0Únames  r&ú    <genexpr>z record.pprint.<locals>.<genexpr>
sèø€Ò1 4”S˜—YÑ1ùs‚z %% %ds: %%sú
)r;r/ÚmaxryÚjoin)r-r/ÚmaxlenÚfmtr‚Úrowss      r&Úpprintz record.pprintse€ð—
‘
× Ñ ˆÜÑ1¨5Ô1Ó1ˆØ˜fÑ$ˆØ>CÖD°dtœW T¨4Ó0Ð1Ó1ÐDˆÐD؏y‰y˜‹ÐùòEs²A) rVrWrXrYrbr`rorzr}rŠÚ __classcell__©rds@r&r
r
Ås4ø„ñð
€HØ€Jô"ô
!ò
Oò0
Oòör4r
cóP‡—eZdZdZ            d    d„Zd„Zd„Zd„Zˆfd„Zd„Z    d
d„Z
ˆxZ S) r aSConstruct an ndarray that allows field access using attributes.
 
    Arrays may have a data-types containing fields, analogous
    to columns in a spread sheet.  An example is ``[(x, int), (y, float)]``,
    where each entry in the array is a pair of ``(int, float)``.  Normally,
    these attributes are accessed using dictionary lookups such as ``arr['x']``
    and ``arr['y']``.  Record arrays allow the fields to be accessed as members
    of the array, using ``arr.x`` and ``arr.y``.
 
    Parameters
    ----------
    shape : tuple
        Shape of output array.
    dtype : data-type, optional
        The desired data-type.  By default, the data-type is determined
        from `formats`, `names`, `titles`, `aligned` and `byteorder`.
    formats : list of data-types, optional
        A list containing the data-types for the different columns, e.g.
        ``['i4', 'f8', 'i4']``.  `formats` does *not* support the new
        convention of using types directly, i.e. ``(int, float, int)``.
        Note that `formats` must be a list, not a tuple.
        Given that `formats` is somewhat limited, we recommend specifying
        `dtype` instead.
    names : tuple of str, optional
        The name of each column, e.g. ``('x', 'y', 'z')``.
    buf : buffer, optional
        By default, a new array is created of the given shape and data-type.
        If `buf` is specified and is an object exposing the buffer interface,
        the array will use the memory from the existing buffer.  In this case,
        the `offset` and `strides` keywords are available.
 
    Other Parameters
    ----------------
    titles : tuple of str, optional
        Aliases for column names.  For example, if `names` were
        ``('x', 'y', 'z')`` and `titles` is
        ``('x_coordinate', 'y_coordinate', 'z_coordinate')``, then
        ``arr['x']`` is equivalent to both ``arr.x`` and ``arr.x_coordinate``.
    byteorder : {'<', '>', '='}, optional
        Byte-order for all fields.
    aligned : bool, optional
        Align the fields in memory as the C-compiler would.
    strides : tuple of ints, optional
        Buffer (`buf`) is interpreted according to these strides (strides
        define how many bytes each array element, row, column, etc.
        occupy in memory).
    offset : int, optional
        Start reading buffer (`buf`) from this offset onwards.
    order : {'C', 'F'}, optional
        Row-major (C-style) or column-major (Fortran-style) order.
 
    Returns
    -------
    rec : recarray
        Empty array of the given shape and type.
 
    See Also
    --------
    numpy.rec.fromrecords : Construct a record array from data.
    numpy.record : fundamental data-type for `recarray`.
    numpy.rec.format_parser : determine data-type from formats, names, titles.
 
    Notes
    -----
    This constructor can be compared to ``empty``: it creates a new record
    array but does not fill it with data.  To create a record array from data,
    use one of the following methods:
 
    1. Create a standard ndarray and convert it to a record array,
       using ``arr.view(np.recarray)``
    2. Use the `buf` keyword.
    3. Use `np.rec.fromrecords`.
 
    Examples
    --------
    Create an array with two fields, ``x`` and ``y``:
 
    >>> import numpy as np
    >>> x = np.array([(1.0, 2), (3.0, 4)], dtype=[('x', '<f8'), ('y', '<i8')])
    >>> x
    array([(1., 2), (3., 4)], dtype=[('x', '<f8'), ('y', '<i8')])
 
    >>> x['x']
    array([1., 3.])
 
    View the array as a record array:
 
    >>> x = x.view(np.recarray)
 
    >>> x.x
    array([1., 3.])
 
    >>> x.y
    array([2, 4])
 
    Create a new, empty record array:
 
    >>> np.recarray((2,),
    ... dtype=[('x', int), ('y', float), ('z', int)]) #doctest: +SKIP
    rec.array([(-1073741821, 1.2249118382103472e-301, 24547520),
           (3471280, 1.2134086255804012e-316, 0)],
          dtype=[('x', '<i4'), ('y', '<f8'), ('z', '<i4')])
 
    c     óò—|tj|«} nt||||
|    «j} |€!tj    ||t
| f| ¬«} | Stj    ||t
| f|||| ¬«} | S)N)Úorder)ÚbufferÚoffsetÚstridesr)r:r;r ÚndarrayÚ__new__r
)ÚsubtypeÚshaper;Úbufr‘r’r.r/r0r2r1rÚdescrr-s              r&r”zrecarray.__new__ƒs’€ð Ð Ü—H‘H˜U“O‰Eä!ؘ ¨°óç‰eð ð ˆ;Ü—?‘?ؘ¤¨ °uð#óˆDðˆ ô    —?‘?ؘ¤¨ ¸Ø w°eð#óˆDðˆ r4cóŽ—|jjtur)|jj|j|_yyyr))r;rGr
r/)r-rvs  r&Ú__array_finalize__zrecarray.__array_finalize__™s7€Ø :‰:?‰?¤&Ñ (¨T¯Z©Z×-=Ñ-=Ð-I🙈DJð.JÐ (r4có&—    tj||«S#t$rYnwxYwtj|d«j}    ||dd}n&#t
t f$r}td|›«|‚d}~wwxYw|j|Ž}|jjbt|jjtj«r2|j|jj|jf¬«S|S|jt«S)Nr;rjzrecarray has no attribute ©r;)Úobjectrorpr“r=Ú    TypeErrorÚKeyErrorrir;r/Ú
issubclassrGrmrnrr)r-rsrtruÚervs      r&rozrecarray.__getattribute__Ÿsô€ð    Ü×*Ñ*¨4°Ó6Ð 6øÜò    Ù ð    úô×,Ñ,¨T°7Ó;×BÑBˆ    ð    MؘD‘/ " 1Ð%‰CøÜœ8Ð$ò    MÜ Ð#=¸d¸VÐ!DÓEÈ1Ð Lûð    Múàˆdm‰m˜SÐ!ˆð 9‰9?‰?Ð &ܘ#Ÿ)™)Ÿ.™.¬"¯'©'Ô2Ø—x‘x t§z¡z§¡¸¿    ¹    Ð&BxÓCÐC؈Jà—8‘8œGÓ$Ð $s$‚˜    $£$ÁAÁA4Á A/Á/A4cóŠ—|dk(rKt|jtj«r'|jt j t|f«}||jv}    tj|||«}tj|d«jxsi}||vr|S|r    tj||«    ||dd}|j&|g|¢­ŽS#t$r|cYSwxYw#t$r,tj|d«jxsi}||vr‚YŒawxYw#t t"f$r}t%d|›«|‚d}~wwxYw)Nr;rjzrecord array has no attribute )r rGrmrnr/r:r;r
Ú__dict__rrzr“ror=Ú __delattr__Ú    ExceptionržrŸrprh)r-rsr{ÚnewattrÚretrtrur¡s        r&rzzrecarray.__setattr__ÁsT€ð
GŠOÜ s—x‘x¤§¡Ô )Ø I‰IÐ !ä—(‘(œF C˜=Ó)ˆCà˜dŸm™mÐ+ˆð    Ü×$Ñ$ T¨4°Ó5ˆCô  ×0Ñ0°°wÓ?×FÑFÒLÈ"ˆIؘ9Ñ$ؐ
ÙðÜ×&Ñ& t¨TÔ2ð    Ø˜D‘/ " 1Ð%ˆCð
ˆt}‰}˜SÐ' 3Ò'Ð'øô!òØ’Jðûôò    Ü×0Ñ0°°wÓ?×FÑFÒLÈ"ˆIؘ9Ñ$Øñ%ð    ûô"œ8Ð$ò    Ü Ø0°°Ð7óàð ûð    ús<Á C'Â$CÂ;Dà C$Ã#C$Ã'2DÄDÄEÄ.D=Ä=Ecó–•—t‰||«}t|t«r¨|jj
||j t|««}t|jjtj«r2|j |jj|jf¬«S|S|j t¬«S|S)Nrœ)rG) rar}r9r“r;r/rrrGr rmrn)r-r~rvrds   €r&r}zrecarray.__getitem__æs“ø€Ü‰gÑ! $Ó'ˆô cœ7Ô #؏y‰y‰Ð*Ø—h‘hœt D›zÓ*Ü˜cŸi™iŸn™n¬b¯g©gÔ6ØŸ8™8¨4¯:©:¯?©?¸C¿I¹IÐ*F˜8ÓGÐGؐ
à—x‘x¤WxÓ-Ð-ðˆJr4có$—|j}|jjtus.t|jjtj
«s<|jtur%t jtj
|f«}d}d}nd}d}|jdkDs|jdk(rt j|d|d¬    «}nd
t|j«›}d d t|«zz}t«d krd |z}||||fzS)Nz
rec.array(zrec.array(%s,%sdtype=%s)zarray(z)array(%s,%sdtype=%s).view(numpy.recarray)r)rz, rF)Ú    separatorÚprefixÚsuffixz
[], shape=r„ú r_) r;rGr
r rmrnr:Úsizer–Ú array2stringrLr@r    )r-Ú
repr_dtyper«rˆÚlstÚlfs      r&rbzrecarray.__repr__÷sí€à—Z‘Zˆ
à J‰JO‰OœvÑ %ܘ4Ÿ:™:Ÿ?™?¬B¯G©GÔ4ð‰¤&Ñ(ÜŸX™X¤r§w¡w°
Ð&;Ó<
Ø!ˆFØ,‰Cð
ˆFØ=ˆCð 9‰9qŠ=˜DŸJ™J¨$Ò.Ü—/‘/Ø ¨V¸CôA‰Cðœt D§J¡JÓ/Ð0Ð1ˆCà Cœ#˜f›+Ñ%Ñ %ˆÜ !Ó # sÒ *ؐr‘ˆBؐc˜2˜zÐ*Ñ*Ð*r4có^—t|t«r%tj|d«j}||}tj|d«j
}||dd}|€<|j |Ž}|jj|S|jt«S|j|g|¢­ŽS)Nr;rj)
r9Úintr“ror/r=rir;rrrh)r-rsr{r/rtrurvs       r&Úfieldzrecarray.fields¢€Ü dœCÔ  Ü×,Ñ,¨T°7Ó;×AÑAˆEؘ‘;ˆDä×,Ñ,¨T°7Ó;×BÑBˆ    à˜‰o˜b˜qÐ!ˆà ˆ;ؐ$—-‘- Ð%ˆC؏y‰y‰Ð*ؐ
Ø—8‘8œGÓ$Ð $ࠐ4—=‘= Ð+ sÒ+Ð +r4)
NNrNNNNNFÚCr)) rVrWrXrYr”ršrorzr}rbrµr‹rŒs@r&r r s=ø„ñgðRIMØ15Ø58óò,$ò %òD#(ôJò""+÷H,r4r cóJ—|dk(rtjdtd¬«y|S)Nrz¹Passing `shape=0` to have the shape be inferred is deprecated, and in future will be equivalent to `shape=(0,)`. To infer the shape and suppress this warning, pass `shape=None` instead.é©Ú
stacklevel)ÚwarningsÚwarnÚ FutureWarning)r–s r&Ú_deprecate_shape_0_as_Noner¾-s,€Ø ‚z܏ ‰ ð Nô  aõ        )ð
àˆ r4cóÖ—|Dcgc]}tj|«‘Œ}}t|«}|€|dj}nt    |t
«r|f}|€|€|D    cgc]}    |    j ‘Œ}}    |tj |«}
nt|||||«j }
|
j} t|
«t|«k7r td«‚|
dj} t| «} | dkDr|d| }t||
«}t|«D]Q\}}    |
|j} |    jd|    j| z
}| |}||k7rtd|›d|›d«‚|    ||<ŒS|Scc}wcc}    w)a¨Create a record array from a (flat) list of arrays
 
    Parameters
    ----------
    arrayList : list or tuple
        List of array-like objects (such as lists, tuples,
        and ndarrays).
    dtype : data-type, optional
        valid dtype for all arrays
    shape : int or tuple of ints, optional
        Shape of the resulting array. If not provided, inferred from
        ``arrayList[0]``.
    formats, names, titles, aligned, byteorder :
        If `dtype` is ``None``, these arguments are passed to
        `numpy.rec.format_parser` to construct a dtype. See that function for
        detailed documentation.
 
    Returns
    -------
    np.recarray
        Record array consisting of given arrayList columns.
 
    Examples
    --------
    >>> x1=np.array([1,2,3,4])
    >>> x2=np.array(['a','dd','xyz','12'])
    >>> x3=np.array([1.1,2,3,4])
    >>> r = np.rec.fromarrays([x1,x2,x3],names='a,b,c')
    >>> print(r[1])
    (2, 'dd', 2.0) # may vary
    >>> x1[1]=34
    >>> r.a
    array([1, 2, 3, 4])
 
    >>> x1 = np.array([1, 2, 3, 4])
    >>> x2 = np.array(['a', 'dd', 'xyz', '12'])
    >>> x3 = np.array([1.1, 2, 3,4])
    >>> r = np.rec.fromarrays(
    ...     [x1, x2, x3],
    ...     dtype=np.dtype([('a', np.int32), ('b', 'S3'), ('c', np.float32)]))
    >>> r
    rec.array([(1, b'a', 1.1), (2, b'dd', 2. ), (3, b'xyz', 3. ),
               (4, b'12', 4. )],
              dtype=[('a', '<i4'), ('b', 'S3'), ('c', '<f4')])
    Nrz>mismatch between the number of fields and the number of arrayszarray-shape mismatch in array z ("z"))r:Úasarrayr¾r–r9r´r;r r/r@r8r r<Úndim)Ú    arrayListr;r–r.r/r0r1r2Úxrvr˜rNÚd0ÚnnÚ_arrayÚkÚ    testshaper‚s                  r&r r 9s‰€ðb)2Ö2 1”—‘˜A•Ð2€IÐ2ô ' uÓ -€Eà €}ؘ!‘ ×"Ñ"‰Ü    Eœ3Ô    Øˆà€˜5˜=ð)2Ö2 3—9“9Ð2ˆÐ2à ÐÜ—‘˜“‰ä˜g u¨f°g¸yÓI×OÑOˆØ [‰[€Fô ˆ5ƒz”S˜“^Ò#Üð+ó,ð    ,ð
ˆq‰‰€BÜ     ˆR‹€BØ    ˆA‚vؐd˜s ˆä e˜UÓ #€Fô˜IÓ&ò‰ˆˆ3Ø 1‰X]‰]ˆØ—I‘I˜n˜sŸx™x¨"™}Ð-ˆ    Øa‰yˆØ ˜Ò ÜÐ=¸a¸SÀÀDÀ6ÈÐLÓMÐ MàˆˆtŠ ðð €MùòW3ùò3s …E!ÁE&c    ó^—|€z|€xtj|t¬«}t|jd«D    cgc]*}    tj|d|    fj ««‘Œ,}
}    t |
||||||¬«S|tjt|f«} nt|||||«j}     tj|| ¬«} || j|k7r|| _    | j-t «}|Scc}    w#ttf$rœt|«}|€ t|«}t|t«r|f}t|«dkDr td«‚t!|| «} t| j"«D]}t%||«| |<Œt'j(dt*d¬    «| cYSwxYw)
aCreate a recarray from a list of records in text form.
 
    Parameters
    ----------
    recList : sequence
        data in the same field may be heterogeneous - they will be promoted
        to the highest data type.
    dtype : data-type, optional
        valid dtype for all arrays
    shape : int or tuple of ints, optional
        shape of each array.
    formats, names, titles, aligned, byteorder :
        If `dtype` is ``None``, these arguments are passed to
        `numpy.format_parser` to construct a dtype. See that function for
        detailed documentation.
 
        If both `formats` and `dtype` are None, then this will auto-detect
        formats. Use list of tuples rather than list of lists for faster
        processing.
 
    Returns
    -------
    np.recarray
        record array consisting of given recList rows.
 
    Examples
    --------
    >>> r=np.rec.fromrecords([(456,'dbe',1.2),(2,'de',1.3)],
    ... names='col1,col2,col3')
    >>> print(r[0])
    (456, 'dbe', 1.2)
    >>> r.col1
    array([456,   2])
    >>> r.col2
    array(['dbe', 'de'], dtype='<U3')
    >>> import pickle
    >>> pickle.loads(pickle.dumps(r))
    rec.array([(456, 'dbe', 1.2), (  2, 'de', 1.3)],
              dtype=[('col1', '<i8'), ('col2', '<U3'), ('col3', '<f8')])
    rœéÿÿÿÿ.)r.r–r/r0r1r2rzCan only deal with 1-d array.zxfromrecords expected a list of tuples, may have received a list of lists instead. In the future that will raise an errorrjr¹)r:rrrOr–Útolistr r;r
r ržr8r¾r@r9r´r r®rHr»r¼r½rr)ÚrecListr;r–r.r/r0r1r2rvr Úarrlistr˜ÚretvalrÆrÇrus                r&rr˜sª€ðX€˜5˜=܏h‰hw¤fÔ-ˆä49¸#¿)¹)ÀB¹-Ó4Hö
Ø/0ŒBH‰HS˜˜a˜‘[×'Ñ'Ó)Õ *ð
ˆð
ô˜'¨7¸%ÀuØ!'°ÀIôOð    Oð ÐÜ—‘œ& %˜Ó)‰äØ U˜F G¨Yó
ç
‰%ð    ð!Ü—‘˜'¨Ô/ˆð* Ð  §¡°Ò!6Ø ˆFLà
+‰+”hÓ
€Cà €JùòQ
øô ”zÐ "òä*¨5Ó1ˆØ ˆ=ܘ“LˆEÜ eœSÔ !ؐHˆEÜ ˆu‹:˜Š>ÜÐ<Ó=Ð =ܘ% Ó'ˆÜv—{‘{Ó#ò    *ˆAܘg a™jÓ)ˆF1ŠIð    *ô     ‰ ð Gä  aõ    )ðŠ ð%úsº/C<Â5DÄB(F,Æ+F,c    óü—|€ |€ td«‚|tj|«}    nt|||||«j}    |    j}
t |«}|dvrt |«|z
|
z}t||    ||¬«} | S)aÜCreate a record array from binary data
 
    Note that despite the name of this function it does not accept `str`
    instances.
 
    Parameters
    ----------
    datastring : bytes-like
        Buffer of binary data
    dtype : data-type, optional
        Valid dtype for all arrays
    shape : int or tuple of ints, optional
        Shape of each array.
    offset : int, optional
        Position in the buffer to start reading from.
    formats, names, titles, aligned, byteorder :
        If `dtype` is ``None``, these arguments are passed to
        `numpy.format_parser` to construct a dtype. See that function for
        detailed documentation.
 
 
    Returns
    -------
    np.recarray
        Record array view into the data in datastring. This will be readonly
        if `datastring` is readonly.
 
    See Also
    --------
    numpy.frombuffer
 
    Examples
    --------
    >>> a = b'\x01\x02\x03abc'
    >>> np.rec.fromstring(a, dtype='u1,u1,u1,S3')
    rec.array([(1, 2, 3, b'abc')],
            dtype=[('f0', 'u1'), ('f1', 'u1'), ('f2', 'u1'), ('f3', 'S3')])
 
    >>> grades_dtype = [('Name', (np.str_, 10)), ('Marks', np.float64),
    ...                 ('GradeLevel', np.int32)]
    >>> grades_array = np.array([('Sam', 33.3, 3), ('Mike', 44.4, 5),
    ...                         ('Aadi', 66.6, 6)], dtype=grades_dtype)
    >>> np.rec.fromstring(grades_array.tobytes(), dtype=grades_dtype)
    rec.array([('Sam', 33.3, 3), ('Mike', 44.4, 5), ('Aadi', 66.6, 6)],
            dtype=[('Name', '<U10'), ('Marks', '<f8'), ('GradeLevel', '<i4')])
 
    >>> s = '\x01\x02\x03abc'
    >>> np.rec.fromstring(s, dtype='u1,u1,u1,S3')
    Traceback (most recent call last):
       ...
    TypeError: a bytes-like object is required, not 'str'
    z2fromstring() needs a 'dtype' or 'formats' argument)NrÊ)r—r‘)ržr:r;r Úitemsizer¾r@r ) Ú
datastringr;r–r‘r.r/r0r1r2r˜rÐrÆs             r&rrñsŠ€ðp €}˜˜ÜÐLÓMÐMà ÐÜ—‘˜“‰ä˜g u¨f°g¸yÓI×OÑOˆà~‰~€Hô ' uÓ -€Eà 
ÑܐZ“ 6Ñ)¨hÑ6ˆä e˜U¨
¸6Ô B€FØ €Mr4cóÀ—|j«}    |jdd«|j«|z
|j|d«S#|j|d«wxYw)Nrrj)ÚtellÚseek)ÚfdÚposs  r&Úget_remaining_sizer×<sG€Ø
'‰'‹)€CðØ
‰1Œ ؏w‰w‹y˜3‰à
‰Qøˆ‰Qús ’$A    Á    Ac    óœ—|€ |€ td«‚t|«}|€d}nt|t«r|f}t    |d«r t |«}    nt tj|«d«}    |    5}|dkDr|j|d«t|«}
|tj|«} nt|||||«j} | j} tj|«j!t"j$¬«} | | z}|dkrat'|«}|
| z||j)d    «<t+|«}tj|«j!t"j$¬«} | | z}||
kDr t-d
«‚t/|| «}|j1|j2«}||k7r t5d «‚    ddd«|S#1swYSxYw) aCreate an array from binary file data
 
    Parameters
    ----------
    fd : str or file type
        If file is a string or a path-like object then that file is opened,
        else it is assumed to be a file object. The file object must
        support random access (i.e. it must have tell and seek methods).
    dtype : data-type, optional
        valid dtype for all arrays
    shape : int or tuple of ints, optional
        shape of each array.
    offset : int, optional
        Position in the file to start reading from.
    formats, names, titles, aligned, byteorder :
        If `dtype` is ``None``, these arguments are passed to
        `numpy.format_parser` to construct a dtype. See that function for
        detailed documentation
 
    Returns
    -------
    np.recarray
        record array consisting of data enclosed in file.
 
    Examples
    --------
    >>> from tempfile import TemporaryFile
    >>> a = np.empty(10,dtype='f8,i4,a5')
    >>> a[5] = (0.5,10,'abcde')
    >>>
    >>> fd=TemporaryFile()
    >>> a = a.view(a.dtype.newbyteorder('<'))
    >>> a.tofile(fd)
    >>>
    >>> _ = fd.seek(0)
    >>> r=np.rec.fromfile(fd, formats='f8,i4,a5', shape=10,
    ... byteorder='<')
    >>> print(r[5])
    (0.5, 10, b'abcde')
    >>> r.shape
    (10,)
    Nz0fromfile() needs a 'dtype' or 'formats' argument)rÊÚreadintoÚrbrrrœrÊz;Not enough bytes left in file for specified shape and type.z%Didn't read as many bytes as expected)ržr¾r9r´ÚhasattrrÚopenÚosÚfspathrÔr×r:r;r rÐrÚprodrmÚintpr#ÚindexrHr8r rÙÚdataÚOSError)rÕr;r–r‘r.r/r0r1r2Úctxr®r˜rÐÚ    shapeprodÚ    shapesizeÚnbytesrÆÚ
nbytesreads                  r&rrEsÆ€ð\ €}˜˜ÜÐJÓKÐKô ' uÓ -€Eà €}؉ܠ   Eœ3Ô    Øˆäˆr:Ôô˜"‹o‰ô”2—9‘9˜R“= $Ó'ˆà     ð"CØ AŠ:Ø G‰GF˜AÔ Ü! "Ó%ˆà Ð Ü—H‘H˜U“O‰Eä!ؘ ¨°óç‰eð ð—>‘>ˆä—H‘H˜U“O×(Ñ(¬r¯w©wÐ(Ó7ˆ    Ø Ñ(ˆ    Ø qŠ=ܘ“KˆEØ%)¨i¨ZÑ%7ˆE%—+‘+˜b“/Ñ "ܘ%“LˆEÜŸ™ ›×,Ñ,´2·7±7Ð,Ó;ˆIà˜XÑ%ˆà DŠ=Üð&óð ô ˜% Ó'ˆØ—[‘[ §¡Ó-ˆ
Ø ˜Ò ÜÐAÓBÐ Bð  ÷C"CðH €M÷I"CðH €Mús Á,E
GÇG c ón—t|td«tf«s t|d«r|€ |€ t    d«‚i} |t j |«}n$|t|||||    «j }n|||||    dœ} |€|€ t    d«‚t|||||¬«St|t«rt||f||dœ| ¤ŽSt|ttf«r7t|dttf«rt|f||d    œ| ¤ŽSt|f||d    œ| ¤ŽSt|t«r9|!|j |k7r|j|«} n|} |
r| j!«} | St|d«rt#||||¬
«St|t$«rL|!|j |k7r|j|«} n|} |
r| j!«} | jt«St'|d d«} | t| t(«s t    d «‚t j*|«}| |j |k7r|j|«}|jt«S) aŽ
 
    Construct a record array from a wide-variety of objects.
 
    A general-purpose record array constructor that dispatches to the
    appropriate `recarray` creation function based on the inputs (see Notes).
 
    Parameters
    ----------
    obj : any
        Input object. See Notes for details on how various input types are
        treated.
    dtype : data-type, optional
        Valid dtype for array.
    shape : int or tuple of ints, optional
        Shape of each array.
    offset : int, optional
        Position in the file or buffer to start reading from.
    strides : tuple of ints, optional
        Buffer (`buf`) is interpreted according to these strides (strides
        define how many bytes each array element, row, column, etc.
        occupy in memory).
    formats, names, titles, aligned, byteorder :
        If `dtype` is ``None``, these arguments are passed to
        `numpy.format_parser` to construct a dtype. See that function for
        detailed documentation.
    copy : bool, optional
        Whether to copy the input object (True), or to use a reference instead.
        This option only applies when the input is an ndarray or recarray.
        Defaults to True.
 
    Returns
    -------
    np.recarray
        Record array created from the specified object.
 
    Notes
    -----
    If `obj` is ``None``, then call the `~numpy.recarray` constructor. If
    `obj` is a string, then call the `fromstring` constructor. If `obj` is a
    list or a tuple, then if the first object is an `~numpy.ndarray`, call
    `fromarrays`, otherwise call `fromrecords`. If `obj` is a
    `~numpy.recarray`, then make a copy of the data in the recarray
    (if ``copy=True``) and use the new formats, names, and titles. If `obj`
    is a file, then call `fromfile`. Finally, if obj is an `ndarray`, then
    return ``obj.view(recarray)``, making a copy of the data if ``copy=True``.
 
    Examples
    --------
    >>> a = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
    >>> a
    array([[1, 2, 3],
           [4, 5, 6],
           [7, 8, 9]])
 
    >>> np.rec.array(a)
    rec.array([[1, 2, 3],
               [4, 5, 6],
               [7, 8, 9]],
              dtype=int64)
 
    >>> b = [(1, 1), (2, 4), (3, 9)]
    >>> c = np.rec.array(b, formats = ['i2', 'f2'], names = ('x', 'y'))
    >>> c
    rec.array([(1, 1.), (2, 4.), (3, 9.)],
              dtype=[('x', '<i2'), ('y', '<f2')])
 
    >>> c.x
    array([1, 2, 3], dtype=int16)
 
    >>> c.y
    array([1.,  4.,  9.], dtype=float16)
 
    >>> r = np.rec.array(['abc','def'], names=['col1','col2'])
    >>> print(r.col1)
    abc
 
    >>> r.col1
    array('abc', dtype='<U3')
 
    >>> r.col2
    array('def', dtype='<U3')
    NrÙzIMust define formats (or dtype) if object is None, string, or an open file)r.r/r0r1r2z"Must define a shape if obj is None)r—r‘r’)r–r‘r)r;r–)r;r–r‘Ú__array_interface__zUnknown input type)r9rGrIrÛr8r:r;r r Úbytesrr#rHrr rrÚcopyrr“ryÚdictr)rvr;r–r‘r’r.r/r0r1r2rìÚkwdsÚnewÚ    interfaces              r&rr®s8€ôl
Cœ$˜t›*¤cÐ*Ô    +¬w°s¸JÔ/GØ ˆ?˜u˜}Üð9ó:ð    :ð €DØ ÐÜ—‘˜“‰Ø    Р   Ü˜g u¨fØ% yó2ß27±%ñ    ð#ØØ Ø"Ø&ñ    ˆð €{Ø ˆ=ÜÐAÓBÐ Bܘ˜u¨#°fÀgÔNÐNä    CœÔ    Ü˜#˜uÐI¨E¸&ÑIÀDÑIÐIä    Cœ$¤˜Ô    'Ü c˜!‘fœu¤d˜mÔ ,ܘsÐE¨%°uÑEÀÑEÐ Eä˜cÐD¨°eÑD¸tÑDÐ Dä    CœÔ    "Ø Ð  #§)¡)¨uÒ"4Ø—(‘(˜5“/‰CàˆCÙ Ø—(‘(“*ˆC؈
ä    jÔ    !ܘ 5°¸fÔEÐEä    CœÔ    !Ø Ð  #§)¡)¨uÒ"4Ø—(‘(˜5“/‰CàˆCÙ Ø—(‘(“*ˆC؏x‰xœÓ!Ð!ô˜CÐ!6¸Ó=ˆ    Ø Ð ¤J¨y¼$Ô$?ÜÐ1Ó2Ð 2܏h‰hs‹mˆØ Ð  #§)¡)¨uÒ"4Ø—(‘(˜5“/ˆC؏x‰xœÓ!Ð!r4)NNNNNFN)NNrNNNFN)
NNrNNNNFNT)!rYrÝr»Ú collectionsrÚ
contextlibrÚ numpy._utilsrÚrr:rrmÚ
arrayprintr    Ú__all__r“rTÚ
sctypeDictÚnumfmtrr rnr
r r¾r rrr×rrrZr4r&ú<module>rùs—ðñó
ÛÝÝ"å#åÝ Ý.ò €ð *‰*€àØØØØØØØØØØØØØñ €ð(
‰€ñ ˆKÓñóðñ ˆKÓ÷HðHóðHôVHˆRW‰WôHñf ˆKÓôQ,ˆwóQ,óðQ,òh    ñ ˆKÓØ:>ØAEò[óð[ñ| ˆKÓØEIØ6:òUóðUñp ˆKÓØEIØAEòHóðHòTñ ˆKÓØ;?Ø?CòeóðeñP ˆKÓØGKØGKòR"óñR"r4