a
    yn„fß  ã                   @  sX   d dl mZ d dlmZ d dlmZ d dlmZmZ dZ	eƒ ddddd	d
œdd„ƒZ
dS )é    )Úannotations)Újax)Úhigh_level_function)Úfrom_arraylibÚwrap_layout)Úfrom_jaxFTNÚerror)ÚregulararrayÚ	highlevelÚbehaviorÚattrsÚprimitive_policyc                C  s"   t  ¡  tt| |d|d�||d�S )aP  
    Args:
        array (jax.numpy.DeviceArray): The JAX DeviceArray to convert into an Awkward Array.
        regulararray (bool): If True and the array is multidimensional,
            the dimensions are represented by nested #ak.contents.RegularArray
            nodes; if False and the array is multidimensional, the dimensions
            are represented by a multivalued #ak.contents.NumpyArray.shape.
            If the array is one-dimensional, this has no effect.
        highlevel (bool): 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.

    Converts a JAX DeviceArray array into an Awkward Array.

    The resulting layout may involve the following #ak.contents.Content types
    (only):

    * #ak.contents.NumpyArray
    * #ak.contents.RegularArray if `regulararray=True`.

    See also #ak.to_jax, #ak.from_numpy and #ak.from_jax.
    F)r   )r
   r   )r   Zassert_registeredr   r   )Úarrayr	   r
   r   r   r   © r   úa/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/awkward/operations/ak_from_jax.pyr      s    #ýr   )Ú
__future__r   Zawkwardr   Zawkward._dispatchr   Zawkward._layoutr   r   Ú__all__r   r   r   r   r   Ú<module>   s   ù