
    Si                    T    S SK Jr  S SKrS SKJr          SS jr " S S\5      rg)    )annotationsN)OpRunc                J   [        U R                  5      n/ nSn[        U5       H2  nUR                  UR                  U   5        XQR                  U   -  nM4     UR                  S   X2-
  :X  a  U[	        UR                  5      US -   OBU[	        UR                  5      US -   [	        U R                  5      X!R                  S   -   S  -   n/ nUR                  USUR                  S   5      n	U R                  U/U R                  US  Q75      n
[        U	R                  S   5       HI  n[        U	R                  S   5       H*  n[        X   U   5      nUR                  X/UQ7   5        M,     MK     [        R                  " XR                  S9R                  U5      4$ )N   r   )dtype)
lenshaperangeappendlistreshapetuplenpasarrayr   )dataindices
batch_dims	data_rankbatch_dims_shapebatch_dims_sizeioutput_shapeoutput_data_bufferreshaped_indicesreshaped_data	batch_dim	outer_dimgather_indexs                 ]/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/onnx/reference/ops/op_gathernd.py_gather_nd_implr!      s    DJJI  O :a 01==++  MM"!77 	4.z"==
w}}
j
,-
tzz
:b(99;
<=   GMM"<MN LL/!LDJJz{4K!LMM +11!45	/55a89I !1!<Y!GHL%%m4N4N&OP : 6 JJ)<DD\RTT    c                      \ rS rSrSS jrSrg)GatherND8   Nc                    [        XU5      $ N)r!   )selfr   r   r   s       r    _runGatherND._run9   s    tj99r"    r'   )__name__
__module____qualname____firstlineno__r)   __static_attributes__r+   r"   r    r$   r$   8   s    :r"   r$   )r   
np.ndarrayr   r1   r   intreturnztuple[np.ndarray])
__future__r   numpyr   onnx.reference.op_runr   r!   r$   r+   r"   r    <module>r7      sG    #  '*U
*U)*U7:*U*UZ:u :r"   