
    bIg^                    T    d dl mZ d dlZd dlZd dlmZ d dlmZ d Z	 G d de      Z
y)    )annotationsN)Base)expectc                b    t         j                  j                  d|       j                  |      S )N   )p)nprandombinomialastype)xdtypes     b/var/www/html/answerous/venv/lib/python3.12/site-packages/onnx/backend/test/case/node/bernoulli.py"bernoulli_reference_implementationr      s)    
 99a1%,,U33    c                  B    e Zd Zedd       Zedd       Zedd       Zy)	Bernoullic                     t         j                  j                  ddgdg      } t        j                  j                  ddd      j                  t              }t        |t              }t        | |g|gd	       y )
Nr   r   y)inputsoutputs              ?
   test_bernoullir   r   name)
onnxhelper	make_noder	   r
   uniformr   floatr   r   noder   r   s      r   export_bernoulli_without_dtypez(Bernoulli.export_bernoulli_without_dtype   sl    {{$$5E % 
 IIc3+2259.q%8tQC!3CDr   c                 <   t         j                  j                  ddgdgt         j                  j                        } t
        j                  j                  ddd      j                  t
        j                        }t        |t              }t        | |g|gd	       y )
Nr   r   r   )r   r   r   r   r   r   test_bernoulli_doubler   )r   r   r    TensorProtoDOUBLEr	   r
   r!   r   float32r   r"   r   r#   s      r   export_bernoulli_with_dtypez%Bernoulli.export_bernoulli_with_dtype"   s    {{$$5E""))	 % 
 IIc3+222::>.q%8tQC!3JKr   c                 6   t        d      } t        j                  j                  ddgdg|       }t        j
                  j                  ddd      j                  t        j                        }t        |t        j                        }t        ||g|gd	
       y )Nr   r   r   r   )r   r   seedr   r   r   test_bernoulli_seedr   )r"   r   r   r    r	   r
   r!   r   r*   r   r   )r-   r$   r   r   s       r   export_bernoulli_with_seedz$Bernoulli.export_bernoulli_with_seed/   s    Qx{{$$5E	 % 
 IIc3+222::>.q"**=tQC!3HIr   N)returnNone)__name__
__module____qualname__staticmethodr%   r+   r/    r   r   r   r      sB    	E 	E 
L 
L J Jr   r   )
__future__r   numpyr	   r   onnx.backend.test.case.baser   onnx.backend.test.case.noder   r   r   r6   r   r   <module>r;      s)    #   , .4&J &Jr   