a
    yn„f—  ã                   @  sR   d dl mZ d dlZd dlmZ d dlmZ dZe 	¡ Z
eƒ dd„ ƒZdd	„ ZdS )
é    )ÚannotationsN)Úhigh_level_function)ÚNumpyMetadata)Úfieldsc                 c  s   | fV  t | ƒS )aW  
    Args:
        array: Array-like data (anything #ak.to_layout recognizes).

    Extracts record fields or tuple slot numbers from `array` (many types
    supported, including all Awkward Arrays and Records).

    If the array contains nested records, only the outermost record is
    queried. If it contains tuples instead of records, this function outputs
    string representations of integers, such as `"0"`, `"1"`, `"2"`, etc.
    The records or tuples may be within multiple layers of nested lists.

    If the array contains neither tuples nor records, this returns an empty
    list.
    )Ú_impl)Úarray© r   ú_/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/awkward/operations/ak_fields.pyr      s    r   c                 C  s   t jj| ddd�}|j ¡ S )NTÚerror)Zallow_recordZprimitive_policy)ÚakÚ
operationsZ	to_layoutr   Úcopy)r   Zlayoutr   r   r	   r   &   s    r   )Ú
__future__r   Zawkwardr   Zawkward._dispatchr   Zawkward._nplikes.numpy_liker   Ú__all__ÚinstanceÚnpr   r   r   r   r   r	   Ú<module>   s   
