U
    qhP                     @  s8   d dl mZ d dlmZ d dlmZ G dd deZdS )    )annotations)np_dtype_to_tensor_dtype)_CommonRandomc                   @  s   e Zd ZdddZdS )	BernoulliNc                 C  sL   |d krt |j}| j||dd}| |}|jd|d|}||fS )NT)dtypeZdtype_first   )p)r   r   Z_dtypeZ
_get_stateZbinomialZastype)selfxr   seedstateres r   C/tmp/pip-unpacked-wheel-xnis5xre/onnx/reference/ops/op_bernoulli.py_run   s    

zBernoulli._run)NN)__name__
__module____qualname__r   r   r   r   r   r   
   s   r   N)
__future__r   Zonnx.helperr   Z$onnx.reference.ops._op_common_randomr   r   r   r   r   r   <module>   s   