ó
    „ñ:i�
  ã                   óx   • S r SSKJrJr  SSKJr  SSKJr  SSKJ	r	  SSK
JrJr  SSKJr  \S 5       r\S	 5       rg
)zd
This file provides internal compiler utilities that support certain special
operations with numpy.
é    )ÚtypesÚtyping)Úunpack_tuple)Ú	intrinsic)Úimpl_ret_new_ref)ÚRequireLiteralValueÚTypingError)Útuple_setitemc                 ó�   ^• SSK Jm  U4S jn[        U5      n[        R                  " US[        R
                  S9nU" U5      nXR4$ )zÇA version of numpy.empty whose dtype is inferred by the type system.

Expects `shape` to be a int-tuple.

There is special logic in the type-inferencer to handle the "refine"-ing
of undefined dtype.
r   )Ú_empty_nd_implc                 ó¬   >• UR                   nUR                  5       (       d   e[        XS   5      nT" XXE5      n[        XXFR	                  5       5      $ )Nr   )Úreturn_typeÚ
is_preciser   r   Ú	_getvalue)ÚcontextÚbuilderÚ	signatureÚargsÚarrtyÚshapesÚresr   s          €ÚZ/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/numba/np/unsafe/ndarray.pyÚcodegenÚempty_inferred.<locals>.codegen   sP   ø€ à×%Ñ%ˆØ×Ñ×!Ñ!Ð!Ð!Ü˜g¨A¡wÓ/ˆá˜W¨uÓ=ˆÜ °%¿¹»ÓIÐIó    ÚC)ÚndimÚlayoutÚdtype)Únumba.np.arrayobjr   Úlenr   ÚArrayÚ	undefined)Ú	typingctxÚshaper   ÚndÚarray_tyÚsigr   s         @r   Úempty_inferredr)      s@   ø€ õ 1õJô 
ˆU‹€BÜ�{Š{ ¨3´e·o±oÑF€HÙ
�5‹/€CØˆ<Ðr   c                 óN  ^^• [        U[        R                  5      (       d  [        S5      eUR                  S:w  a$  [        SR                  UR                  5      5      e[        UR                  5      m[        R                  " UR                  TS9mT" X5      nUU4S jnX44$ )z½Convert *array* into a tuple of *length*

Returns ``UniTuple(array.dtype, length)``

** Warning **
- No boundchecking.
  If *length* is longer than *array.size*, the behavior is undefined.
z$*length* argument must be a constanté   zNot supported on array.ndim={})r   Úcountc                 ó  >• S nUR                   S   [        R                  T/n[        R                  " T/UQ76 nU R                  [        R                  5      nU R                  T5      nUS   U" T5      U/n	U R                  XXi5      n
U
$ )Nc                 óJ   • Un[        U5       H  n[        X4X   5      nM     U$ )N)Úranger
   )ÚarrayÚlengthÚempty_tupleÚoutÚis        r   ÚimplÚ-to_fixed_tuple.<locals>.codegen.<locals>.impl?   s(   € ØˆCÜ˜6–]�Ü# C¨E©HÓ5’ñ #àˆJr   r   )r   r   Úintpr   r   Úget_value_typeÚget_constant_undefÚcompile_internal)r   r   r   r   r5   Úinner_argtypesÚ	inner_sigÚll_idx_typer2   Ú
inner_argsr   Ú
tuple_sizeÚ
tuple_types              €€r   r   Úto_fixed_tuple.<locals>.codegen>   sˆ   ø€ ò	ð $Ÿ.™.¨Ñ+¬U¯Z©Z¸ÐDˆÜ×$Ò$ ZÐA°.ÒAˆ	Ø×,Ñ,¬U¯Z©ZÓ8ˆà×0Ñ0°Ó<ˆØ˜1‘g™{¨:Ó6¸ÐDˆ
à×&Ñ& w°iÓLˆØˆ
r   )Ú
isinstancer   ÚIntegerLiteralr   r   r	   ÚformatÚintÚliteral_valueÚUniTupler   )r$   r0   r1   r(   r   r?   r@   s        @@r   Úto_fixed_tuplerH   )   s‰   ù€ ô �fœe×2Ñ2×3Ñ3Ü!Ð"HÓIÐIà‡z�z�QƒÜÐ:×AÑAÀ%Ç*Á*ÓMÓNÐNô �V×)Ñ)Ó*€JÜ—’ e§k¡k¸ÑD€JÙ
�UÓ
#€Cöð" ˆ<Ðr   N)Ú__doc__Ú
numba.corer   r   Únumba.core.cgutilsr   Únumba.core.extendingr   Únumba.core.imputilsr   Únumba.core.errorsr   r	   Únumba.cpython.unsafe.tupler
   r)   rH   © r   r   Ú<module>rQ      sF   ðñ÷ %Ý +Ý *Ý 0ß >å 4ð ñó ðð4 ñ%ó ñ%r   