
    i3                         d dl mZmZmZmZ ddlmZ ddlmZm	Z	m
Z
 eeeee   f   Zeeeedf   f   Z ede      Zded	eeef   fd
Zded	ee	e	f   fdZded	ee
e
f   fdZd Zy)    )SequenceTupleTypeVarUnion   )Model)ArrayXdFloatsXdIntsXd.ArrayTXd)boundindexreturnc                 *    t        dt        d| i      S )a5  Index into input arrays, and return the subarrays.

    index:
        A valid numpy-style index. Multi-dimensional indexing can be performed
        by passing in a tuple, and slicing can be performed using the slice object.
        For instance, X[:, :-1] would be (slice(None, None), slice(None, -1)).
    zarray-getitemr   attrsr   forwardr   s    k/var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/thinc/layers/array_getitem.pyarray_getitemr      s     ''51ABB    c                 *    t        dt        d| i      S )}Index into input arrays, and return the subarrays.

    This delegates to `array_getitem`, but allows type declarations.
    zfloats-getitemr   r   r   r   s    r   floats_getitemr      s    
 !77E2BCCr   c                 *    t        dt        d| i      S )r   zints-getitemr   r   r   r   s    r   ints_getitemr      s    
 %0@AAr   c                       j                   d   |j                  |j                   fd}t        |      dk(  r||fS |   }||fS )Nr   c                 L    j                   j                        }| |<   |S )N)dtype)opsalloc)dYdXr    r   modelshapes     r   backprop_get_columnz$forward.<locals>.backprop_get_column+   s'    YY__U%_05		r   r   )r   r&   r    len)r%   Xis_trainr'   Yr    r   r&   s   `    @@@r   r   r   &   sV    KK EGGEGGE
 1v{%%%	%A!!!r   N)typingr   r   r   r   r%   r   typesr	   r
   r   intslice	AxisIndexIndexr   r   r   r   r    r   r   <module>r3      s    2 2  - -#uhsm+,	iy#~../:W-C C58);#< CD% DE(H*<$= DB B%"7 B"r   