| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/site-packages/numpy/ma/__pycache__/ |
Upload File : |
�
�g�l � �X � d Z ddlZddlZddlmZ ej j j Zej j Z
g d�Zg d�Zdd�Z
d� Z G d� dej � Zd � ZeZ dd�Zdddddd
ddej( f d�Zd
� Zd� Z dej0 d�d�Zdd�Zy)a, :mod:`numpy.ma..mrecords`
Defines the equivalent of :class:`numpy.recarrays` for masked arrays,
where fields can be accessed as attributes.
Note that :class:`numpy.ma.MaskedArray` already supports structured datatypes
and the masking of individual fields.
.. moduleauthor:: Pierre Gerard-Marchant
� N)�
MaskedRecords� mrecarray�
fromarrays�fromrecords�fromtextfile�addfield)�_data�_mask�
_fieldmask�dtypec �6 � t | � }t |� D �cg c] }d|z �� }}|�|}nat |t t f� r|}n0t |t
� r|j
d� }nt d|��� �t |� }||k r|||d z
}g }t ||| j � D ]X \ }}} |t v r4| d t v r|j || d f� �1|j | � �C|j || d f� �Z t j |� S c c}w )z�
Checks that field names ``descr`` are not reserved keywords.
If this is the case, a default 'f%i' is substituted. If the argument
`names` is not None, updates the field names to valid names.
�f%iN�,zillegal input names r � )�len�range�
isinstance�tuple�list�str�split� NameError�zip�descr�reserved_fields�append�npr )
r �names�ndescr�i�
default_names� new_names�nnames�n�d�ts
�3C:\Python312\Lib\site-packages\numpy/ma/mrecords.py�_checknamesr( $ s � � ��Z�F�(-�f�
�6�1�U�Q�Y�6�M�6��}�!� ��e�e�T�]�+��I�
��s�
#����C�(�I��2�5�)�<�=�=��Y����F�?���v�w�/�/�I�
�F���M�5�;�;�?� %� ��A�q������t��&��
�
�q�!�A�$�i�(��
�
�a� ��M�M�1�a��d�)�$�%� �8�8�F����- 7s �Dc �� � | j j D �cg c] }|df�� }}t j | j |�� }t dgt
|� z � |_ |S c c}w )Nz|b1�r F)r r r �empty�shaper r �flat)�selfr$ �mdescr�fdmasks r'