Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
_iotools.cpython-313.pyc441 linesDownload Raw Back to __pycache__
1�

2z�j |����SrSrSSKrSSKrSSKJs Jr SSK	J3r4Jr SSjrSr
SrSrSS	jr"S5S5r"SS
5rSr"SS\5r"SS\5r"SS\5r"SS5rSSjrg)zBA collection of functions designed to help I/O with ascii files.6 7zrestructuredtext en�N)�asbytes�	asunicodec�V�[U5[LaUcSnURU5nU$)z�Decode bytes from binary input streams.8 9Defaults to decoding from 'latin1'.10 11Parameters12----------13line : str or bytes14     Line to be decoded.15encoding : str16     Encoding used to decode `line`.17 18Returns19-------20decoded_line : str21 22�latin1)�type�bytes�decode)�line�encodings  �XD:\code\apps\devtools\python\user_packages\Python313\site-packages\numpy/lib/_iotools.py�_decode_liner

s.��"�D�z�U�����H��{�{�8�$���K�c�<�US- g![[4a gf=f)z*23Check whether obj behaves like a string.24�FT��	TypeError�25ValueError��objs r�_is_string_liker&s,����b����
�z�"��������c�<�US- g![[4a gf=f)z026Check whether obj behaves like a bytes object.27rFTrrs r�_is_bytes_liker1s,����c�	���
�z�"����rc�T^�[U4SjTR=(d S55$)au28Returns whether one or several fields of a dtype are nested.29 30Parameters31----------32ndtype : dtype33    Data-type of a structured array.34 35Raises36------37AttributeError38    If `ndtype` does not have a `names` attribute.39 40Examples41--------42>>> import numpy as np43>>> dt = np.dtype([('name', 'S4'), ('x', float), ('y', float)])44>>> np.lib._iotools.has_nested_fields(dt)45False46 47c3�F># �UHnTURSLv� M g7f�N)�names)�.0�name�ndtypes  �r�	<genexpr>�$has_nested_fields.<locals>.<genexpr>Rs"����M�:L�$�v�d�|�!�!��-�:L�s�!�)�anyr)r s`r�has_nested_fieldsr%<s"���,�M�&�,�,�:L�"�:L�M�M�Mrc�.�URnUcKU(a7UR/[[R"UR4855-$UR/$/nUH2nURUn[USU5nURU5 M4 U$)a49Unpack a structured data-type by collapsing nested fields and/or fields50with a shape.51 52Note that the field names are lost.53 54Parameters55----------56ndtype : dtype57    The datatype to collapse58flatten_base : bool, optional59   If True, transform a field with a shape into several fields. Default is60   False.61 62Examples63--------64>>> import numpy as np65>>> dt = np.dtype([('name', 'S4'), ('x', float), ('y', float),66...                ('block', int, (2, 3))])67>>> np.lib._iotools.flatten_dtype(dt)68[dtype('S4'), dtype('float64'), dtype('float64'), dtype('int64')]69>>> np.lib._iotools.flatten_dtype(dt, flatten_base=True)70[dtype('S4'),71 dtype('float64'),72 dtype('float64'),73 dtype('int64'),74 dtype('int64'),75 dtype('int64'),76 dtype('int64'),77 dtype('int64'),78 dtype('int64')]79 80r)	r�base�int�np�prod�shape�fields�
flatten_dtype�extend)r �flatten_baser�types�field�info�flat_dts       rr-r-Us���D
�L�L�E��}���K�K�=�3�r�w�w�v�|�|�'<�#=�=�=����}�����E��=�=��'�D�#�D��G�\�:�G��L�L��!���rc�D�\rSrSrSrSrSSjrSrSrSr	S	r81S82rg)�LineSplitter�a�83Object to split a string at a given delimiter or at given places.84 85Parameters86----------87delimiter : str, int, or sequence of ints, optional88    If a string, character used to delimit consecutive fields.89    If an integer or a sequence of integers, width(s) of each field.90comments : str, optional91    Character used to mark the beginning of a comment. Default is '#'.92autostrip : bool, optional93    Whether to strip each individual field. Default is True.94 95c�^�U4Sj$)am96Wrapper to strip each member of the output of `method`.97 98Parameters99----------100method : function101    Function that takes a single argument and returns a sequence of102    strings.103 104Returns105-------106wrapped : function107    The result of wrapping `method`. `wrapped` takes a single input108    argument and returns a list of strings that are stripped of109    white-space.110 111c�Z>�T"U5Vs/sHoR5PM sn$s snfr)�strip)�input�_�methods  �r�<lambda>�(LineSplitter.autostrip.<locals>.<lambda>�s������?��A�g�g�i��?��?s�(r#)�selfr<s `r�	autostrip�LineSplitter.autostrip�s���$@�?rNc�X�[U5n[U5nX lUb[U[5(aU=(d SnURnO�[US5(acURn[R"S/[U5-5n[R"U5VVs/sHupx[Xx5PM nnnO4[U5(aUR[U5pO
URSpXlU(aUR!U5UlOXPlX@lgs snnf)N�__iter__r)r
�comments�112isinstance�str�_delimited_splitter�hasattr�_variablewidth_splitterr)�cumsum�list�	itertools�pairwise�slicer(�_fixedwidth_splitter�	delimiterr@�	_handymanr)	r?rPrDr@rrQ�idx�i�js	         r�__init__�LineSplitter.__init__�s��� ��+�	���)�� �
�
��*�Y��"<�"<�!�)�T�I��0�0�I�
�Y�113�
+�
+��4�4�I��)�)�Q�C�$�y�/�1�2�C�3<�3E�3E�c�3J�K�3J��!��q��3J�I�K�I�
��^�^��-�-�s�9�~�"�'+�&>�&>��	�"���!�^�^�I�6�D�N�&�N� �
��Ls�&D&c���URbURUR5SnURS5nU(d/$URUR5$)z2Chop off comments, strip, and split at delimiter. rz 
114)rD�splitr9rP�r?r115s  rrG� LineSplitter._delimited_splitter�sL���=�=�$��:�:�d�m�m�,�Q�/�D��z�z�'�"����I��z�z�$�.�.�)�)rc�F�URbURUR5SnURS5nU(d/$URn[	S[U5U5Vs/sHn[
X3U-5PM nnUVs/sHoQUPM	 sn$s snfs snf)Nrz
116)rDrXr9rP�range�lenrN)r?r117�fixedrS�slices�ss      rrO�!LineSplitter._fixedwidth_splitter�s����=�=�$��:�:�d�m�m�,�Q�/�D��z�z�&�!����I�����/4�Q��D�	�5�/I�J�/I�!�%��u�9�%�/I��J�!'�(��A�Q���(�(��K��(s�*B�Bc��URbURUR5SnU(d/$URnUVs/sHo1UPM	 sn$s snf)Nr)rDrXrP)r?r118r_r`s    rrI�$LineSplitter._variablewidth_splitter�sN���=�=�$��:�:�d�m�m�,�Q�/�D���I�����!'�(��A�Q���(�(��(s�Ac�J�UR[XR55$r)rQr
rrYs  r�__call__�LineSplitter.__call__�s���~�~�l�4���?�@�@r)rQrDrPr)N�#TN)�__name__�119__module__�__qualname__�__firstlineno__�__doc__r@rUrGrOrIre�__static_attributes__r#rrr5r5�s1��
�@�(@D��!�:*�)�)�Arr5c�N�\rSrSrSrSr\"S5rS120SjrSSjr	SSjr121S	rg)�
NameValidator��a�122Object to validate a list of strings to use as field names.123 124The strings are stripped of any non alphanumeric character, and spaces125are replaced by '_'. During instantiation, the user can define a list126of names to exclude, as well as a list of invalid characters. Names in127the exclusion list are appended a '_' character.128 129Once an instance has been created, it can be called with a list of130names, and a list of valid names will be created.  The `__call__`131method accepts an optional keyword "default" that sets the default name132in case of ambiguity. By default this is 'f', so that names will133default to `f0`, `f1`, etc.134 135Parameters136----------137excludelist : sequence, optional138    A list of names to exclude. This list is appended to the default139    list ['return', 'file', 'print']. Excluded names are appended an140    underscore: for example, `file` becomes `file_` if supplied.141deletechars : str, optional142    A string combining invalid characters that must be deleted from the143    names.144case_sensitive : {True, False, 'upper', 'lower'}, optional145    * If True, field names are case-sensitive.146    * If False or 'upper', field names are converted to upper case.147    * If 'lower', field names are converted to lower case.148 149    The default value is True.150replace_space : '_', optional151    Character(s) used in replacement of white spaces.152 153Notes154-----155Calling an instance of `NameValidator` is the same as calling its156method `validate`.157 158Examples159--------160>>> import numpy as np161>>> validator = np.lib._iotools.NameValidator()162>>> validator(['file', 'field2', 'with space', 'CaSe'])163('file_', 'field2', 'with_space', 'CaSe')164 165>>> validator = np.lib._iotools.NameValidator(excludelist=['excl'],166...                                           deletechars='q',167...                                           case_sensitive=False)168>>> validator(['excl', 'field2', 'no_q', 'with space', 'CaSe'])169('EXCL', 'FIELD2', 'NO_Q', 'WITH_SPACE', 'CASE')170 171)�return�file�printz~!@#$%^&*()-=+~\|]}[{';: /?.>,<Nc��Uc/nURUR5 XlUc[UR5nO[U5nURS5 XPlUbUSLa	SUlOTUSLdURS5(a	SUlO0URS5(a	SUlOS	US1723n[U5eX@l173g)N�"Tc��U$rr#��xs rr=�(NameValidator.__init__.<locals>.<lambda>-s��ArF�uc�"�UR5$r)�upperrws rr=ry/�174��A�G�G�Ir�lc�"�UR5$r)�lowerrws rr=ry1r}rz"unrecognized case_sensitive value �.)r.�defaultexcludelist�excludelist�set�defaultdeletechars�add�deletechars�case_converter�175startswithr�
replace_space)r?r�r��case_sensitiver��delete�msgs       rrU�NameValidator.__init__s������K����4�2�2�3�&������0�0�1�F���%�F��176�177�3��!���"��$�(>�"-�D����%�.�*C�*C�C�*H�*H�"5�D��
�
&�
&�s�
+�
+�"5�D��6�~�6F�a�H�C��S�/�!�*�rc���UcUcg/n[U[5(aU/nUb/[U5nXC:a[U5S/X4-178--nO179XC:�aUSUnURnUR180nURnURn/n	0n181SnUH�nU"U5R5nU(aURSU5nSRUV
s/sHo�U;dM182U
PM sn
5nUS:XaX+-nX�;aUS-
nX+-nX�;aMUS-
nO183X�;aUS-
nU184RUS5nUS:�aU	RUSU--5 OU	RU5 US-X�'M� [U	5$s sn
f)ac185Validate a list of strings as field names for a structured array.186 187Parameters188----------189names : sequence of str190    Strings to be validated.191defaultfmt : str, optional192    Default format string, used if validating a given string193    reduces its length to zero.194nbfields : integer, optional195    Final number of validated names, used to expand or shrink the196    initial list of names.197 198Returns199-------200validatednames : list of str201    The list of validated field names.202 203Notes204-----205A `NameValidator` instance can be called directly, which is the206same as calling `validate`. For examples, see `NameValidator`.207 208Nrr� �r;z_%d)rErFr]rKr�r�r�r�r9�replace�join�get�append�tuple)r?r�209defaultfmt�nbfields�nbnamesr�r�r�r��validatednames�seen�nbempty�item�c�cnts               r�validate�NameValidator.validate8s���6
�M�� ���E��e�S�!�!��I�E����%�j�G��"��U��r�d�h�.@�&A�A���$��i�x�(���&�&���&�&���,�,���*�*�
��������D�!�$�'�-�-�/�D���|�|�C��7���7�7�t�D�t�!��/C�A�t�D�E�D��r�z�!�+���m��q�L�G�%�/�D��m��1����$������(�(�4��#�C��Q�w��%�%�d�U�S�[�&8�9��%�%�d�+��q��D�J�%�&�^�$�$��Es�
	E-210�E-211c�"�URXUS9$)N)r�r�)r�)r?rr�r�s    rre�NameValidator.__call__~s���}�}�U�H�}�M�Mr)r�r�r�r�)NNNr;)�f%iN)rhrirjrkrlr��	frozensetr�rUr�rermr#rrroro�s4��2�h3��"�#I�J��59�47�+�6D%�LNrroc�T�UR5nUS:XagUS:Xag[S5e)a�212Tries to transform a string supposed to represent a boolean to a boolean.213 214Parameters215----------216value : str217    The string that is transformed to a boolean.218 219Returns220-------221boolval : bool222    The boolean representation of `value`.223 224Raises225------226ValueError227    If the string is not 'True' or 'False' (case independent)228 229Examples230--------231>>> import numpy as np232>>> np.lib._iotools.str2bool('TRUE')233True234>>> np.lib._iotools.str2bool('false')235False236 237�TRUET�FALSEFzInvalid boolean)r|r)�values r�str2boolr��s0��8
