Linux websever 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
Apache/2.4.52 (Ubuntu)
: 192.168.3.70 | : 192.168.1.99
Cant Read [ /etc/named.conf ]
8.1.2-1ubuntu2.23
urlab
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
numpy /
core /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
include
[ DIR ]
drwxr-xr-x
lib
[ DIR ]
drwxr-xr-x
tests
[ DIR ]
drwxr-xr-x
__init__.py
5.24
KB
-rw-r--r--
__init__.pyi
126
B
-rw-r--r--
_add_newdocs.py
187.41
KB
-rw-r--r--
_add_newdocs_scalars.py
8.59
KB
-rw-r--r--
_asarray.py
4.08
KB
-rw-r--r--
_asarray.pyi
1.89
KB
-rw-r--r--
_dtype.py
9.61
KB
-rw-r--r--
_dtype_ctypes.py
3.59
KB
-rw-r--r--
_exceptions.py
5.99
KB
-rw-r--r--
_internal.py
26.73
KB
-rw-r--r--
_internal.pyi
1.34
KB
-rw-r--r--
_methods.py
10.54
KB
-rw-r--r--
_multiarray_tests.cpython-310-...
122.6
KB
-rw-r--r--
_multiarray_umath.cpython-310-...
3.63
MB
-rw-r--r--
_operand_flag_tests.cpython-31...
14.2
KB
-rw-r--r--
_rational_tests.cpython-310-x8...
43.46
KB
-rw-r--r--
_simd.cpython-310-x86_64-linux...
1.91
MB
-rw-r--r--
_string_helpers.py
2.79
KB
-rw-r--r--
_struct_ufunc_tests.cpython-31...
14.38
KB
-rw-r--r--
_type_aliases.py
7.1
KB
-rw-r--r--
_type_aliases.pyi
520
B
-rw-r--r--
_ufunc_config.py
13.07
KB
-rw-r--r--
_ufunc_config.pyi
1.22
KB
-rw-r--r--
_umath_tests.cpython-310-x86_6...
34.8
KB
-rw-r--r--
arrayprint.py
60.18
KB
-rw-r--r--
arrayprint.pyi
4.56
KB
-rw-r--r--
cversions.py
347
B
-rw-r--r--
defchararray.py
68.1
KB
-rw-r--r--
einsumfunc.py
50.24
KB
-rw-r--r--
einsumfunc.pyi
3.62
KB
-rw-r--r--
fromnumeric.py
119.9
KB
-rw-r--r--
fromnumeric.pyi
7.83
KB
-rw-r--r--
function_base.py
18.57
KB
-rw-r--r--
function_base.pyi
1.44
KB
-rw-r--r--
generate_numpy_api.py
6.94
KB
-rw-r--r--
getlimits.py
19.31
KB
-rw-r--r--
machar.py
10.56
KB
-rw-r--r--
memmap.py
11.41
KB
-rw-r--r--
multiarray.py
54.01
KB
-rw-r--r--
numeric.py
74.93
KB
-rw-r--r--
numeric.pyi
4.76
KB
-rw-r--r--
numerictypes.py
16.91
KB
-rw-r--r--
numerictypes.pyi
2.85
KB
-rw-r--r--
overrides.py
7.94
KB
-rw-r--r--
records.py
36.58
KB
-rw-r--r--
setup.py
44.62
KB
-rw-r--r--
setup_common.py
19.31
KB
-rw-r--r--
shape_base.py
28.32
KB
-rw-r--r--
shape_base.pyi
1.04
KB
-rw-r--r--
umath.py
1.99
KB
-rw-r--r--
umath_tests.py
389
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : generate_numpy_api.py
import os import genapi from genapi import \ TypeApi, GlobalVarApi, FunctionApi, BoolValuesApi import numpy_api # use annotated api when running under cpychecker h_template = r""" #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", \ (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_Format(PyExc_RuntimeError, "FATAL: module compiled as unknown endian"); return -1; } #if NPY_BYTE_ORDER == NPY_BIG_ENDIAN if (st != NPY_CPU_BIG) { PyErr_Format(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_Format(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 """ c_template = r""" /* These pointers will be stored in the C-object for use in other extension modules */ void *PyArray_API[] = { %s }; """ c_api_header = """ =========== NumPy C-API =========== """ def generate_api(output_dir, force=False): basename = 'multiarray_api' h_file = os.path.join(output_dir, '__%s.h' % basename) c_file = os.path.join(output_dir, '__%s.c' % basename) d_file = os.path.join(output_dir, '%s.txt' % basename) targets = (h_file, c_file, d_file) sources = numpy_api.multiarray_api if (not force and not genapi.should_rebuild(targets, [numpy_api.__file__, __file__])): return targets else: do_generate_api(targets, sources) return targets def do_generate_api(targets, sources): header_file = targets[0] c_file = targets[1] doc_file = targets[2] global_vars = sources[0] scalar_bool_values = sources[1] types_api = sources[2] multiarray_funcs = sources[3] multiarray_api = sources[:] module_list = [] extension_list = [] init_list = [] # Check multiarray api indexes multiarray_api_index = genapi.merge_api_dicts(multiarray_api) genapi.check_api_dict(multiarray_api_index) numpyapi_list = genapi.get_api_functions('NUMPY_API', multiarray_funcs) # FIXME: ordered_funcs_api is unused ordered_funcs_api = genapi.order_dict(multiarray_funcs) # Create dict name -> *Api instance api_name = 'PyArray_API' multiarray_api_dict = {} for f in numpyapi_list: name = f.name index = multiarray_funcs[name][0] annotations = multiarray_funcs[name][1:] multiarray_api_dict[f.name] = FunctionApi(f.name, index, annotations, f.return_type, f.args, api_name) for name, val in global_vars.items(): index, type = val multiarray_api_dict[name] = GlobalVarApi(name, index, type, api_name) for name, val in scalar_bool_values.items(): index = val[0] multiarray_api_dict[name] = BoolValuesApi(name, index, api_name) for name, val in types_api.items(): index = val[0] internal_type = None if len(val) == 1 else val[1] multiarray_api_dict[name] = TypeApi( name, index, 'PyTypeObject', api_name, internal_type) if len(multiarray_api_dict) != len(multiarray_api_index): keys_dict = set(multiarray_api_dict.keys()) keys_index = set(multiarray_api_index.keys()) raise AssertionError( "Multiarray API size mismatch - " "index has extra keys {}, dict has extra keys {}" .format(keys_index - keys_dict, keys_dict - keys_index) ) extension_list = [] for name, index in genapi.order_dict(multiarray_api_index): api_item = multiarray_api_dict[name] extension_list.append(api_item.define_from_array_api_string()) init_list.append(api_item.array_api_define()) module_list.append(api_item.internal_define()) # Write to header s = h_template % ('\n'.join(module_list), '\n'.join(extension_list)) genapi.write_file(header_file, s) # Write to c-code s = c_template % ',\n'.join(init_list) genapi.write_file(c_file, s) # write to documentation s = c_api_header for func in numpyapi_list: s += func.to_ReST() s += '\n\n' genapi.write_file(doc_file, s) return targets
Close