Ë
    7Š·jô  ã                   ó  — d Z ddlZddlZddlmZ ddlZddlm	Z	  e«       Z
ej                  j                  d«      re
j                  d«      Zn5ej                  j                  d«      re
j                  d«      Zn ed«      ‚e
j!                  d«        e	«       Zej                  Zej&                  Zej(                  Zd	„ Z ej,                  ed
¬«      Z ee
j3                  de«      «      Z ede«      Z eedd «       y)a#  
Building the required library in this example requires a source distribution
of NumPy or clone of the NumPy git repository since distributions.c is not
included in binary distributions.

On *nix, execute in numpy/random/src/distributions

export ${PYTHON_VERSION}=3.8 # Python version
export PYTHON_INCLUDE=#path to Python's include folder, usually \
    ${PYTHON_HOME}/include/python${PYTHON_VERSION}m
export NUMPY_INCLUDE=#path to numpy's include folder, usually \
    ${PYTHON_HOME}/lib/python${PYTHON_VERSION}/site-packages/numpy/_core/include
gcc -shared -o libdistributions.so -fPIC distributions.c \
    -I${NUMPY_INCLUDE} -I${PYTHON_INCLUDE}
mv libdistributions.so ../../_examples/numba/

On Windows

rem PYTHON_HOME and PYTHON_VERSION are setup dependent, this is an example
set PYTHON_HOME=c:\Anaconda
set PYTHON_VERSION=38
cl.exe /LD .\distributions.c -DDLL_EXPORT \
    -I%PYTHON_HOME%\lib\site-packages\numpy\_core\include \
    -I%PYTHON_HOME%\include %PYTHON_HOME%\libs\python%PYTHON_VERSION%.lib
move distributions.dll ../../_examples/numba/
é    N)ÚFFI)ÚPCG64z./distributions.dllz./libdistributions.soz#Required DLL/so file was not found.z4
double random_standard_normal(void *bitgen_state);
c                 ól   — t        j                  | «      }t        | «      D ]  }t        |«      ||<   Œ |S )N)ÚnpÚemptyÚrangeÚrandom_standard_normal)ÚnÚbit_generatorÚoutÚis       új/root/workspace/.venv/lib/python3.12/site-packages/numpy/random/_examples/numba/extending_distributions.pyÚnormalsr   5   s5   € Ü
�(‰(�1‹+€CÜ�1‹Xò 7ˆÜ'¨Ó6ˆˆAŠð7à€Jó    T)ÚnopythonÚ	uintptr_tiè  é   )Ú__doc__ÚosÚnumbaÚnbÚcffir   Únumpyr   Únumpy.randomr   ÚffiÚpathÚexistsÚdlopenÚlibÚRuntimeErrorÚcdefÚxÚxffir   r	   r   ÚjitÚnormalsjÚintÚcastÚbit_generator_addressÚnormÚprint© r   r   ú<module>r,      sô   ðñó4 
ã Ý ã Ý á	ƒe€Ø‡7�7‡>�>Ð'Ô(Ø
�*‰*Ð*Ó
+�CØ‡W�W‡^�^Ð+Ô,Ø
�*‰*Ð,Ó
-�Cá
Ð<Ó
=Ð=à ‡�ð 
ô ñ 
ƒG€Ø‡v�v€Ø×"Ñ"€à×3Ñ3Ð òð ˆ2�6‰6�' DÔ)€ñ ˜CŸH™H [°-Ó@ÓAÐ á�Ð+Ó,€Ù €dˆ3ˆB€iÕ r   