
    Kh                        S r SSKrSSKrSSKrSSKJr  SSKJ	r	  \" 5       r
\R                  R                  S5      (       a  \
R                  S5      rO:\R                  R                  S5      (       a  \
R                  S5      rO\" S5      e\
R!                  S5        \	" 5       r\R                  r\R&                  r\R(                  rS	 r\R,                  " \S
S9r\" \
R3                  S\5      5      r\" S\5      r\" \SS 5        g)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                 p    [         R                  " U 5      n[        U 5       H  n[        U5      X#'   M     U$ )N)npemptyrangerandom_standard_normal)nbit_generatoroutis       f/var/www/html/env/lib/python3.13/site-packages/numpy/random/_examples/numba/extending_distributions.pynormalsr   5   s.    
((1+C1X'6 J    T)nopython	uintptr_ti     )__doc__osnumbanbnumpyr   cffir   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77>>'((
***
+CWW^^+,,
**,
-C
<
==  
  
Gvv""33  66'D) CHH[-@A +, d3Bi r   