PATH:
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
numpy
/
core
/
__pycache__
/
Editing: generate_numpy_api.cpython-311.pyc
� � h� � �~ � d dl Z d dlZd dlZd dlmZmZmZmZ d dlZdZdZ d d�Z d� Zd� Ze d k r e� � dS dS )� N)�TypeApi�GlobalVarApi�FunctionApi� BoolValuesApia� #if defined(_MULTIARRAYMODULE) || defined(WITH_CPYCHECKER_STEALS_REFERENCE_TO_ARG_ATTRIBUTE) typedef struct { PyObject_HEAD npy_bool obval; } PyBoolScalarObject; extern NPY_NO_EXPORT PyTypeObject PyArrayMapIter_Type; extern NPY_NO_EXPORT PyTypeObject PyArrayNeighborhoodIter_Type; extern NPY_NO_EXPORT PyBoolScalarObject _PyArrayScalar_BoolValues[2]; %s #else #if defined(PY_ARRAY_UNIQUE_SYMBOL) #define PyArray_API PY_ARRAY_UNIQUE_SYMBOL #endif #if defined(NO_IMPORT) || defined(NO_IMPORT_ARRAY) extern void **PyArray_API; #else #if defined(PY_ARRAY_UNIQUE_SYMBOL) void **PyArray_API; #else static void **PyArray_API=NULL; #endif #endif %s #if !defined(NO_IMPORT_ARRAY) && !defined(NO_IMPORT) static int _import_array(void) { int st; PyObject *numpy = PyImport_ImportModule("numpy.core._multiarray_umath"); PyObject *c_api = NULL; if (numpy == NULL) { return -1; } c_api = PyObject_GetAttrString(numpy, "_ARRAY_API"); Py_DECREF(numpy); if (c_api == NULL) { PyErr_SetString(PyExc_AttributeError, "_ARRAY_API not found"); return -1; } if (!PyCapsule_CheckExact(c_api)) { PyErr_SetString(PyExc_RuntimeError, "_ARRAY_API is not PyCapsule object"); Py_DECREF(c_api); return -1; } PyArray_API = (void **)PyCapsule_GetPointer(c_api, NULL); Py_DECREF(c_api); if (PyArray_API == NULL) { PyErr_SetString(PyExc_RuntimeError, "_ARRAY_API is NULL pointer"); return -1; } /* Perform runtime check of C API version */ if (NPY_VERSION != PyArray_GetNDArrayCVersion()) { PyErr_Format(PyExc_RuntimeError, "module compiled against "\ "ABI version 0x%%x but this version of numpy is 0x%%x", \ (int) NPY_VERSION, (int) PyArray_GetNDArrayCVersion()); return -1; } if (NPY_FEATURE_VERSION > PyArray_GetNDArrayCFeatureVersion()) { PyErr_Format(PyExc_RuntimeError, "module compiled against "\ "API version 0x%%x but this version of numpy is 0x%%x . "\ "Check the section C-API incompatibility at the "\ "Troubleshooting ImportError section at "\ "https://numpy.org/devdocs/user/troubleshooting-importerror.html"\ "#c-api-incompatibility "\ "for indications on how to solve this problem .", \ (int) NPY_FEATURE_VERSION, (int) PyArray_GetNDArrayCFeatureVersion()); return -1; } /* * Perform runtime check of endianness and check it matches the one set by * the headers (npy_endian.h) as a safeguard */ st = PyArray_GetEndianness(); if (st == NPY_CPU_UNKNOWN_ENDIAN) { PyErr_SetString(PyExc_RuntimeError, "FATAL: module compiled as unknown endian"); return -1; } #if NPY_BYTE_ORDER == NPY_BIG_ENDIAN if (st != NPY_CPU_BIG) { PyErr_SetString(PyExc_RuntimeError, "FATAL: module compiled as big endian, but " "detected different endianness at runtime"); return -1; } #elif NPY_BYTE_ORDER == NPY_LITTLE_ENDIAN if (st != NPY_CPU_LITTLE) { PyErr_SetString(PyExc_RuntimeError, "FATAL: module compiled as little endian, but " "detected different endianness at runtime"); return -1; } #endif return 0; } #define import_array() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NULL; } } #define import_array1(ret) {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return ret; } } #define import_array2(msg, ret) {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, msg); return ret; } } #endif #endif z{ /* These pointers will be stored in the C-object for use in other extension modules */ void *PyArray_API[] = { %s }; Fc �* � d}t j � | d|z � � }t j � | d|z � � }||f}t j }|s(t j |t j t g� � s|S t ||� � |S )N�multiarray_apiz__%s.hz__%s.c) �os�path�join� numpy_apir �genapi�should_rebuild�__file__�do_generate_api)� output_dir�force�basename�h_file�c_file�targets�sourcess �p/builddir/build/BUILD/cloudlinux-venv-1.0.8/venv/lib64/python3.11/site-packages/numpy/core/generate_numpy_api.py�generate_apir � s� � ��H� �W�\�\�*�h��&9� :� :�F� �W�\�\�*�h��&9� :� :�F��v��G��&�G�� *�&�/��)�:L�h�9W�X�X� *������)�)�)��N� c �j � | d }| d }|d }|d }|d }|d }|d d � }g } g } g }t j |� � }t j |� � t j d|� � } d}i }| D ]R}|j }|| d }|| dd � }t |j |||j |j |� � ||j <