a
    yn„f  ã                   @  sn   d dl mZ d dlZd dlmZ d dlmZ d dlm	Z	 dZ
e	 ¡ Zejj d¡eƒ dd
d„ƒƒZdd„ ZdS )é    )ÚannotationsN)Úhigh_level_function)ÚHighLevelContext)ÚNumpyMetadata)Úangler   FTc                 c  s   | fV  t | ||||ƒS )a–  
    Args:
        val : array_like
            Input array.
        deg (bool, default is False): If True, returns angles in degrees,
            otherwise in radians.
        highlevel (bool, default is True): If True, return an #ak.Array;
            otherwise, return a low-level #ak.contents.Content subclass.
        behavior (None or dict): Custom #ak.behavior for the output array, if
            high-level.
        attrs (None or dict): Custom attributes for the output array, if
            high-level.

    Returns the counterclockwise angle from the positive real axis on the complex
    plane in the range ``(-pi, pi]``, with dtype as a float.
    )Ú_impl_angle)ÚvalÚdegÚ	highlevelÚbehaviorÚattrs© r   ú^/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/awkward/operations/ak_angle.pyr      s    c           	        sd   t ||d�� }|j| ddd�}W d   ƒ n1 s20    Y  ‡ fdd„}tj ||¡}|j||d�S )N)r   r   FÚerror)Zallow_recordZprimitive_policyc                   s.   t | tjjƒr&tj |j | jˆ ¡¡S d S d S )N)Ú
isinstanceÚakÚcontentsZ
NumpyArrayZnpliker   Údata)ÚlayoutÚbackendÚkwargs©r	   r   r   Úaction_angle.   s    z!_impl_angle.<locals>.action_angle)r
   )r   Úunwrapr   Z_doZrecursively_applyÚwrap)	r   r	   r
   r   r   Úctxr   r   Úoutr   r   r   r   )   s
    .r   )FTNN)Ú
__future__r   Zawkwardr   Zawkward._dispatchr   Zawkward._layoutr   Zawkward._nplikes.numpy_liker   Ú__all__ÚinstanceÚnpÚ_connectÚnumpyZ
implementsr   r   r   r   r   r   Ú<module>   s   