�K�K�M�E�����	�'�	���*�+�+rc��\rSrSrSrSrg)�ConverterErrori�zJ238Exception raised when an error occurs in a converter for string values.239 240r#N�rhrirjrkrlrmr#rrr�r������	rr�c��\rSrSrSrSrg)�ConverterLockErrori�zJ241Exception raised when an attempt is made to upgrade a locked converter.242 243r#Nr�r#rrr�r��r�rr�c��\rSrSrSrSrg)�ConversionWarningi�z�244Warning issued when a string converter has a problem.245 246Notes247-----248In `genfromtxt` a `ConversionWarning` is issued if raising exceptions249is explicitly suppressed with the "invalid_raise" keyword.250 251r#Nr�r#rrr�r��s���	rr�c�F�\rSrSrSr\R\S4\R\	S4/r252\R"\R5R\R"\R5R:a\253R\R\	S45 \254R\R \\R$4\R&\\R$S-4\R*\R*\R$4\R,\	S4\R.\\R$4\R0\\R$S-4\R2\S4\R6\S4/5 \S5r\S5r\S	5r \SSj5r!\S5r"SS
jr#Sr$Sr%Sr&Sr'Sr(Sr)SSjr*Sr+g255)�StringConverteri�a�256Factory class for function transforming a string into another object257(int, float).258 259After initialization, an instance can be called to transform a string260into another object. If the string is recognized as representing a261missing value, a default value is returned.262 263Attributes264----------265func : function266    Function used for the conversion.267default : any268    Default value to return when the input corresponds to a missing269    value.270type : type271    Type of the output.272_status : int273    Integer representing the order of the conversion.274_mapper : sequence of tuples275    Sequence of tuples (dtype, function, default value) to evaluate in276    order.277_locked : bool278    Holds `locked` parameter.279 280Parameters281----------282dtype_or_func : {None, dtype, function}, optional283    If a `dtype`, specifies the input data type, used to define a basic284    function and a default value for missing data. For example, when285    `dtype` is float, the `func` attribute is set to `float` and the286    default value to `np.nan`.  If a function, this function is used to287    convert a string to another object. In this case, it is recommended288    to give an associated default value as input.289default : any, optional290    Value to return by default, that is, when the string to be291    converted is flagged as missing. If not given, `StringConverter`292    tries to supply a reasonable default value.293missing_values : {None, sequence of str}, optional294    ``None`` or sequence of strings indicating a missing value. If ``None``295    then missing values are indicated by empty entries. The default is296    ``None``.297locked : bool, optional298    Whether the StringConverter should be locked to prevent automatic299    upgrade or not. Default is False.300 301F�����yz???c�B�[R"U5R$)z(Returns the dtype of the input variable.)r)�array�dtype��cls�vals  r�	_getdtype�StringConverter._getdtype302s���x�x��}�"�"�"rc�V�[R"U5RR$)z4Returns the type of the dtype of the input variable.)r)r�r�rr�s  r�_getsubdtype�StringConverter._getsubdtypes���x�x��}�"�"�'�'�'rc�Z�UR[R:XaU$UR$)z9Returns dtype for datetime64 and type of dtype otherwise.)rr)�303datetime64)r�r�s  r�_dtypeortype�StringConverter._dtypeortypes#���:�:����&��L��z�z�rNc�>�[U5(a.URRSURU5X45 g[	US5(a�[US[[45(a&UHnURRSU5 M! gUcS/[U5-nO5[U5nURS/[U5[U5-304-5 [X5H2upEURRSURU5XE45 M4 gg)aY305Upgrade the mapper of a StringConverter by adding a new function and306its corresponding default.307 308The input function (or sequence of functions) and its associated309default value (if any) is inserted in penultimate position of the310mapper.  The corresponding type is estimated from the dtype of the311default value.312 313Parameters314----------315func : var316    Function, or sequence of functions317 318Examples319--------320>>> import dateutil.parser321>>> import datetime322>>> dateparser = dateutil.parser.parse323>>> defaultdate = datetime.date(2000, 1, 1)324>>> StringConverter.upgrade_mapper(dateparser, default=defaultdate)325r�NrCr)�callable�_mapper�insertr�rHrEr�rKr]r��zip)r��func�defaultr;�fct�dfts      r�upgrade_mapper�StringConverter.upgrade_mapper s���2�D�>�>��K�K���r�C�$4�$4�W�$=�t�#M�N��
�T�:�
&�
&��$�q�'�E�4�=�1�1��A��K�K�&�&�r�1�-������&�3�t�9�,���w�-������v��T��S��\�)A�B�C���.������"�"�2��(8�(8��(=�s�'H�I�/�'rc��[UR5H unup4nURU:XdMX#XE44s $ [UR5H6unup4n[R"URU5(dM1X#XE44s $ [326er)�	enumerater�rr)�327issubdtype�LookupError)r�r�rS�deftyper��default_defs      r�_find_map_entry�StringConverter._find_map_entryIs���09����/E�+�A�+��{��z�z�W�$��D�6�6�6�0F�32809����/E�+�A�+��{��}�}�U�Z�Z��1�1��D�6�6�6�0F��rc��[U5UlUc:[UlSUlU=(d SUl[R"S5nGOSUl[R"U5nURU5uUlupxn	UcX�lOX lURcX�lURURSS:Xa�[!UR[R"5(a[R"UlOG[!UR[R$5(a[R$UlOSUlUc	S	1UlOC[)U[*5(aUR-S3295n[/[1U5S	/-5UlUR2UlUR7U5Ul330SUlX lg![al [U5(dSn[U[U5-5eXlUc%URS5nO![a SnOf=fURU5nGN�f=f![a# X lURSupxnSUlGN�f=f)NrF�boolzOThe input argument `dtype` is neither a function nor a dtype (got '%s' instead)�0r�r�c�*�[[U55$r)r(�floatrws rr=�*StringConverter.__init__.<locals>.<lambda>�s��#�e�A�h�-rr�,)r��_lockedr�r��_statusr�r)r�rr�rrr�r�r�r��331issubclass�uint64�int64�missing_valuesrErFrXr�rK�_strict_call�_callingfunctionr��_checked�_initial_default)332r?�
dtype_or_funcr�r��lockedr��errmsgr;r�r�s333          rrU�StringConverter.__init__Ws���F�|���� � �D�I��D�L�"�+�e�D�L��H�H�V�$�E�
0� ��	�����/��&
+�7;�7K�7K�E�7R�4���4�q���?�#.�L�#*�L��y�y� � �	��y�y�D�L�L��O�A�.�.��e�j�j�"�)�)�4�4� "�	�	�D�I���334�335�B�H�H�5�5� "���D�I� 7�D�I��!�#%�$�D���.�#�.�.�!/�!5�!5�c�!:��"%�d�>�&:�b�T�&A�"B�D�� $� 1� 1����%�%�e�,��	���
� '���q�
0��
�.�.�I�F�#�F�T�-�-@�$@�A�A�)�	��?�'�"&�)�)�C�.���%�'�"&��'�����w�/��
0��(�
!�&��!�\�\�"�-�336��� ���	
!�sH�G�-I�<I
�H&�%I
�&H5�2I
�4H5�5I
�I
�)I=�<I=c�^�URU5$![a URs$f=fr)r�rr��r?r�s  r�_loose_call�StringConverter._loose_call�s/��	 ��9�9�U�#�#���	 ��<�<��	 �s��,�,c�|�URU5nUR[La![R"XRS9 U$U$![337a [ef=f![aT UR5UR;a&UR(dSUl338URs$[
SUS35ef=f)N)r�FzCannot convert string '�')r�r(r)r�r�
OverflowErrorrr9r�r�r�r�)r?r��	new_values   rr��StringConverter._strict_call�s���	A��	�	�%�(�I�339�y�y�C��%��H�H�U�)�)�4�340��9���	%�%�$�$�%���	A��{�{�}�� 3� 3�3��|�|�$)�D�M��|�|�#��6�u�g�Q�?�@�@�	A�s/�$A�A	�A�A�	A�A�AB;�+B;c�$�URU5$r)r�r�s  rre�StringConverter.__call__�s���$�$�U�+�+rc�P�UR(a
Sn[U5e[UR5nURnX2:Xa
Sn[U5eX2S-341:aUS-
nURUuUlUlnX0lURbURUl	gX@l	g)Nz*Converter is locked and cannot be upgradedz*Could not find a valid conversion functionr�)342r�r�r]r�r�r�rr�r�r�)r?r��343_statusmaxr�r�s     r�_do_upgrade�StringConverter._do_upgrade�s����<�<�A�F�$�V�,�,�����&�344��,�,��� �A�F� ��(�(�
�A�~�
%��q�L�G�(,���W�(=�%��	�4�9�g���� � �,��0�0�D�L�"�Lrc��SUlURU5$![a$ UR5 UR	U5s$f=f)a345Find the best converter for a given string, and return the result.346 347The supplied string `value` is converted by testing different348converters in order. First the `func` method of the349`StringConverter` instance is tried, if this fails other available350converters are tried.  The order in which these other converters351are tried is determined by the `_status` attribute of the instance.352 353Parameters354----------355value : str356    The string to convert.357 358Returns359-------360out : any361    The result of converting `value` with the appropriate converter.362 363T)r�r�rr��upgrader�s  rr��StringConverter.upgrade�sK��*��
�	'��$�$�U�+�+���	'������<�<��&�&�	'�s��+A�Ac���SUl[US5(dU4nURnUHnU"U5 M
 g![a$ UR	5 URU5 gf=f)NTrC)r�rHr�rr��iterupgrade)r?r�r��_ms    rr�StringConverter.iterupgrade�sh����
��u�j�)�)��H�E��(�(��	$����R� ����	$��������U�#�	$�s�;�+A)�(A)c���XlXPlUb,X lURUR	U55UlO7U"U=(d S5nURUR	U55UlUc[5Ul	g[R"U5(dU/n[SU55(d[
S5eURRU5 g![[4a SnN�f=f)a�364Set StringConverter attributes directly.365 366Parameters367----------368func : function369    Conversion function.370default : any, optional371    Value to return by default, that is, when the string to be372    converted is flagged as missing. If not given,373    `StringConverter` tries to supply a reasonable default value.374testing_value : str, optional375    A string representing a standard input value of the converter.376    This string is used to help defining a reasonable default377    value.378missing_values : {sequence of str, None}, optional379    Sequence of strings indicating a missing value. If ``None``, then380    the existing `missing_values` are cleared. The default is ``''``.381locked : bool, optional382    Whether the StringConverter should be locked to prevent383    automatic upgrade or not. Default is False.384 385Notes386-----387`update` takes the same parameters as the constructor of388`StringConverter`, except that `func` does not accept a `dtype`389whereas `dtype_or_func` in the constructor does.390 391N�1c3�B# �UHn[U[5v� M g7fr)rErF)r�vs  rr!�)StringConverter.update.<locals>.<genexpr>3s���B�>�a�z�!�S�)�)�>�s�z)missing_values must be strings or unicode)r�r�r�r�r�rrrr�r�r)�iterable�all�update)r?r�r��
testing_valuer�r��testers       rr392�StringConverter.update�s���>�	�����"�L��)�)�$�.�.��*A�B�D�I�
��m�2�s�3���)�)�$�.�.��*@�A�D�I��!�#&�%�D���;�;�~�.�.�"0�!1���B�>�B�B�B�� K�L�L����&�&�~�6���z�*�
���
�s�C"�"C7�6C7)	r�r�r�r�r�r�r�r�rr)NNNF)NNrF),rhrirjrkrl�nxr�r��int_r(r�r��itemsizer�r�r.�float64r��nan�393complex128�complex�394longdouble�integer�floating�complexfloating�str_r�bytes_r�classmethodr�r�r�r�r�rUr�r�rer�r�rr395rmr#rrr�r��s���.�^����5�)�����b�!�$�G�396397�x�x�����!�!�B�H�H�R�X�X�$6�$?�$?�?�������#�r�*�+��N�N�R�Z�Z�����/��]�]�G�R�V�V�b�[�9��]�]�B�M�M�2�6�6�:��Z�Z��b�)��[�[�%����0��'�'��"�&�&�2�+�>��W�W�i��/��Y�Y���/����#��#��(��(��	��	��&J��&J�P����IM��G(�R �A�2,�#�('�8398$�8<�).�77rr�c���[R"U5nUb�[S0UD6n[U[5(aURS5nURcR[UR/[U5-5nU"XS9n[R"[[X555nU$U"U[UR5US9UlU$URb�[S0UD6n[S[[UR5555nURU:Xa+US:wa%U"S/[UR5-US9UlU$U"URUS9UlU$![ar [S0UD6n[U5nUcS/[U5-nO&[U[5(aURS5nU"XUS9n[R"XS.5nU$f=f)	a�399Convenience function to create a `np.dtype` object.400 401The function processes the input `dtype` and matches it with the given402names.403 404Parameters405----------406ndtype : var407    Definition of the dtype. Can be any string or dictionary recognized408    by the `np.dtype` function, or a sequence of types.409names : str or sequence, optional410    Sequence of strings to use as field names for a structured dtype.411    For convenience, `names` can be a string of a comma-separated list412    of names.413defaultfmt : str, optional414    Format string used to define missing names, such as ``"f%i"``415    (default) or ``"fields_%02i"``.416validationargs : optional417    A series of optional arguments used to initialize a418    `NameValidator`.419 420Examples421--------422>>> import numpy as np423>>> np.lib._iotools.easy_dtype(float)424dtype('float64')425>>> np.lib._iotools.easy_dtype("i4, f8")426dtype([('f0', '<i4'), ('f1', '<f8')])427>>> np.lib._iotools.easy_dtype("i4, f8", defaultfmt="field_%03i")428dtype([('field_000', '<i4'), ('field_001', '<f8')])429 430>>> np.lib._iotools.easy_dtype((int, float, float), names="a,b,c")431dtype([('a', '<i8'), ('b', '<f8'), ('c', '<f8')])432>>> np.lib._iotools.easy_dtype(float, names="a,b,c")433dtype([('a', '<f8'), ('b', '<f8'), ('c', '<f8')])434 435r�)r�)r�r�c3�,# �UH436nSU3v� M g7f)�fNr#)rrSs  rr!�easy_dtype.<locals>.<genexpr>}s���"M�4L�q�Q�q�c�7�4L�s�r�r)�formatsrr#)r)r�rorErFrXrr�rr]rKr�r\r)r rr��validationargsr�r �numbered_namesr�s        r�437easy_dtyper#8s���N$M����&�!����$�6�~�6�H��%��%�%����C�(���|�|�#�����
��E�438� :�;�� ��>�����$�s�5�':�";�<�� �M� (���F�L�L�8I�3=� ?����M��\�\�
%�$�6�~�6�H�"�"M�E�#�f�l�l�:K�4L�"M�M�N�����/�j�E�6I�'���s�6�<�<�/@�(@�3=� ?���439�M� (�����L����M��G�?� �2�>�2���v�;���=��D�3�v�;�&�E�
��s�
#�
#��K�K��$�E���j�I�����f�=�>��6�M�G?�s�E'�'A8G#�"G#r)F)Nr�)rl�
__docformat__rL�numpyr)�numpy._core.numeric�_core�numericr�numpy._utilsrrr
rrr%r-r5ror��	Exceptionr�r��UserWarningr�r�r#r#rr�<module>r,s����&�
��� � �+��2��N�2-�`]A�]A�@ZN�ZN�z",�J	�Y�	�	��	�440	��441	�q7�q7�hLr
codekingpro/portable-devtools · Team Ai