a
    yn„fÈ  ã                   @  sŒ   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ƒ dddddd	œd
d„ƒZdd„ Zejj d¡deeefdd„ƒZdS )é    )ÚannotationsN)ÚUNSUPPORTED)Úhigh_level_function)ÚNumpyMetadata©Ú	ones_likeFT)ÚdtypeÚincluding_unknownÚ	highlevelÚbehaviorÚattrsc                c  s   | fV  t | |||||ƒS )aÂ  
    Args:
        array: Array-like data (anything #ak.to_layout recognizes).
        dtype (None or NumPy dtype): Overrides the data type of the result.
        including_unknown (bool): If True, the `unknown` type is considered
            a value type and is converted to a zero-length array of the
            specified dtype; if False, `unknown` will remain `unknown`.
        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.

    This is the equivalent of NumPy's `np.ones_like` for Awkward Arrays.

    See #ak.full_like for details, and see also #ak.zeros_like.

    (There is no equivalent of NumPy's `np.empty_like` because Awkward Arrays
    are immutable.)
    )Ú_impl)Úarrayr   r	   r
   r   r   © r   úb/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/awkward/operations/ak_ones_like.pyr      s     r   c              	   C  s   t jj | d|||||¡S )Né   )ÚakÚ
operationsZak_full_liker   )r   r
   r   r   r	   r   r   r   r   r   5   s    ÿr   c                 C  s   t | |d�S )N)r   r   )Úar   ÚorderZsubokÚshaper   r   r   Ú_nep_18_impl;   s    r   )Ú
__future__r   Zawkwardr   Zawkward._connect.numpyr   Zawkward._dispatchr   Zawkward._nplikes.numpy_liker   Ú__all__ÚinstanceÚnpr   r   Ú_connectÚnumpyZ
implementsr   r   r   r   r   Ú<module>   s"   ù%ÿ