o
    i!                     @   s  d Z ddlZddlZddlZddlZdd Ze  ddlmZ ddlm	Z	 e d Z
e	e
Z[[	dd	lmZ dd
lmZmZ ddlmZmZmZmZmZmZmZmZ ddlT ddlm  mZ ddlT ddlmZmZmZm Z m!Z! ddl"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z* ddl+m,Z,m-Z-m.Z. ddl/m0Z0 ddl1Z/ddl1m2Z3 ddl1m4Z4 ddl5Z/ddl6Z/dd Z7d8 ej9 ej9 Z9dZ:dZ;dd Z<dd Z=e<  ddl>Z>	 e= e_?dS )z5
Expose top-level symbols that are safe for import *
    Nc                  C   s   dd } t jdd }|dk r d|d  d|d	  d}t|ddl}| |}|d
k r=d|d  d|d	  d}t||dkrRd|d  d|d	  d}t|zddl}W n
 tyb   Y dS w | |}|dk rvd|j d}t|dS )a  
    Make sure the Python, NumPy and SciPy present are supported versions.
    This has to be done _before_ importing anything from Numba such that
    incompatible versions can be reported to the user. If this occurs _after_
    importing things from Numba and there's an issue in e.g. a Numba c-ext, a
    SystemError might have occurred which prevents reporting the likely cause of
    the problem (incompatible versions of critical dependencies).
    c                 S   s   t tt| jdd d S )N.   )tuplemapint__version__split)mod r
   L/home/ubuntu/transcripts/venv/lib/python3.10/site-packages/numba/__init__.pyextract_version   s   z._ensure_critical_deps.<locals>.extract_versionNr   )   
   z/Numba needs Python 3.10 or greater. Got Python r   r      )r      z-Numba needs NumPy 1.22 or greater. Got NumPy )r      z)Numba needs NumPy 2.4 or less. Got NumPy )r   r   z7Numba requires SciPy version 1.0 or greater. Got SciPy )sysversion_infoImportErrornumpyscipyr   )r   	PYVERSIONmsgnpnumpy_versionr   
sp_versionr
   r
   r   _ensure_critical_deps   sJ   r   r   )get_versions)generate_version_infoversion)config)typeserrors)typeofprangepndindexgdbgdb_breakpointgdb_init	literallyliteral_unroll)*)cfuncjitnjitstencil
jit_module)	vectorizeguvectorizethreading_layerget_num_threadsset_num_threadsset_parallel_chunksizeget_parallel_chunksizeget_thread_id)carrayfarray
from_dtype)experimental)objmode_context)parallel_chunksizec                 K   s   ddl m} |j| fi |S )Nr   )	_runtests)numba.testingr?   main)argvkwdsruntestsr
   r
   r   testw   s   rE   aK  
    cfunc
    from_dtype
    guvectorize
    jit
    experimental
    njit
    stencil
    jit_module
    typeof
    prange
    gdb
    gdb_breakpoint
    gdb_init
    vectorize
    objmode
    literal_unroll
    get_num_threads
    set_num_threads
    set_parallel_chunksize
    get_parallel_chunksize
    parallel_chunksize
    )r   .   r   )   r   r   c                  C   s   ddl } ddl}td}||j}|r/ttt|	 }|t
k r.dt
|jf  }t|n| d ddlm}m} |tk rJdt|  }t||  dS )z,
    Make sure llvmlite is operational.
    r   Nz(\d+)\.(\d+).(\d+)zfNumba requires at least version %d.%d.%d of llvmlite.
Installed version is %s.
Please update llvmlite.z'llvmlite version format not recognized!)llvm_version_infocheck_jit_executionzNumba requires at least version %d.%d.%d of LLVM.
Installed llvmlite is built against version %d.%d.%d.
Please update llvmlite.)warningsllvmliterecompilematchr   r   r   r   groups_min_llvmlite_versionr   warnllvmlite.bindingrH   rI   _min_llvm_version)rJ   rK   regexmverr   rH   rI   r
   r
   r   _ensure_llvm   s(   



rW   c                  C   s   t js|z^tjdrtjd ntjdrtjd ntjdr+tjd nW dS zttjj	d s;W W dS W n t
yW   t d	krSt jrSd
} t|  Y W dS w tjdd W dS    t d	krvt jrytd Y dS Y dS Y dS dS )zU
    Tries to enable SVML if configuration permits use and the library is found.
    linuxz
libsvml.sodarwinzlibsvml.dylibwinsvml_dispmdFhas_svmlx86_64z>SVML was found but llvmlite >= 0.23.2 is needed to support it.SVMLz-vector-library=SVMLTz'SVML was not found/could not be loaded.)r    DISABLE_INTEL_SVMLr   platform
startswithrK   bindingload_library_permanentlygetattrtargetsAttributeErrormachineDEBUGrJ   rQ   
set_option)r   r
   r
   r   _try_enable_svml   s:   
rj   )@__doc__r`   rL   r   rJ   r   _versionr   numba.misc.init_utilsr   r   r   
numba.corer    r!   r"   numba.misc.specialr#   r$   r%   r&   r'   r(   r)   r*   numba.core.errorsnumba.core.typescorenumba.core.decoratorsr,   r-   r.   r/   r0   numba.np.ufuncr1   r2   r3   r4   r5   r6   r7   r8   numba.np.numpy_supportr9   r:   r;   numbar<   numba.core.withcontextsr=   objmoder>   numba.core.target_extensionnumba.typedrE   r   __all__rP   rS   rW   rj   rK   
USING_SVMLr
   r
   r
   r   <module>   sT    .
((#/