
    h-                     B    S SK rS SKrS SKJr  S SKJr   " S S\5      rg)    N)Base)expectc                   P    \ rS rSr\SS j5       r\SS j5       r\SS j5       rSrg)ConstantOfShape   Nc                     [         R                  " / SQ5      R                  [         R                  5      n [        R
                  R                  S[        R                  R                  S/S/5      n[        R
                  R                  SS/S/US9n[         R                  " U [         R                  S9n[        X /U/S	S
9  g )N)         value   r   xyinputsoutputsr   dtypetest_constantofshape_float_onesr   r   name)nparrayastypeint64onnxhelpermake_tensorTensorProtoFLOAT	make_nodeonesfloat32r   r   tensor_valuenoder   s       e/var/www/fran/franai/venv/lib/python3.13/site-packages/onnx/backend/test/case/node/constantofshape.pyexport_float_ones!ConstantOfShape.export_float_ones   s    HHY&&rxx0{{..T%%++aS1#
 {{$$5E	 % 
 GGARZZ(tC!3TU    c                     [         R                  " SS/5      R                  [         R                  5      n [        R
                  R                  S[        R                  R                  S/S/5      n[        R
                  R                  SS/S/US	9n[         R                  " U [         R                  S
9n[        X /U/SS9  g )N
      r   r   r   r   r   r   r   r   test_constantofshape_int_zerosr   r   r   r   r   r   r   r   r   INT32r!   zerosint32r   r$   s       r'   export_int32_zeros"ConstantOfShape.export_int32_zeros   s    HHb!W$$RXX.{{..T%%++aS1#
 {{$$5E	 % 
 HHQbhh'tC!3STr*   c                     [         R                  " S/5      R                  [         R                  5      n [        R
                  R                  S[        R                  R                  S/S/5      n[        R
                  R                  SS/S/US9n[         R                  " U [         R                  S9n[        X /U/S	S
9  g )Nr   r   r   r   r   r   r   r   #test_constantofshape_int_shape_zeror   r/   r$   s       r'   export_int32_shape_zero'ConstantOfShape.export_int32_shape_zero,   s    HH
 &
	 	

 {{..T%%++aS1#
 {{$$5E	 % 
 HHQbhh'qc0U	
r*    )returnN)	__name__
__module____qualname____firstlineno__staticmethodr(   r3   r7   __static_attributes__r9   r*   r'   r   r      s@    V V U U 
 
r*   r   )numpyr   r   onnx.backend.test.case.baser   onnx.backend.test.case.noder   r   r9   r*   r'   <module>rD      s   
   , .3
d 3
r*   