Add loan-advisor-agent
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +5 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/__config__.py +170 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/__config__.pyi +108 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/__init__.cython-30.pxd +1242 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/__init__.pxd +1155 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/__init__.py +955 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/__init__.pyi +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/__config__.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/__init__.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/_array_api_info.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/_distributor_init.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/_expired_attrs_2_0.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/_globals.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/_pytesttester.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/dtypes.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/exceptions.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/version.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_array_api_info.py +346 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_array_api_info.pyi +206 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_configtool.py +39 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_configtool.pyi +1 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__init__.py +203 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__init__.pyi +666 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/__init__.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_add_newdocs.cpython-312.pyc +3 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_add_newdocs_scalars.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_asarray.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_dtype.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_dtype_ctypes.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_exceptions.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_internal.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_methods.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_string_helpers.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_type_aliases.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_ufunc_config.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/arrayprint.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/defchararray.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/einsumfunc.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/fromnumeric.cpython-312.pyc +3 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/function_base.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/getlimits.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/memmap.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/multiarray.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/numeric.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/numerictypes.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/overrides.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/printoptions.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/records.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/shape_base.cpython-312.pyc +0 -0
- loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/strings.cpython-312.pyc +0 -0
.gitattributes
CHANGED
|
@@ -443,3 +443,8 @@ loan-advisor-agent/.venv/Lib/site-packages/nltk/__pycache__/probability.cpython-
|
|
| 443 |
loan-advisor-agent/.venv/Lib/site-packages/nltk/corpus/reader/__pycache__/framenet.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
|
| 444 |
loan-advisor-agent/.venv/Lib/site-packages/nltk/corpus/reader/__pycache__/wordnet.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
|
| 445 |
loan-advisor-agent/.venv/Lib/site-packages/nltk/stem/__pycache__/snowball.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 443 |
loan-advisor-agent/.venv/Lib/site-packages/nltk/corpus/reader/__pycache__/framenet.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
|
| 444 |
loan-advisor-agent/.venv/Lib/site-packages/nltk/corpus/reader/__pycache__/wordnet.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
|
| 445 |
loan-advisor-agent/.venv/Lib/site-packages/nltk/stem/__pycache__/snowball.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
|
| 446 |
+
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_add_newdocs.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
|
| 447 |
+
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/fromnumeric.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
|
| 448 |
+
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/_multiarray_umath.cp312-win_amd64.pyd filter=lfs diff=lfs merge=lfs -text
|
| 449 |
+
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/_simd.cp312-win_amd64.pyd filter=lfs diff=lfs merge=lfs -text
|
| 450 |
+
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/lib/npymath.lib filter=lfs diff=lfs merge=lfs -text
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/__config__.py
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file is generated by numpy's build process
|
| 2 |
+
# It contains system_info results at the time of building this package.
|
| 3 |
+
from enum import Enum
|
| 4 |
+
from numpy._core._multiarray_umath import (
|
| 5 |
+
__cpu_features__,
|
| 6 |
+
__cpu_baseline__,
|
| 7 |
+
__cpu_dispatch__,
|
| 8 |
+
)
|
| 9 |
+
|
| 10 |
+
__all__ = ["show_config"]
|
| 11 |
+
_built_with_meson = True
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
class DisplayModes(Enum):
|
| 15 |
+
stdout = "stdout"
|
| 16 |
+
dicts = "dicts"
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def _cleanup(d):
|
| 20 |
+
"""
|
| 21 |
+
Removes empty values in a `dict` recursively
|
| 22 |
+
This ensures we remove values that Meson could not provide to CONFIG
|
| 23 |
+
"""
|
| 24 |
+
if isinstance(d, dict):
|
| 25 |
+
return {k: _cleanup(v) for k, v in d.items() if v and _cleanup(v)}
|
| 26 |
+
else:
|
| 27 |
+
return d
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
CONFIG = _cleanup(
|
| 31 |
+
{
|
| 32 |
+
"Compilers": {
|
| 33 |
+
"c": {
|
| 34 |
+
"name": "msvc",
|
| 35 |
+
"linker": r"link",
|
| 36 |
+
"version": "19.44.35225",
|
| 37 |
+
"commands": r"cl",
|
| 38 |
+
"args": r"",
|
| 39 |
+
"linker args": r"",
|
| 40 |
+
},
|
| 41 |
+
"cython": {
|
| 42 |
+
"name": "cython",
|
| 43 |
+
"linker": r"cython",
|
| 44 |
+
"version": "3.2.4",
|
| 45 |
+
"commands": r"cython",
|
| 46 |
+
"args": r"",
|
| 47 |
+
"linker args": r"",
|
| 48 |
+
},
|
| 49 |
+
"c++": {
|
| 50 |
+
"name": "msvc",
|
| 51 |
+
"linker": r"link",
|
| 52 |
+
"version": "19.44.35225",
|
| 53 |
+
"commands": r"cl",
|
| 54 |
+
"args": r"",
|
| 55 |
+
"linker args": r"",
|
| 56 |
+
},
|
| 57 |
+
},
|
| 58 |
+
"Machine Information": {
|
| 59 |
+
"host": {
|
| 60 |
+
"cpu": "x86_64",
|
| 61 |
+
"family": "x86_64",
|
| 62 |
+
"endian": "little",
|
| 63 |
+
"system": "windows",
|
| 64 |
+
},
|
| 65 |
+
"build": {
|
| 66 |
+
"cpu": "x86_64",
|
| 67 |
+
"family": "x86_64",
|
| 68 |
+
"endian": "little",
|
| 69 |
+
"system": "windows",
|
| 70 |
+
},
|
| 71 |
+
"cross-compiled": bool("False".lower().replace("false", "")),
|
| 72 |
+
},
|
| 73 |
+
"Build Dependencies": {
|
| 74 |
+
"blas": {
|
| 75 |
+
"name": "scipy-openblas",
|
| 76 |
+
"found": bool("True".lower().replace("false", "")),
|
| 77 |
+
"version": "0.3.31.188.0",
|
| 78 |
+
"detection method": "pkgconfig",
|
| 79 |
+
"include directory": r"C:/Users/runneradmin/AppData/Local/Temp/cibw-run-mo_5b201/cp312-win_amd64/build/venv/Lib/site-packages/scipy_openblas64/include",
|
| 80 |
+
"lib directory": r"C:/Users/runneradmin/AppData/Local/Temp/cibw-run-mo_5b201/cp312-win_amd64/build/venv/Lib/site-packages/scipy_openblas64/lib",
|
| 81 |
+
"openblas configuration": r"OpenBLAS 0.3.31.188.0 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=24",
|
| 82 |
+
"pc file directory": r"D:/a/numpy-release/numpy-release/.openblas",
|
| 83 |
+
},
|
| 84 |
+
"lapack": {
|
| 85 |
+
"name": "scipy-openblas",
|
| 86 |
+
"found": bool("True".lower().replace("false", "")),
|
| 87 |
+
"version": "0.3.31.188.0",
|
| 88 |
+
"detection method": "pkgconfig",
|
| 89 |
+
"include directory": r"C:/Users/runneradmin/AppData/Local/Temp/cibw-run-mo_5b201/cp312-win_amd64/build/venv/Lib/site-packages/scipy_openblas64/include",
|
| 90 |
+
"lib directory": r"C:/Users/runneradmin/AppData/Local/Temp/cibw-run-mo_5b201/cp312-win_amd64/build/venv/Lib/site-packages/scipy_openblas64/lib",
|
| 91 |
+
"openblas configuration": r"OpenBLAS 0.3.31.188.0 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=24",
|
| 92 |
+
"pc file directory": r"D:/a/numpy-release/numpy-release/.openblas",
|
| 93 |
+
},
|
| 94 |
+
},
|
| 95 |
+
"Python Information": {
|
| 96 |
+
"path": r"C:\Users\runneradmin\AppData\Local\Temp\build-env-z5k2oeff\Scripts\python.exe",
|
| 97 |
+
"version": "3.12",
|
| 98 |
+
},
|
| 99 |
+
"SIMD Extensions": {
|
| 100 |
+
"baseline": __cpu_baseline__,
|
| 101 |
+
"found": [
|
| 102 |
+
feature for feature in __cpu_dispatch__ if __cpu_features__[feature]
|
| 103 |
+
],
|
| 104 |
+
"not found": [
|
| 105 |
+
feature for feature in __cpu_dispatch__ if not __cpu_features__[feature]
|
| 106 |
+
],
|
| 107 |
+
},
|
| 108 |
+
}
|
| 109 |
+
)
|
| 110 |
+
|
| 111 |
+
|
| 112 |
+
def _check_pyyaml():
|
| 113 |
+
import yaml
|
| 114 |
+
|
| 115 |
+
return yaml
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
def show(mode=DisplayModes.stdout.value):
|
| 119 |
+
"""
|
| 120 |
+
Show libraries and system information on which NumPy was built
|
| 121 |
+
and is being used
|
| 122 |
+
|
| 123 |
+
Parameters
|
| 124 |
+
----------
|
| 125 |
+
mode : {`'stdout'`, `'dicts'`}, optional.
|
| 126 |
+
Indicates how to display the config information.
|
| 127 |
+
`'stdout'` prints to console, `'dicts'` returns a dictionary
|
| 128 |
+
of the configuration.
|
| 129 |
+
|
| 130 |
+
Returns
|
| 131 |
+
-------
|
| 132 |
+
out : {`dict`, `None`}
|
| 133 |
+
If mode is `'dicts'`, a dict is returned, else None
|
| 134 |
+
|
| 135 |
+
See Also
|
| 136 |
+
--------
|
| 137 |
+
get_include : Returns the directory containing NumPy C
|
| 138 |
+
header files.
|
| 139 |
+
|
| 140 |
+
Notes
|
| 141 |
+
-----
|
| 142 |
+
1. The `'stdout'` mode will give more readable
|
| 143 |
+
output if ``pyyaml`` is installed
|
| 144 |
+
|
| 145 |
+
"""
|
| 146 |
+
if mode == DisplayModes.stdout.value:
|
| 147 |
+
try: # Non-standard library, check import
|
| 148 |
+
yaml = _check_pyyaml()
|
| 149 |
+
|
| 150 |
+
print(yaml.dump(CONFIG))
|
| 151 |
+
except ModuleNotFoundError:
|
| 152 |
+
import warnings
|
| 153 |
+
import json
|
| 154 |
+
|
| 155 |
+
warnings.warn("Install `pyyaml` for better output", stacklevel=1)
|
| 156 |
+
print(json.dumps(CONFIG, indent=2))
|
| 157 |
+
elif mode == DisplayModes.dicts.value:
|
| 158 |
+
return CONFIG
|
| 159 |
+
else:
|
| 160 |
+
raise AttributeError(
|
| 161 |
+
f"Invalid `mode`, use one of: {', '.join([e.value for e in DisplayModes])}"
|
| 162 |
+
)
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
def show_config(mode=DisplayModes.stdout.value):
|
| 166 |
+
return show(mode)
|
| 167 |
+
|
| 168 |
+
|
| 169 |
+
show_config.__doc__ = show.__doc__
|
| 170 |
+
show_config.__module__ = "numpy"
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/__config__.pyi
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from enum import Enum
|
| 2 |
+
from types import ModuleType
|
| 3 |
+
from typing import (
|
| 4 |
+
Final,
|
| 5 |
+
Literal as L,
|
| 6 |
+
NotRequired,
|
| 7 |
+
TypedDict,
|
| 8 |
+
overload,
|
| 9 |
+
type_check_only,
|
| 10 |
+
)
|
| 11 |
+
|
| 12 |
+
_CompilerConfigDictValue = TypedDict(
|
| 13 |
+
"_CompilerConfigDictValue",
|
| 14 |
+
{
|
| 15 |
+
"name": str,
|
| 16 |
+
"linker": str,
|
| 17 |
+
"version": str,
|
| 18 |
+
"commands": str,
|
| 19 |
+
"args": str,
|
| 20 |
+
"linker args": str,
|
| 21 |
+
},
|
| 22 |
+
)
|
| 23 |
+
_CompilerConfigDict = TypedDict(
|
| 24 |
+
"_CompilerConfigDict",
|
| 25 |
+
{
|
| 26 |
+
"c": _CompilerConfigDictValue,
|
| 27 |
+
"cython": _CompilerConfigDictValue,
|
| 28 |
+
"c++": _CompilerConfigDictValue,
|
| 29 |
+
},
|
| 30 |
+
)
|
| 31 |
+
_MachineInformationDict = TypedDict(
|
| 32 |
+
"_MachineInformationDict",
|
| 33 |
+
{
|
| 34 |
+
"host": _MachineInformationDictValue,
|
| 35 |
+
"build": _MachineInformationDictValue,
|
| 36 |
+
"cross-compiled": NotRequired[L[True]],
|
| 37 |
+
},
|
| 38 |
+
)
|
| 39 |
+
|
| 40 |
+
@type_check_only
|
| 41 |
+
class _MachineInformationDictValue(TypedDict):
|
| 42 |
+
cpu: str
|
| 43 |
+
family: str
|
| 44 |
+
endian: L["little", "big"]
|
| 45 |
+
system: str
|
| 46 |
+
|
| 47 |
+
_BuildDependenciesDictValue = TypedDict(
|
| 48 |
+
"_BuildDependenciesDictValue",
|
| 49 |
+
{
|
| 50 |
+
"name": str,
|
| 51 |
+
"found": NotRequired[L[True]],
|
| 52 |
+
"version": str,
|
| 53 |
+
"include directory": str,
|
| 54 |
+
"lib directory": str,
|
| 55 |
+
"openblas configuration": str,
|
| 56 |
+
"pc file directory": str,
|
| 57 |
+
},
|
| 58 |
+
)
|
| 59 |
+
|
| 60 |
+
class _BuildDependenciesDict(TypedDict):
|
| 61 |
+
blas: _BuildDependenciesDictValue
|
| 62 |
+
lapack: _BuildDependenciesDictValue
|
| 63 |
+
|
| 64 |
+
class _PythonInformationDict(TypedDict):
|
| 65 |
+
path: str
|
| 66 |
+
version: str
|
| 67 |
+
|
| 68 |
+
_SIMDExtensionsDict = TypedDict(
|
| 69 |
+
"_SIMDExtensionsDict",
|
| 70 |
+
{
|
| 71 |
+
"baseline": list[str],
|
| 72 |
+
"found": list[str],
|
| 73 |
+
"not found": list[str],
|
| 74 |
+
},
|
| 75 |
+
)
|
| 76 |
+
|
| 77 |
+
_ConfigDict = TypedDict(
|
| 78 |
+
"_ConfigDict",
|
| 79 |
+
{
|
| 80 |
+
"Compilers": _CompilerConfigDict,
|
| 81 |
+
"Machine Information": _MachineInformationDict,
|
| 82 |
+
"Build Dependencies": _BuildDependenciesDict,
|
| 83 |
+
"Python Information": _PythonInformationDict,
|
| 84 |
+
"SIMD Extensions": _SIMDExtensionsDict,
|
| 85 |
+
},
|
| 86 |
+
)
|
| 87 |
+
|
| 88 |
+
###
|
| 89 |
+
|
| 90 |
+
__all__ = ["show_config"]
|
| 91 |
+
|
| 92 |
+
CONFIG: Final[_ConfigDict] = ...
|
| 93 |
+
|
| 94 |
+
class DisplayModes(Enum):
|
| 95 |
+
stdout = "stdout"
|
| 96 |
+
dicts = "dicts"
|
| 97 |
+
|
| 98 |
+
def _check_pyyaml() -> ModuleType: ...
|
| 99 |
+
|
| 100 |
+
@overload
|
| 101 |
+
def show(mode: L["stdout"] = "stdout") -> None: ...
|
| 102 |
+
@overload
|
| 103 |
+
def show(mode: L["dicts"]) -> _ConfigDict: ...
|
| 104 |
+
|
| 105 |
+
@overload
|
| 106 |
+
def show_config(mode: L["stdout"] = "stdout") -> None: ...
|
| 107 |
+
@overload
|
| 108 |
+
def show_config(mode: L["dicts"]) -> _ConfigDict: ...
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/__init__.cython-30.pxd
ADDED
|
@@ -0,0 +1,1242 @@
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# NumPy static imports for Cython >= 3.0
|
| 2 |
+
#
|
| 3 |
+
# If any of the PyArray_* functions are called, import_array must be
|
| 4 |
+
# called first. This is done automatically by Cython 3.0+ if a call
|
| 5 |
+
# is not detected inside of the module.
|
| 6 |
+
#
|
| 7 |
+
# Author: Dag Sverre Seljebotn
|
| 8 |
+
#
|
| 9 |
+
|
| 10 |
+
from cpython.ref cimport Py_INCREF
|
| 11 |
+
from cpython.object cimport PyObject, PyTypeObject, PyObject_TypeCheck
|
| 12 |
+
cimport libc.stdio as stdio
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
cdef extern from *:
|
| 16 |
+
# Leave a marker that the NumPy declarations came from NumPy itself and not from Cython.
|
| 17 |
+
# See https://github.com/cython/cython/issues/3573
|
| 18 |
+
"""
|
| 19 |
+
/* Using NumPy API declarations from "numpy/__init__.cython-30.pxd" */
|
| 20 |
+
"""
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
cdef extern from "numpy/arrayobject.h":
|
| 24 |
+
# It would be nice to use size_t and ssize_t, but ssize_t has special
|
| 25 |
+
# implicit conversion rules, so just use "long".
|
| 26 |
+
# Note: The actual type only matters for Cython promotion, so long
|
| 27 |
+
# is closer than int, but could lead to incorrect promotion.
|
| 28 |
+
# (Not to worrying, and always the status-quo.)
|
| 29 |
+
ctypedef signed long npy_intp
|
| 30 |
+
ctypedef unsigned long npy_uintp
|
| 31 |
+
|
| 32 |
+
ctypedef unsigned char npy_bool
|
| 33 |
+
|
| 34 |
+
ctypedef signed char npy_byte
|
| 35 |
+
ctypedef signed short npy_short
|
| 36 |
+
ctypedef signed int npy_int
|
| 37 |
+
ctypedef signed long npy_long
|
| 38 |
+
ctypedef signed long long npy_longlong
|
| 39 |
+
|
| 40 |
+
ctypedef unsigned char npy_ubyte
|
| 41 |
+
ctypedef unsigned short npy_ushort
|
| 42 |
+
ctypedef unsigned int npy_uint
|
| 43 |
+
ctypedef unsigned long npy_ulong
|
| 44 |
+
ctypedef unsigned long long npy_ulonglong
|
| 45 |
+
|
| 46 |
+
ctypedef float npy_float
|
| 47 |
+
ctypedef double npy_double
|
| 48 |
+
ctypedef long double npy_longdouble
|
| 49 |
+
|
| 50 |
+
ctypedef signed char npy_int8
|
| 51 |
+
ctypedef signed short npy_int16
|
| 52 |
+
ctypedef signed int npy_int32
|
| 53 |
+
ctypedef signed long long npy_int64
|
| 54 |
+
|
| 55 |
+
ctypedef unsigned char npy_uint8
|
| 56 |
+
ctypedef unsigned short npy_uint16
|
| 57 |
+
ctypedef unsigned int npy_uint32
|
| 58 |
+
ctypedef unsigned long long npy_uint64
|
| 59 |
+
|
| 60 |
+
ctypedef float npy_float32
|
| 61 |
+
ctypedef double npy_float64
|
| 62 |
+
ctypedef long double npy_float80
|
| 63 |
+
ctypedef long double npy_float96
|
| 64 |
+
ctypedef long double npy_float128
|
| 65 |
+
|
| 66 |
+
ctypedef struct npy_cfloat:
|
| 67 |
+
pass
|
| 68 |
+
|
| 69 |
+
ctypedef struct npy_cdouble:
|
| 70 |
+
pass
|
| 71 |
+
|
| 72 |
+
ctypedef struct npy_clongdouble:
|
| 73 |
+
pass
|
| 74 |
+
|
| 75 |
+
ctypedef struct npy_complex64:
|
| 76 |
+
pass
|
| 77 |
+
|
| 78 |
+
ctypedef struct npy_complex128:
|
| 79 |
+
pass
|
| 80 |
+
|
| 81 |
+
ctypedef struct npy_complex160:
|
| 82 |
+
pass
|
| 83 |
+
|
| 84 |
+
ctypedef struct npy_complex192:
|
| 85 |
+
pass
|
| 86 |
+
|
| 87 |
+
ctypedef struct npy_complex256:
|
| 88 |
+
pass
|
| 89 |
+
|
| 90 |
+
ctypedef struct PyArray_Dims:
|
| 91 |
+
npy_intp *ptr
|
| 92 |
+
int len
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
cdef enum NPY_TYPES:
|
| 96 |
+
NPY_BOOL
|
| 97 |
+
NPY_BYTE
|
| 98 |
+
NPY_UBYTE
|
| 99 |
+
NPY_SHORT
|
| 100 |
+
NPY_USHORT
|
| 101 |
+
NPY_INT
|
| 102 |
+
NPY_UINT
|
| 103 |
+
NPY_LONG
|
| 104 |
+
NPY_ULONG
|
| 105 |
+
NPY_LONGLONG
|
| 106 |
+
NPY_ULONGLONG
|
| 107 |
+
NPY_FLOAT
|
| 108 |
+
NPY_DOUBLE
|
| 109 |
+
NPY_LONGDOUBLE
|
| 110 |
+
NPY_CFLOAT
|
| 111 |
+
NPY_CDOUBLE
|
| 112 |
+
NPY_CLONGDOUBLE
|
| 113 |
+
NPY_OBJECT
|
| 114 |
+
NPY_STRING
|
| 115 |
+
NPY_UNICODE
|
| 116 |
+
NPY_VSTRING
|
| 117 |
+
NPY_VOID
|
| 118 |
+
NPY_DATETIME
|
| 119 |
+
NPY_TIMEDELTA
|
| 120 |
+
NPY_NTYPES_LEGACY
|
| 121 |
+
NPY_NOTYPE
|
| 122 |
+
|
| 123 |
+
NPY_INT8
|
| 124 |
+
NPY_INT16
|
| 125 |
+
NPY_INT32
|
| 126 |
+
NPY_INT64
|
| 127 |
+
NPY_UINT8
|
| 128 |
+
NPY_UINT16
|
| 129 |
+
NPY_UINT32
|
| 130 |
+
NPY_UINT64
|
| 131 |
+
NPY_FLOAT16
|
| 132 |
+
NPY_FLOAT32
|
| 133 |
+
NPY_FLOAT64
|
| 134 |
+
NPY_FLOAT80
|
| 135 |
+
NPY_FLOAT96
|
| 136 |
+
NPY_FLOAT128
|
| 137 |
+
NPY_COMPLEX64
|
| 138 |
+
NPY_COMPLEX128
|
| 139 |
+
NPY_COMPLEX160
|
| 140 |
+
NPY_COMPLEX192
|
| 141 |
+
NPY_COMPLEX256
|
| 142 |
+
|
| 143 |
+
NPY_INTP
|
| 144 |
+
NPY_UINTP
|
| 145 |
+
NPY_DEFAULT_INT # Not a compile time constant (normally)!
|
| 146 |
+
|
| 147 |
+
ctypedef enum NPY_ORDER:
|
| 148 |
+
NPY_ANYORDER
|
| 149 |
+
NPY_CORDER
|
| 150 |
+
NPY_FORTRANORDER
|
| 151 |
+
NPY_KEEPORDER
|
| 152 |
+
|
| 153 |
+
ctypedef enum NPY_CASTING:
|
| 154 |
+
NPY_NO_CASTING
|
| 155 |
+
NPY_EQUIV_CASTING
|
| 156 |
+
NPY_SAFE_CASTING
|
| 157 |
+
NPY_SAME_KIND_CASTING
|
| 158 |
+
NPY_UNSAFE_CASTING
|
| 159 |
+
NPY_SAME_VALUE_CASTING
|
| 160 |
+
|
| 161 |
+
ctypedef enum NPY_CLIPMODE:
|
| 162 |
+
NPY_CLIP
|
| 163 |
+
NPY_WRAP
|
| 164 |
+
NPY_RAISE
|
| 165 |
+
|
| 166 |
+
ctypedef enum NPY_SCALARKIND:
|
| 167 |
+
NPY_NOSCALAR,
|
| 168 |
+
NPY_BOOL_SCALAR,
|
| 169 |
+
NPY_INTPOS_SCALAR,
|
| 170 |
+
NPY_INTNEG_SCALAR,
|
| 171 |
+
NPY_FLOAT_SCALAR,
|
| 172 |
+
NPY_COMPLEX_SCALAR,
|
| 173 |
+
NPY_OBJECT_SCALAR
|
| 174 |
+
|
| 175 |
+
ctypedef enum NPY_SORTKIND:
|
| 176 |
+
NPY_QUICKSORT
|
| 177 |
+
NPY_HEAPSORT
|
| 178 |
+
NPY_MERGESORT
|
| 179 |
+
|
| 180 |
+
ctypedef enum NPY_SEARCHSIDE:
|
| 181 |
+
NPY_SEARCHLEFT
|
| 182 |
+
NPY_SEARCHRIGHT
|
| 183 |
+
|
| 184 |
+
enum:
|
| 185 |
+
NPY_ARRAY_C_CONTIGUOUS
|
| 186 |
+
NPY_ARRAY_F_CONTIGUOUS
|
| 187 |
+
NPY_ARRAY_OWNDATA
|
| 188 |
+
NPY_ARRAY_FORCECAST
|
| 189 |
+
NPY_ARRAY_ENSURECOPY
|
| 190 |
+
NPY_ARRAY_ENSUREARRAY
|
| 191 |
+
NPY_ARRAY_ELEMENTSTRIDES
|
| 192 |
+
NPY_ARRAY_ALIGNED
|
| 193 |
+
NPY_ARRAY_NOTSWAPPED
|
| 194 |
+
NPY_ARRAY_WRITEABLE
|
| 195 |
+
NPY_ARRAY_WRITEBACKIFCOPY
|
| 196 |
+
|
| 197 |
+
NPY_ARRAY_BEHAVED
|
| 198 |
+
NPY_ARRAY_BEHAVED_NS
|
| 199 |
+
NPY_ARRAY_CARRAY
|
| 200 |
+
NPY_ARRAY_CARRAY_RO
|
| 201 |
+
NPY_ARRAY_FARRAY
|
| 202 |
+
NPY_ARRAY_FARRAY_RO
|
| 203 |
+
NPY_ARRAY_DEFAULT
|
| 204 |
+
|
| 205 |
+
NPY_ARRAY_IN_ARRAY
|
| 206 |
+
NPY_ARRAY_OUT_ARRAY
|
| 207 |
+
NPY_ARRAY_INOUT_ARRAY
|
| 208 |
+
NPY_ARRAY_IN_FARRAY
|
| 209 |
+
NPY_ARRAY_OUT_FARRAY
|
| 210 |
+
NPY_ARRAY_INOUT_FARRAY
|
| 211 |
+
|
| 212 |
+
NPY_ARRAY_UPDATE_ALL
|
| 213 |
+
|
| 214 |
+
cdef enum:
|
| 215 |
+
NPY_MAXDIMS # 64 on NumPy 2.x and 32 on NumPy 1.x
|
| 216 |
+
NPY_RAVEL_AXIS # Used for functions like PyArray_Mean
|
| 217 |
+
|
| 218 |
+
ctypedef void (*PyArray_VectorUnaryFunc)(void *, void *, npy_intp, void *, void *)
|
| 219 |
+
|
| 220 |
+
ctypedef struct PyArray_ArrayDescr:
|
| 221 |
+
# shape is a tuple, but Cython doesn't support "tuple shape"
|
| 222 |
+
# inside a non-PyObject declaration, so we have to declare it
|
| 223 |
+
# as just a PyObject*.
|
| 224 |
+
PyObject* shape
|
| 225 |
+
|
| 226 |
+
ctypedef struct PyArray_Descr:
|
| 227 |
+
pass
|
| 228 |
+
|
| 229 |
+
ctypedef class numpy.dtype [object PyArray_Descr, check_size ignore]:
|
| 230 |
+
# Use PyDataType_* macros when possible, however there are no macros
|
| 231 |
+
# for accessing some of the fields, so some are defined.
|
| 232 |
+
cdef PyTypeObject* typeobj
|
| 233 |
+
cdef char kind
|
| 234 |
+
cdef char type
|
| 235 |
+
# Numpy sometimes mutates this without warning (e.g. it'll
|
| 236 |
+
# sometimes change "|" to "<" in shared dtype objects on
|
| 237 |
+
# little-endian machines). If this matters to you, use
|
| 238 |
+
# PyArray_IsNativeByteOrder(dtype.byteorder) instead of
|
| 239 |
+
# directly accessing this field.
|
| 240 |
+
cdef char byteorder
|
| 241 |
+
cdef int type_num
|
| 242 |
+
|
| 243 |
+
@property
|
| 244 |
+
cdef inline npy_intp itemsize(self) noexcept nogil:
|
| 245 |
+
return PyDataType_ELSIZE(self)
|
| 246 |
+
|
| 247 |
+
@property
|
| 248 |
+
cdef inline npy_intp alignment(self) noexcept nogil:
|
| 249 |
+
return PyDataType_ALIGNMENT(self)
|
| 250 |
+
|
| 251 |
+
# Use fields/names with care as they may be NULL. You must check
|
| 252 |
+
# for this using PyDataType_HASFIELDS.
|
| 253 |
+
@property
|
| 254 |
+
cdef inline object fields(self):
|
| 255 |
+
return <object>PyDataType_FIELDS(self)
|
| 256 |
+
|
| 257 |
+
@property
|
| 258 |
+
cdef inline tuple names(self):
|
| 259 |
+
return <tuple>PyDataType_NAMES(self)
|
| 260 |
+
|
| 261 |
+
# Use PyDataType_HASSUBARRAY to test whether this field is
|
| 262 |
+
# valid (the pointer can be NULL). Most users should access
|
| 263 |
+
# this field via the inline helper method PyDataType_SHAPE.
|
| 264 |
+
@property
|
| 265 |
+
cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
|
| 266 |
+
return PyDataType_SUBARRAY(self)
|
| 267 |
+
|
| 268 |
+
@property
|
| 269 |
+
cdef inline npy_uint64 flags(self) noexcept nogil:
|
| 270 |
+
"""The data types flags."""
|
| 271 |
+
return PyDataType_FLAGS(self)
|
| 272 |
+
|
| 273 |
+
|
| 274 |
+
ctypedef class numpy.flatiter [object PyArrayIterObject, check_size ignore]:
|
| 275 |
+
# Use through macros
|
| 276 |
+
pass
|
| 277 |
+
|
| 278 |
+
ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
|
| 279 |
+
|
| 280 |
+
@property
|
| 281 |
+
cdef inline int numiter(self) noexcept nogil:
|
| 282 |
+
"""The number of arrays that need to be broadcast to the same shape."""
|
| 283 |
+
return PyArray_MultiIter_NUMITER(self)
|
| 284 |
+
|
| 285 |
+
@property
|
| 286 |
+
cdef inline npy_intp size(self) noexcept nogil:
|
| 287 |
+
"""The total broadcasted size."""
|
| 288 |
+
return PyArray_MultiIter_SIZE(self)
|
| 289 |
+
|
| 290 |
+
@property
|
| 291 |
+
cdef inline npy_intp index(self) noexcept nogil:
|
| 292 |
+
"""The current (1-d) index into the broadcasted result."""
|
| 293 |
+
return PyArray_MultiIter_INDEX(self)
|
| 294 |
+
|
| 295 |
+
@property
|
| 296 |
+
cdef inline int nd(self) noexcept nogil:
|
| 297 |
+
"""The number of dimensions in the broadcasted result."""
|
| 298 |
+
return PyArray_MultiIter_NDIM(self)
|
| 299 |
+
|
| 300 |
+
@property
|
| 301 |
+
cdef inline npy_intp* dimensions(self) noexcept nogil:
|
| 302 |
+
"""The shape of the broadcasted result."""
|
| 303 |
+
return PyArray_MultiIter_DIMS(self)
|
| 304 |
+
|
| 305 |
+
@property
|
| 306 |
+
cdef inline void** iters(self) noexcept nogil:
|
| 307 |
+
"""An array of iterator objects that holds the iterators for the arrays to be broadcast together.
|
| 308 |
+
On return, the iterators are adjusted for broadcasting."""
|
| 309 |
+
return PyArray_MultiIter_ITERS(self)
|
| 310 |
+
|
| 311 |
+
|
| 312 |
+
ctypedef struct PyArrayObject:
|
| 313 |
+
# For use in situations where ndarray can't replace PyArrayObject*,
|
| 314 |
+
# like PyArrayObject**.
|
| 315 |
+
pass
|
| 316 |
+
|
| 317 |
+
ctypedef class numpy.ndarray [object PyArrayObject, check_size ignore]:
|
| 318 |
+
cdef __cythonbufferdefaults__ = {"mode": "strided"}
|
| 319 |
+
|
| 320 |
+
# NOTE: no field declarations since direct access is deprecated since NumPy 1.7
|
| 321 |
+
# Instead, we use properties that map to the corresponding C-API functions.
|
| 322 |
+
|
| 323 |
+
@property
|
| 324 |
+
cdef inline PyObject* base(self) noexcept nogil:
|
| 325 |
+
"""Returns a borrowed reference to the object owning the data/memory.
|
| 326 |
+
"""
|
| 327 |
+
return PyArray_BASE(self)
|
| 328 |
+
|
| 329 |
+
@property
|
| 330 |
+
cdef inline dtype descr(self):
|
| 331 |
+
"""Returns an owned reference to the dtype of the array.
|
| 332 |
+
"""
|
| 333 |
+
return <dtype>PyArray_DESCR(self)
|
| 334 |
+
|
| 335 |
+
@property
|
| 336 |
+
cdef inline int ndim(self) noexcept nogil:
|
| 337 |
+
"""Returns the number of dimensions in the array.
|
| 338 |
+
"""
|
| 339 |
+
return PyArray_NDIM(self)
|
| 340 |
+
|
| 341 |
+
@property
|
| 342 |
+
cdef inline npy_intp *shape(self) noexcept nogil:
|
| 343 |
+
"""Returns a pointer to the dimensions/shape of the array.
|
| 344 |
+
The number of elements matches the number of dimensions of the array (ndim).
|
| 345 |
+
Can return NULL for 0-dimensional arrays.
|
| 346 |
+
"""
|
| 347 |
+
return PyArray_DIMS(self)
|
| 348 |
+
|
| 349 |
+
@property
|
| 350 |
+
cdef inline npy_intp *strides(self) noexcept nogil:
|
| 351 |
+
"""Returns a pointer to the strides of the array.
|
| 352 |
+
The number of elements matches the number of dimensions of the array (ndim).
|
| 353 |
+
"""
|
| 354 |
+
return PyArray_STRIDES(self)
|
| 355 |
+
|
| 356 |
+
@property
|
| 357 |
+
cdef inline npy_intp size(self) noexcept nogil:
|
| 358 |
+
"""Returns the total size (in number of elements) of the array.
|
| 359 |
+
"""
|
| 360 |
+
return PyArray_SIZE(self)
|
| 361 |
+
|
| 362 |
+
@property
|
| 363 |
+
cdef inline char* data(self) noexcept nogil:
|
| 364 |
+
"""The pointer to the data buffer as a char*.
|
| 365 |
+
This is provided for legacy reasons to avoid direct struct field access.
|
| 366 |
+
For new code that needs this access, you probably want to cast the result
|
| 367 |
+
of `PyArray_DATA()` instead, which returns a 'void*'.
|
| 368 |
+
"""
|
| 369 |
+
return PyArray_BYTES(self)
|
| 370 |
+
|
| 371 |
+
|
| 372 |
+
int _import_array() except -1
|
| 373 |
+
# A second definition so _import_array isn't marked as used when we use it here.
|
| 374 |
+
# Do not use - subject to change any time.
|
| 375 |
+
int __pyx_import_array "_import_array"() except -1
|
| 376 |
+
|
| 377 |
+
#
|
| 378 |
+
# Macros from ndarrayobject.h
|
| 379 |
+
#
|
| 380 |
+
bint PyArray_CHKFLAGS(ndarray m, int flags) nogil
|
| 381 |
+
bint PyArray_IS_C_CONTIGUOUS(ndarray arr) nogil
|
| 382 |
+
bint PyArray_IS_F_CONTIGUOUS(ndarray arr) nogil
|
| 383 |
+
bint PyArray_ISCONTIGUOUS(ndarray m) nogil
|
| 384 |
+
bint PyArray_ISWRITEABLE(ndarray m) nogil
|
| 385 |
+
bint PyArray_ISALIGNED(ndarray m) nogil
|
| 386 |
+
|
| 387 |
+
int PyArray_NDIM(ndarray) nogil
|
| 388 |
+
bint PyArray_ISONESEGMENT(ndarray) nogil
|
| 389 |
+
bint PyArray_ISFORTRAN(ndarray) nogil
|
| 390 |
+
int PyArray_FORTRANIF(ndarray) nogil
|
| 391 |
+
|
| 392 |
+
void* PyArray_DATA(ndarray) nogil
|
| 393 |
+
char* PyArray_BYTES(ndarray) nogil
|
| 394 |
+
|
| 395 |
+
npy_intp* PyArray_DIMS(ndarray) nogil
|
| 396 |
+
npy_intp* PyArray_STRIDES(ndarray) nogil
|
| 397 |
+
npy_intp PyArray_DIM(ndarray, size_t) nogil
|
| 398 |
+
npy_intp PyArray_STRIDE(ndarray, size_t) nogil
|
| 399 |
+
|
| 400 |
+
PyObject *PyArray_BASE(ndarray) nogil # returns borrowed reference!
|
| 401 |
+
PyArray_Descr *PyArray_DESCR(ndarray) nogil # returns borrowed reference to dtype!
|
| 402 |
+
PyArray_Descr *PyArray_DTYPE(ndarray) nogil # returns borrowed reference to dtype! NP 1.7+ alias for descr.
|
| 403 |
+
int PyArray_FLAGS(ndarray) nogil
|
| 404 |
+
void PyArray_CLEARFLAGS(ndarray, int flags) nogil # Added in NumPy 1.7
|
| 405 |
+
void PyArray_ENABLEFLAGS(ndarray, int flags) nogil # Added in NumPy 1.7
|
| 406 |
+
npy_intp PyArray_ITEMSIZE(ndarray) nogil
|
| 407 |
+
int PyArray_TYPE(ndarray arr) nogil
|
| 408 |
+
|
| 409 |
+
object PyArray_GETITEM(ndarray arr, void *itemptr)
|
| 410 |
+
int PyArray_SETITEM(ndarray arr, void *itemptr, object obj) except -1
|
| 411 |
+
|
| 412 |
+
bint PyTypeNum_ISBOOL(int) nogil
|
| 413 |
+
bint PyTypeNum_ISUNSIGNED(int) nogil
|
| 414 |
+
bint PyTypeNum_ISSIGNED(int) nogil
|
| 415 |
+
bint PyTypeNum_ISINTEGER(int) nogil
|
| 416 |
+
bint PyTypeNum_ISFLOAT(int) nogil
|
| 417 |
+
bint PyTypeNum_ISNUMBER(int) nogil
|
| 418 |
+
bint PyTypeNum_ISSTRING(int) nogil
|
| 419 |
+
bint PyTypeNum_ISCOMPLEX(int) nogil
|
| 420 |
+
bint PyTypeNum_ISFLEXIBLE(int) nogil
|
| 421 |
+
bint PyTypeNum_ISUSERDEF(int) nogil
|
| 422 |
+
bint PyTypeNum_ISEXTENDED(int) nogil
|
| 423 |
+
bint PyTypeNum_ISOBJECT(int) nogil
|
| 424 |
+
|
| 425 |
+
npy_intp PyDataType_ELSIZE(dtype) nogil
|
| 426 |
+
npy_intp PyDataType_ALIGNMENT(dtype) nogil
|
| 427 |
+
PyObject* PyDataType_METADATA(dtype) nogil
|
| 428 |
+
PyArray_ArrayDescr* PyDataType_SUBARRAY(dtype) nogil
|
| 429 |
+
PyObject* PyDataType_NAMES(dtype) nogil
|
| 430 |
+
PyObject* PyDataType_FIELDS(dtype) nogil
|
| 431 |
+
|
| 432 |
+
bint PyDataType_ISBOOL(dtype) nogil
|
| 433 |
+
bint PyDataType_ISUNSIGNED(dtype) nogil
|
| 434 |
+
bint PyDataType_ISSIGNED(dtype) nogil
|
| 435 |
+
bint PyDataType_ISINTEGER(dtype) nogil
|
| 436 |
+
bint PyDataType_ISFLOAT(dtype) nogil
|
| 437 |
+
bint PyDataType_ISNUMBER(dtype) nogil
|
| 438 |
+
bint PyDataType_ISSTRING(dtype) nogil
|
| 439 |
+
bint PyDataType_ISCOMPLEX(dtype) nogil
|
| 440 |
+
bint PyDataType_ISFLEXIBLE(dtype) nogil
|
| 441 |
+
bint PyDataType_ISUSERDEF(dtype) nogil
|
| 442 |
+
bint PyDataType_ISEXTENDED(dtype) nogil
|
| 443 |
+
bint PyDataType_ISOBJECT(dtype) nogil
|
| 444 |
+
bint PyDataType_HASFIELDS(dtype) nogil
|
| 445 |
+
bint PyDataType_HASSUBARRAY(dtype) nogil
|
| 446 |
+
npy_uint64 PyDataType_FLAGS(dtype) nogil
|
| 447 |
+
|
| 448 |
+
bint PyArray_ISBOOL(ndarray) nogil
|
| 449 |
+
bint PyArray_ISUNSIGNED(ndarray) nogil
|
| 450 |
+
bint PyArray_ISSIGNED(ndarray) nogil
|
| 451 |
+
bint PyArray_ISINTEGER(ndarray) nogil
|
| 452 |
+
bint PyArray_ISFLOAT(ndarray) nogil
|
| 453 |
+
bint PyArray_ISNUMBER(ndarray) nogil
|
| 454 |
+
bint PyArray_ISSTRING(ndarray) nogil
|
| 455 |
+
bint PyArray_ISCOMPLEX(ndarray) nogil
|
| 456 |
+
bint PyArray_ISFLEXIBLE(ndarray) nogil
|
| 457 |
+
bint PyArray_ISUSERDEF(ndarray) nogil
|
| 458 |
+
bint PyArray_ISEXTENDED(ndarray) nogil
|
| 459 |
+
bint PyArray_ISOBJECT(ndarray) nogil
|
| 460 |
+
bint PyArray_HASFIELDS(ndarray) nogil
|
| 461 |
+
|
| 462 |
+
bint PyArray_ISVARIABLE(ndarray) nogil
|
| 463 |
+
|
| 464 |
+
bint PyArray_SAFEALIGNEDCOPY(ndarray) nogil
|
| 465 |
+
bint PyArray_ISNBO(char) nogil # works on ndarray.byteorder
|
| 466 |
+
bint PyArray_IsNativeByteOrder(char) nogil # works on ndarray.byteorder
|
| 467 |
+
bint PyArray_ISNOTSWAPPED(ndarray) nogil
|
| 468 |
+
bint PyArray_ISBYTESWAPPED(ndarray) nogil
|
| 469 |
+
|
| 470 |
+
bint PyArray_FLAGSWAP(ndarray, int) nogil
|
| 471 |
+
|
| 472 |
+
bint PyArray_ISCARRAY(ndarray) nogil
|
| 473 |
+
bint PyArray_ISCARRAY_RO(ndarray) nogil
|
| 474 |
+
bint PyArray_ISFARRAY(ndarray) nogil
|
| 475 |
+
bint PyArray_ISFARRAY_RO(ndarray) nogil
|
| 476 |
+
bint PyArray_ISBEHAVED(ndarray) nogil
|
| 477 |
+
bint PyArray_ISBEHAVED_RO(ndarray) nogil
|
| 478 |
+
|
| 479 |
+
|
| 480 |
+
bint PyDataType_ISNOTSWAPPED(dtype) nogil
|
| 481 |
+
bint PyDataType_ISBYTESWAPPED(dtype) nogil
|
| 482 |
+
|
| 483 |
+
bint PyArray_DescrCheck(object)
|
| 484 |
+
|
| 485 |
+
bint PyArray_Check(object)
|
| 486 |
+
bint PyArray_CheckExact(object)
|
| 487 |
+
|
| 488 |
+
# Cannot be supported due to out arg:
|
| 489 |
+
# bint PyArray_HasArrayInterfaceType(object, dtype, object, object&)
|
| 490 |
+
# bint PyArray_HasArrayInterface(op, out)
|
| 491 |
+
|
| 492 |
+
|
| 493 |
+
bint PyArray_IsZeroDim(object)
|
| 494 |
+
# Cannot be supported due to ## ## in macro:
|
| 495 |
+
# bint PyArray_IsScalar(object, verbatim work)
|
| 496 |
+
bint PyArray_CheckScalar(object)
|
| 497 |
+
bint PyArray_IsPythonNumber(object)
|
| 498 |
+
bint PyArray_IsPythonScalar(object)
|
| 499 |
+
bint PyArray_IsAnyScalar(object)
|
| 500 |
+
bint PyArray_CheckAnyScalar(object)
|
| 501 |
+
|
| 502 |
+
ndarray PyArray_GETCONTIGUOUS(ndarray)
|
| 503 |
+
bint PyArray_SAMESHAPE(ndarray, ndarray) nogil
|
| 504 |
+
npy_intp PyArray_SIZE(ndarray) nogil
|
| 505 |
+
npy_intp PyArray_NBYTES(ndarray) nogil
|
| 506 |
+
|
| 507 |
+
object PyArray_FROM_O(object)
|
| 508 |
+
object PyArray_FROM_OF(object m, int flags)
|
| 509 |
+
object PyArray_FROM_OT(object m, int type)
|
| 510 |
+
object PyArray_FROM_OTF(object m, int type, int flags)
|
| 511 |
+
object PyArray_FROMANY(object m, int type, int min, int max, int flags)
|
| 512 |
+
object PyArray_ZEROS(int nd, npy_intp* dims, int type, int fortran)
|
| 513 |
+
object PyArray_EMPTY(int nd, npy_intp* dims, int type, int fortran)
|
| 514 |
+
void PyArray_FILLWBYTE(ndarray, int val)
|
| 515 |
+
object PyArray_ContiguousFromAny(op, int, int min_depth, int max_depth)
|
| 516 |
+
unsigned char PyArray_EquivArrTypes(ndarray a1, ndarray a2)
|
| 517 |
+
bint PyArray_EquivByteorders(int b1, int b2) nogil
|
| 518 |
+
object PyArray_SimpleNew(int nd, npy_intp* dims, int typenum)
|
| 519 |
+
object PyArray_SimpleNewFromData(int nd, npy_intp* dims, int typenum, void* data)
|
| 520 |
+
#object PyArray_SimpleNewFromDescr(int nd, npy_intp* dims, dtype descr)
|
| 521 |
+
object PyArray_ToScalar(void* data, ndarray arr)
|
| 522 |
+
|
| 523 |
+
void* PyArray_GETPTR1(ndarray m, npy_intp i) nogil
|
| 524 |
+
void* PyArray_GETPTR2(ndarray m, npy_intp i, npy_intp j) nogil
|
| 525 |
+
void* PyArray_GETPTR3(ndarray m, npy_intp i, npy_intp j, npy_intp k) nogil
|
| 526 |
+
void* PyArray_GETPTR4(ndarray m, npy_intp i, npy_intp j, npy_intp k, npy_intp l) nogil
|
| 527 |
+
|
| 528 |
+
# Cannot be supported due to out arg
|
| 529 |
+
# void PyArray_DESCR_REPLACE(descr)
|
| 530 |
+
|
| 531 |
+
|
| 532 |
+
object PyArray_Copy(ndarray)
|
| 533 |
+
object PyArray_FromObject(object op, int type, int min_depth, int max_depth)
|
| 534 |
+
object PyArray_ContiguousFromObject(object op, int type, int min_depth, int max_depth)
|
| 535 |
+
object PyArray_CopyFromObject(object op, int type, int min_depth, int max_depth)
|
| 536 |
+
|
| 537 |
+
object PyArray_Cast(ndarray mp, int type_num)
|
| 538 |
+
object PyArray_Take(ndarray ap, object items, int axis)
|
| 539 |
+
object PyArray_Put(ndarray ap, object items, object values)
|
| 540 |
+
|
| 541 |
+
void PyArray_ITER_RESET(flatiter it) nogil
|
| 542 |
+
void PyArray_ITER_NEXT(flatiter it) nogil
|
| 543 |
+
void PyArray_ITER_GOTO(flatiter it, npy_intp* destination) nogil
|
| 544 |
+
void PyArray_ITER_GOTO1D(flatiter it, npy_intp ind) nogil
|
| 545 |
+
void* PyArray_ITER_DATA(flatiter it) nogil
|
| 546 |
+
bint PyArray_ITER_NOTDONE(flatiter it) nogil
|
| 547 |
+
|
| 548 |
+
void PyArray_MultiIter_RESET(broadcast multi) nogil
|
| 549 |
+
void PyArray_MultiIter_NEXT(broadcast multi) nogil
|
| 550 |
+
void PyArray_MultiIter_GOTO(broadcast multi, npy_intp dest) nogil
|
| 551 |
+
void PyArray_MultiIter_GOTO1D(broadcast multi, npy_intp ind) nogil
|
| 552 |
+
void* PyArray_MultiIter_DATA(broadcast multi, npy_intp i) nogil
|
| 553 |
+
void PyArray_MultiIter_NEXTi(broadcast multi, npy_intp i) nogil
|
| 554 |
+
bint PyArray_MultiIter_NOTDONE(broadcast multi) nogil
|
| 555 |
+
npy_intp PyArray_MultiIter_SIZE(broadcast multi) nogil
|
| 556 |
+
int PyArray_MultiIter_NDIM(broadcast multi) nogil
|
| 557 |
+
npy_intp PyArray_MultiIter_INDEX(broadcast multi) nogil
|
| 558 |
+
int PyArray_MultiIter_NUMITER(broadcast multi) nogil
|
| 559 |
+
npy_intp* PyArray_MultiIter_DIMS(broadcast multi) nogil
|
| 560 |
+
void** PyArray_MultiIter_ITERS(broadcast multi) nogil
|
| 561 |
+
|
| 562 |
+
# Functions from __multiarray_api.h
|
| 563 |
+
|
| 564 |
+
# Functions taking dtype and returning object/ndarray are disabled
|
| 565 |
+
# for now as they steal dtype references. I'm conservative and disable
|
| 566 |
+
# more than is probably needed until it can be checked further.
|
| 567 |
+
int PyArray_INCREF (ndarray) except * # uses PyArray_Item_INCREF...
|
| 568 |
+
int PyArray_XDECREF (ndarray) except * # uses PyArray_Item_DECREF...
|
| 569 |
+
dtype PyArray_DescrFromType (int)
|
| 570 |
+
object PyArray_TypeObjectFromType (int)
|
| 571 |
+
char * PyArray_Zero (ndarray)
|
| 572 |
+
char * PyArray_One (ndarray)
|
| 573 |
+
#object PyArray_CastToType (ndarray, dtype, int)
|
| 574 |
+
int PyArray_CanCastSafely (int, int) # writes errors
|
| 575 |
+
npy_bool PyArray_CanCastTo (dtype, dtype) # writes errors
|
| 576 |
+
int PyArray_ObjectType (object, int) except 0
|
| 577 |
+
dtype PyArray_DescrFromObject (object, dtype)
|
| 578 |
+
#ndarray* PyArray_ConvertToCommonType (object, int *)
|
| 579 |
+
dtype PyArray_DescrFromScalar (object)
|
| 580 |
+
dtype PyArray_DescrFromTypeObject (object)
|
| 581 |
+
npy_intp PyArray_Size (object)
|
| 582 |
+
#object PyArray_Scalar (void *, dtype, object)
|
| 583 |
+
#object PyArray_FromScalar (object, dtype)
|
| 584 |
+
void PyArray_ScalarAsCtype (object, void *)
|
| 585 |
+
#int PyArray_CastScalarToCtype (object, void *, dtype)
|
| 586 |
+
#int PyArray_CastScalarDirect (object, dtype, void *, int)
|
| 587 |
+
#PyArray_VectorUnaryFunc * PyArray_GetCastFunc (dtype, int)
|
| 588 |
+
#object PyArray_FromAny (object, dtype, int, int, int, object)
|
| 589 |
+
object PyArray_EnsureArray (object)
|
| 590 |
+
object PyArray_EnsureAnyArray (object)
|
| 591 |
+
#object PyArray_FromFile (stdio.FILE *, dtype, npy_intp, char *)
|
| 592 |
+
#object PyArray_FromString (char *, npy_intp, dtype, npy_intp, char *)
|
| 593 |
+
#object PyArray_FromBuffer (object, dtype, npy_intp, npy_intp)
|
| 594 |
+
#object PyArray_FromIter (object, dtype, npy_intp)
|
| 595 |
+
object PyArray_Return (ndarray)
|
| 596 |
+
#object PyArray_GetField (ndarray, dtype, int)
|
| 597 |
+
#int PyArray_SetField (ndarray, dtype, int, object) except -1
|
| 598 |
+
object PyArray_Byteswap (ndarray, npy_bool)
|
| 599 |
+
object PyArray_Resize (ndarray, PyArray_Dims *, int, NPY_ORDER)
|
| 600 |
+
int PyArray_CopyInto (ndarray, ndarray) except -1
|
| 601 |
+
int PyArray_CopyAnyInto (ndarray, ndarray) except -1
|
| 602 |
+
int PyArray_CopyObject (ndarray, object) except -1
|
| 603 |
+
object PyArray_NewCopy (ndarray, NPY_ORDER)
|
| 604 |
+
object PyArray_ToList (ndarray)
|
| 605 |
+
object PyArray_ToString (ndarray, NPY_ORDER)
|
| 606 |
+
int PyArray_ToFile (ndarray, stdio.FILE *, char *, char *) except -1
|
| 607 |
+
int PyArray_Dump (object, object, int) except -1
|
| 608 |
+
object PyArray_Dumps (object, int)
|
| 609 |
+
int PyArray_ValidType (int) # Cannot error
|
| 610 |
+
void PyArray_UpdateFlags (ndarray, int)
|
| 611 |
+
object PyArray_New (type, int, npy_intp *, int, npy_intp *, void *, int, int, object)
|
| 612 |
+
#object PyArray_NewFromDescr (type, dtype, int, npy_intp *, npy_intp *, void *, int, object)
|
| 613 |
+
#dtype PyArray_DescrNew (dtype)
|
| 614 |
+
dtype PyArray_DescrNewFromType (int)
|
| 615 |
+
double PyArray_GetPriority (object, double) # clears errors as of 1.25
|
| 616 |
+
object PyArray_IterNew (object)
|
| 617 |
+
object PyArray_MultiIterNew (int, ...)
|
| 618 |
+
|
| 619 |
+
int PyArray_PyIntAsInt (object) except? -1
|
| 620 |
+
npy_intp PyArray_PyIntAsIntp (object)
|
| 621 |
+
int PyArray_Broadcast (broadcast) except -1
|
| 622 |
+
int PyArray_FillWithScalar (ndarray, object) except -1
|
| 623 |
+
npy_bool PyArray_CheckStrides (int, int, npy_intp, npy_intp, npy_intp *, npy_intp *)
|
| 624 |
+
dtype PyArray_DescrNewByteorder (dtype, char)
|
| 625 |
+
object PyArray_IterAllButAxis (object, int *)
|
| 626 |
+
#object PyArray_CheckFromAny (object, dtype, int, int, int, object)
|
| 627 |
+
#object PyArray_FromArray (ndarray, dtype, int)
|
| 628 |
+
object PyArray_FromInterface (object)
|
| 629 |
+
object PyArray_FromStructInterface (object)
|
| 630 |
+
#object PyArray_FromArrayAttr (object, dtype, object)
|
| 631 |
+
#NPY_SCALARKIND PyArray_ScalarKind (int, ndarray*)
|
| 632 |
+
int PyArray_CanCoerceScalar (int, int, NPY_SCALARKIND)
|
| 633 |
+
npy_bool PyArray_CanCastScalar (type, type)
|
| 634 |
+
int PyArray_RemoveSmallest (broadcast) except -1
|
| 635 |
+
int PyArray_ElementStrides (object)
|
| 636 |
+
void PyArray_Item_INCREF (char *, dtype) except *
|
| 637 |
+
void PyArray_Item_XDECREF (char *, dtype) except *
|
| 638 |
+
object PyArray_Transpose (ndarray, PyArray_Dims *)
|
| 639 |
+
object PyArray_TakeFrom (ndarray, object, int, ndarray, NPY_CLIPMODE)
|
| 640 |
+
object PyArray_PutTo (ndarray, object, object, NPY_CLIPMODE)
|
| 641 |
+
object PyArray_PutMask (ndarray, object, object)
|
| 642 |
+
object PyArray_Repeat (ndarray, object, int)
|
| 643 |
+
object PyArray_Choose (ndarray, object, ndarray, NPY_CLIPMODE)
|
| 644 |
+
int PyArray_Sort (ndarray, int, NPY_SORTKIND) except -1
|
| 645 |
+
object PyArray_ArgSort (ndarray, int, NPY_SORTKIND)
|
| 646 |
+
object PyArray_SearchSorted (ndarray, object, NPY_SEARCHSIDE, PyObject *)
|
| 647 |
+
object PyArray_ArgMax (ndarray, int, ndarray)
|
| 648 |
+
object PyArray_ArgMin (ndarray, int, ndarray)
|
| 649 |
+
object PyArray_Reshape (ndarray, object)
|
| 650 |
+
object PyArray_Newshape (ndarray, PyArray_Dims *, NPY_ORDER)
|
| 651 |
+
object PyArray_Squeeze (ndarray)
|
| 652 |
+
#object PyArray_View (ndarray, dtype, type)
|
| 653 |
+
object PyArray_SwapAxes (ndarray, int, int)
|
| 654 |
+
object PyArray_Max (ndarray, int, ndarray)
|
| 655 |
+
object PyArray_Min (ndarray, int, ndarray)
|
| 656 |
+
object PyArray_Ptp (ndarray, int, ndarray)
|
| 657 |
+
object PyArray_Mean (ndarray, int, int, ndarray)
|
| 658 |
+
object PyArray_Trace (ndarray, int, int, int, int, ndarray)
|
| 659 |
+
object PyArray_Diagonal (ndarray, int, int, int)
|
| 660 |
+
object PyArray_Clip (ndarray, object, object, ndarray)
|
| 661 |
+
object PyArray_Conjugate (ndarray, ndarray)
|
| 662 |
+
object PyArray_Nonzero (ndarray)
|
| 663 |
+
object PyArray_Std (ndarray, int, int, ndarray, int)
|
| 664 |
+
object PyArray_Sum (ndarray, int, int, ndarray)
|
| 665 |
+
object PyArray_CumSum (ndarray, int, int, ndarray)
|
| 666 |
+
object PyArray_Prod (ndarray, int, int, ndarray)
|
| 667 |
+
object PyArray_CumProd (ndarray, int, int, ndarray)
|
| 668 |
+
object PyArray_All (ndarray, int, ndarray)
|
| 669 |
+
object PyArray_Any (ndarray, int, ndarray)
|
| 670 |
+
object PyArray_Compress (ndarray, object, int, ndarray)
|
| 671 |
+
object PyArray_Flatten (ndarray, NPY_ORDER)
|
| 672 |
+
object PyArray_Ravel (ndarray, NPY_ORDER)
|
| 673 |
+
npy_intp PyArray_MultiplyList (npy_intp *, int)
|
| 674 |
+
int PyArray_MultiplyIntList (int *, int)
|
| 675 |
+
void * PyArray_GetPtr (ndarray, npy_intp*)
|
| 676 |
+
int PyArray_CompareLists (npy_intp *, npy_intp *, int)
|
| 677 |
+
#int PyArray_AsCArray (object*, void *, npy_intp *, int, dtype)
|
| 678 |
+
int PyArray_Free (object, void *)
|
| 679 |
+
#int PyArray_Converter (object, object*)
|
| 680 |
+
int PyArray_IntpFromSequence (object, npy_intp *, int) except -1
|
| 681 |
+
object PyArray_Concatenate (object, int)
|
| 682 |
+
object PyArray_InnerProduct (object, object)
|
| 683 |
+
object PyArray_MatrixProduct (object, object)
|
| 684 |
+
object PyArray_Correlate (object, object, int)
|
| 685 |
+
#int PyArray_DescrConverter (object, dtype*) except 0
|
| 686 |
+
#int PyArray_DescrConverter2 (object, dtype*) except 0
|
| 687 |
+
int PyArray_IntpConverter (object, PyArray_Dims *) except 0
|
| 688 |
+
#int PyArray_BufferConverter (object, chunk) except 0
|
| 689 |
+
int PyArray_AxisConverter (object, int *) except 0
|
| 690 |
+
int PyArray_BoolConverter (object, npy_bool *) except 0
|
| 691 |
+
int PyArray_ByteorderConverter (object, char *) except 0
|
| 692 |
+
int PyArray_OrderConverter (object, NPY_ORDER *) except 0
|
| 693 |
+
unsigned char PyArray_EquivTypes (dtype, dtype) # clears errors
|
| 694 |
+
#object PyArray_Zeros (int, npy_intp *, dtype, int)
|
| 695 |
+
#object PyArray_Empty (int, npy_intp *, dtype, int)
|
| 696 |
+
object PyArray_Where (object, object, object)
|
| 697 |
+
object PyArray_Arange (double, double, double, int)
|
| 698 |
+
#object PyArray_ArangeObj (object, object, object, dtype)
|
| 699 |
+
int PyArray_SortkindConverter (object, NPY_SORTKIND *) except 0
|
| 700 |
+
object PyArray_LexSort (object, int)
|
| 701 |
+
object PyArray_Round (ndarray, int, ndarray)
|
| 702 |
+
unsigned char PyArray_EquivTypenums (int, int)
|
| 703 |
+
int PyArray_RegisterDataType (dtype) except -1
|
| 704 |
+
int PyArray_RegisterCastFunc (dtype, int, PyArray_VectorUnaryFunc *) except -1
|
| 705 |
+
int PyArray_RegisterCanCast (dtype, int, NPY_SCALARKIND) except -1
|
| 706 |
+
#void PyArray_InitArrFuncs (PyArray_ArrFuncs *)
|
| 707 |
+
object PyArray_IntTupleFromIntp (int, npy_intp *)
|
| 708 |
+
int PyArray_ClipmodeConverter (object, NPY_CLIPMODE *) except 0
|
| 709 |
+
#int PyArray_OutputConverter (object, ndarray*) except 0
|
| 710 |
+
object PyArray_BroadcastToShape (object, npy_intp *, int)
|
| 711 |
+
#int PyArray_DescrAlignConverter (object, dtype*) except 0
|
| 712 |
+
#int PyArray_DescrAlignConverter2 (object, dtype*) except 0
|
| 713 |
+
int PyArray_SearchsideConverter (object, void *) except 0
|
| 714 |
+
object PyArray_CheckAxis (ndarray, int *, int)
|
| 715 |
+
npy_intp PyArray_OverflowMultiplyList (npy_intp *, int)
|
| 716 |
+
int PyArray_SetBaseObject(ndarray, base) except -1 # NOTE: steals a reference to base! Use "set_array_base()" instead.
|
| 717 |
+
|
| 718 |
+
# The memory handler functions require the NumPy 1.22 API
|
| 719 |
+
# and may require defining NPY_TARGET_VERSION
|
| 720 |
+
ctypedef struct PyDataMemAllocator:
|
| 721 |
+
void *ctx
|
| 722 |
+
void* (*malloc) (void *ctx, size_t size)
|
| 723 |
+
void* (*calloc) (void *ctx, size_t nelem, size_t elsize)
|
| 724 |
+
void* (*realloc) (void *ctx, void *ptr, size_t new_size)
|
| 725 |
+
void (*free) (void *ctx, void *ptr, size_t size)
|
| 726 |
+
|
| 727 |
+
ctypedef struct PyDataMem_Handler:
|
| 728 |
+
char* name
|
| 729 |
+
npy_uint8 version
|
| 730 |
+
PyDataMemAllocator allocator
|
| 731 |
+
|
| 732 |
+
object PyDataMem_SetHandler(object handler)
|
| 733 |
+
object PyDataMem_GetHandler()
|
| 734 |
+
|
| 735 |
+
# additional datetime related functions are defined below
|
| 736 |
+
|
| 737 |
+
|
| 738 |
+
# Typedefs that matches the runtime dtype objects in
|
| 739 |
+
# the numpy module.
|
| 740 |
+
|
| 741 |
+
# The ones that are commented out needs an IFDEF function
|
| 742 |
+
# in Cython to enable them only on the right systems.
|
| 743 |
+
|
| 744 |
+
ctypedef npy_int8 int8_t
|
| 745 |
+
ctypedef npy_int16 int16_t
|
| 746 |
+
ctypedef npy_int32 int32_t
|
| 747 |
+
ctypedef npy_int64 int64_t
|
| 748 |
+
|
| 749 |
+
ctypedef npy_uint8 uint8_t
|
| 750 |
+
ctypedef npy_uint16 uint16_t
|
| 751 |
+
ctypedef npy_uint32 uint32_t
|
| 752 |
+
ctypedef npy_uint64 uint64_t
|
| 753 |
+
|
| 754 |
+
ctypedef npy_float32 float32_t
|
| 755 |
+
ctypedef npy_float64 float64_t
|
| 756 |
+
#ctypedef npy_float80 float80_t
|
| 757 |
+
#ctypedef npy_float128 float128_t
|
| 758 |
+
|
| 759 |
+
ctypedef float complex complex64_t
|
| 760 |
+
ctypedef double complex complex128_t
|
| 761 |
+
|
| 762 |
+
ctypedef npy_longlong longlong_t
|
| 763 |
+
ctypedef npy_ulonglong ulonglong_t
|
| 764 |
+
|
| 765 |
+
ctypedef npy_intp intp_t
|
| 766 |
+
ctypedef npy_uintp uintp_t
|
| 767 |
+
|
| 768 |
+
ctypedef npy_double float_t
|
| 769 |
+
ctypedef npy_double double_t
|
| 770 |
+
ctypedef npy_longdouble longdouble_t
|
| 771 |
+
|
| 772 |
+
ctypedef float complex cfloat_t
|
| 773 |
+
ctypedef double complex cdouble_t
|
| 774 |
+
ctypedef double complex complex_t
|
| 775 |
+
ctypedef long double complex clongdouble_t
|
| 776 |
+
|
| 777 |
+
cdef inline object PyArray_MultiIterNew1(a):
|
| 778 |
+
return PyArray_MultiIterNew(1, <void*>a)
|
| 779 |
+
|
| 780 |
+
cdef inline object PyArray_MultiIterNew2(a, b):
|
| 781 |
+
return PyArray_MultiIterNew(2, <void*>a, <void*>b)
|
| 782 |
+
|
| 783 |
+
cdef inline object PyArray_MultiIterNew3(a, b, c):
|
| 784 |
+
return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
|
| 785 |
+
|
| 786 |
+
cdef inline object PyArray_MultiIterNew4(a, b, c, d):
|
| 787 |
+
return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
|
| 788 |
+
|
| 789 |
+
cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
|
| 790 |
+
return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
|
| 791 |
+
|
| 792 |
+
cdef inline tuple PyDataType_SHAPE(dtype d):
|
| 793 |
+
if PyDataType_HASSUBARRAY(d):
|
| 794 |
+
return <tuple>d.subarray.shape
|
| 795 |
+
else:
|
| 796 |
+
return ()
|
| 797 |
+
|
| 798 |
+
|
| 799 |
+
cdef extern from "numpy/ndarrayobject.h":
|
| 800 |
+
PyTypeObject PyTimedeltaArrType_Type
|
| 801 |
+
PyTypeObject PyDatetimeArrType_Type
|
| 802 |
+
ctypedef int64_t npy_timedelta
|
| 803 |
+
ctypedef int64_t npy_datetime
|
| 804 |
+
|
| 805 |
+
cdef extern from "numpy/ndarraytypes.h":
|
| 806 |
+
ctypedef struct PyArray_DatetimeMetaData:
|
| 807 |
+
NPY_DATETIMEUNIT base
|
| 808 |
+
int64_t num
|
| 809 |
+
|
| 810 |
+
ctypedef struct npy_datetimestruct:
|
| 811 |
+
int64_t year
|
| 812 |
+
int32_t month, day, hour, min, sec, us, ps, as
|
| 813 |
+
|
| 814 |
+
# Iterator API added in v1.6
|
| 815 |
+
#
|
| 816 |
+
# These don't match the definition in the C API because Cython can't wrap
|
| 817 |
+
# function pointers that return functions.
|
| 818 |
+
# https://github.com/cython/cython/issues/6720
|
| 819 |
+
ctypedef int (*NpyIter_IterNextFunc "NpyIter_IterNextFunc *")(NpyIter* it) noexcept nogil
|
| 820 |
+
ctypedef void (*NpyIter_GetMultiIndexFunc "NpyIter_GetMultiIndexFunc *")(NpyIter* it, npy_intp* outcoords) noexcept nogil
|
| 821 |
+
|
| 822 |
+
|
| 823 |
+
cdef extern from "numpy/arrayscalars.h":
|
| 824 |
+
|
| 825 |
+
# abstract types
|
| 826 |
+
ctypedef class numpy.generic [object PyObject]:
|
| 827 |
+
pass
|
| 828 |
+
ctypedef class numpy.number [object PyObject]:
|
| 829 |
+
pass
|
| 830 |
+
ctypedef class numpy.integer [object PyObject]:
|
| 831 |
+
pass
|
| 832 |
+
ctypedef class numpy.signedinteger [object PyObject]:
|
| 833 |
+
pass
|
| 834 |
+
ctypedef class numpy.unsignedinteger [object PyObject]:
|
| 835 |
+
pass
|
| 836 |
+
ctypedef class numpy.inexact [object PyObject]:
|
| 837 |
+
pass
|
| 838 |
+
ctypedef class numpy.floating [object PyObject]:
|
| 839 |
+
pass
|
| 840 |
+
ctypedef class numpy.complexfloating [object PyObject]:
|
| 841 |
+
pass
|
| 842 |
+
ctypedef class numpy.flexible [object PyObject]:
|
| 843 |
+
pass
|
| 844 |
+
ctypedef class numpy.character [object PyObject]:
|
| 845 |
+
pass
|
| 846 |
+
|
| 847 |
+
ctypedef struct PyDatetimeScalarObject:
|
| 848 |
+
# PyObject_HEAD
|
| 849 |
+
npy_datetime obval
|
| 850 |
+
PyArray_DatetimeMetaData obmeta
|
| 851 |
+
|
| 852 |
+
ctypedef struct PyTimedeltaScalarObject:
|
| 853 |
+
# PyObject_HEAD
|
| 854 |
+
npy_timedelta obval
|
| 855 |
+
PyArray_DatetimeMetaData obmeta
|
| 856 |
+
|
| 857 |
+
ctypedef enum NPY_DATETIMEUNIT:
|
| 858 |
+
NPY_FR_Y
|
| 859 |
+
NPY_FR_M
|
| 860 |
+
NPY_FR_W
|
| 861 |
+
NPY_FR_D
|
| 862 |
+
NPY_FR_B
|
| 863 |
+
NPY_FR_h
|
| 864 |
+
NPY_FR_m
|
| 865 |
+
NPY_FR_s
|
| 866 |
+
NPY_FR_ms
|
| 867 |
+
NPY_FR_us
|
| 868 |
+
NPY_FR_ns
|
| 869 |
+
NPY_FR_ps
|
| 870 |
+
NPY_FR_fs
|
| 871 |
+
NPY_FR_as
|
| 872 |
+
NPY_FR_GENERIC
|
| 873 |
+
|
| 874 |
+
|
| 875 |
+
cdef extern from "numpy/arrayobject.h":
|
| 876 |
+
# These are part of the C-API defined in `__multiarray_api.h`
|
| 877 |
+
|
| 878 |
+
# NumPy internal definitions in datetime_strings.c:
|
| 879 |
+
int get_datetime_iso_8601_strlen "NpyDatetime_GetDatetimeISO8601StrLen" (
|
| 880 |
+
int local, NPY_DATETIMEUNIT base)
|
| 881 |
+
int make_iso_8601_datetime "NpyDatetime_MakeISO8601Datetime" (
|
| 882 |
+
npy_datetimestruct *dts, char *outstr, npy_intp outlen,
|
| 883 |
+
int local, int utc, NPY_DATETIMEUNIT base, int tzoffset,
|
| 884 |
+
NPY_CASTING casting) except -1
|
| 885 |
+
|
| 886 |
+
# NumPy internal definition in datetime.c:
|
| 887 |
+
# May return 1 to indicate that object does not appear to be a datetime
|
| 888 |
+
# (returns 0 on success).
|
| 889 |
+
int convert_pydatetime_to_datetimestruct "NpyDatetime_ConvertPyDateTimeToDatetimeStruct" (
|
| 890 |
+
PyObject *obj, npy_datetimestruct *out,
|
| 891 |
+
NPY_DATETIMEUNIT *out_bestunit, int apply_tzinfo) except -1
|
| 892 |
+
int convert_datetime64_to_datetimestruct "NpyDatetime_ConvertDatetime64ToDatetimeStruct" (
|
| 893 |
+
PyArray_DatetimeMetaData *meta, npy_datetime dt,
|
| 894 |
+
npy_datetimestruct *out) except -1
|
| 895 |
+
int convert_datetimestruct_to_datetime64 "NpyDatetime_ConvertDatetimeStructToDatetime64"(
|
| 896 |
+
PyArray_DatetimeMetaData *meta, const npy_datetimestruct *dts,
|
| 897 |
+
npy_datetime *out) except -1
|
| 898 |
+
|
| 899 |
+
|
| 900 |
+
#
|
| 901 |
+
# ufunc API
|
| 902 |
+
#
|
| 903 |
+
|
| 904 |
+
cdef extern from "numpy/ufuncobject.h":
|
| 905 |
+
|
| 906 |
+
ctypedef void (*PyUFuncGenericFunction) (char **, npy_intp *, npy_intp *, void *)
|
| 907 |
+
|
| 908 |
+
ctypedef class numpy.ufunc [object PyUFuncObject, check_size ignore]:
|
| 909 |
+
cdef:
|
| 910 |
+
int nin, nout, nargs
|
| 911 |
+
int identity
|
| 912 |
+
PyUFuncGenericFunction *functions
|
| 913 |
+
void **data
|
| 914 |
+
int ntypes
|
| 915 |
+
int check_return
|
| 916 |
+
char *name
|
| 917 |
+
char *types
|
| 918 |
+
char *doc
|
| 919 |
+
void *ptr
|
| 920 |
+
PyObject *obj
|
| 921 |
+
PyObject *userloops
|
| 922 |
+
|
| 923 |
+
cdef enum:
|
| 924 |
+
PyUFunc_Zero
|
| 925 |
+
PyUFunc_One
|
| 926 |
+
PyUFunc_None
|
| 927 |
+
# deprecated
|
| 928 |
+
UFUNC_FPE_DIVIDEBYZERO
|
| 929 |
+
UFUNC_FPE_OVERFLOW
|
| 930 |
+
UFUNC_FPE_UNDERFLOW
|
| 931 |
+
UFUNC_FPE_INVALID
|
| 932 |
+
# use these instead
|
| 933 |
+
NPY_FPE_DIVIDEBYZERO
|
| 934 |
+
NPY_FPE_OVERFLOW
|
| 935 |
+
NPY_FPE_UNDERFLOW
|
| 936 |
+
NPY_FPE_INVALID
|
| 937 |
+
|
| 938 |
+
|
| 939 |
+
object PyUFunc_FromFuncAndData(PyUFuncGenericFunction *,
|
| 940 |
+
void **, char *, int, int, int, int, char *, char *, int)
|
| 941 |
+
int PyUFunc_RegisterLoopForType(ufunc, int,
|
| 942 |
+
PyUFuncGenericFunction, int *, void *) except -1
|
| 943 |
+
void PyUFunc_f_f_As_d_d \
|
| 944 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 945 |
+
void PyUFunc_d_d \
|
| 946 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 947 |
+
void PyUFunc_f_f \
|
| 948 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 949 |
+
void PyUFunc_g_g \
|
| 950 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 951 |
+
void PyUFunc_F_F_As_D_D \
|
| 952 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 953 |
+
void PyUFunc_F_F \
|
| 954 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 955 |
+
void PyUFunc_D_D \
|
| 956 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 957 |
+
void PyUFunc_G_G \
|
| 958 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 959 |
+
void PyUFunc_O_O \
|
| 960 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 961 |
+
void PyUFunc_ff_f_As_dd_d \
|
| 962 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 963 |
+
void PyUFunc_ff_f \
|
| 964 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 965 |
+
void PyUFunc_dd_d \
|
| 966 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 967 |
+
void PyUFunc_gg_g \
|
| 968 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 969 |
+
void PyUFunc_FF_F_As_DD_D \
|
| 970 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 971 |
+
void PyUFunc_DD_D \
|
| 972 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 973 |
+
void PyUFunc_FF_F \
|
| 974 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 975 |
+
void PyUFunc_GG_G \
|
| 976 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 977 |
+
void PyUFunc_OO_O \
|
| 978 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 979 |
+
void PyUFunc_O_O_method \
|
| 980 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 981 |
+
void PyUFunc_OO_O_method \
|
| 982 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 983 |
+
void PyUFunc_On_Om \
|
| 984 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 985 |
+
void PyUFunc_clearfperr()
|
| 986 |
+
int PyUFunc_getfperr()
|
| 987 |
+
int PyUFunc_ReplaceLoopBySignature \
|
| 988 |
+
(ufunc, PyUFuncGenericFunction, int *, PyUFuncGenericFunction *)
|
| 989 |
+
object PyUFunc_FromFuncAndDataAndSignature \
|
| 990 |
+
(PyUFuncGenericFunction *, void **, char *, int, int, int,
|
| 991 |
+
int, char *, char *, int, char *)
|
| 992 |
+
|
| 993 |
+
int _import_umath() except -1
|
| 994 |
+
|
| 995 |
+
cdef inline void set_array_base(ndarray arr, object base) except *:
|
| 996 |
+
Py_INCREF(base) # important to do this before stealing the reference below!
|
| 997 |
+
PyArray_SetBaseObject(arr, base)
|
| 998 |
+
|
| 999 |
+
cdef inline object get_array_base(ndarray arr):
|
| 1000 |
+
base = PyArray_BASE(arr)
|
| 1001 |
+
if base is NULL:
|
| 1002 |
+
return None
|
| 1003 |
+
return <object>base
|
| 1004 |
+
|
| 1005 |
+
# Versions of the import_* functions which are more suitable for
|
| 1006 |
+
# Cython code.
|
| 1007 |
+
cdef inline int import_array() except -1:
|
| 1008 |
+
try:
|
| 1009 |
+
__pyx_import_array()
|
| 1010 |
+
except Exception:
|
| 1011 |
+
raise ImportError("numpy._core.multiarray failed to import")
|
| 1012 |
+
|
| 1013 |
+
cdef inline int import_umath() except -1:
|
| 1014 |
+
try:
|
| 1015 |
+
_import_umath()
|
| 1016 |
+
except Exception:
|
| 1017 |
+
raise ImportError("numpy._core.umath failed to import")
|
| 1018 |
+
|
| 1019 |
+
cdef inline int import_ufunc() except -1:
|
| 1020 |
+
try:
|
| 1021 |
+
_import_umath()
|
| 1022 |
+
except Exception:
|
| 1023 |
+
raise ImportError("numpy._core.umath failed to import")
|
| 1024 |
+
|
| 1025 |
+
|
| 1026 |
+
cdef inline bint is_timedelta64_object(object obj) noexcept:
|
| 1027 |
+
"""
|
| 1028 |
+
Cython equivalent of `isinstance(obj, np.timedelta64)`
|
| 1029 |
+
|
| 1030 |
+
Parameters
|
| 1031 |
+
----------
|
| 1032 |
+
obj : object
|
| 1033 |
+
|
| 1034 |
+
Returns
|
| 1035 |
+
-------
|
| 1036 |
+
bool
|
| 1037 |
+
"""
|
| 1038 |
+
return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)
|
| 1039 |
+
|
| 1040 |
+
|
| 1041 |
+
cdef inline bint is_datetime64_object(object obj) noexcept:
|
| 1042 |
+
"""
|
| 1043 |
+
Cython equivalent of `isinstance(obj, np.datetime64)`
|
| 1044 |
+
|
| 1045 |
+
Parameters
|
| 1046 |
+
----------
|
| 1047 |
+
obj : object
|
| 1048 |
+
|
| 1049 |
+
Returns
|
| 1050 |
+
-------
|
| 1051 |
+
bool
|
| 1052 |
+
"""
|
| 1053 |
+
return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)
|
| 1054 |
+
|
| 1055 |
+
|
| 1056 |
+
cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil:
|
| 1057 |
+
"""
|
| 1058 |
+
returns the int64 value underlying scalar numpy datetime64 object
|
| 1059 |
+
|
| 1060 |
+
Note that to interpret this as a datetime, the corresponding unit is
|
| 1061 |
+
also needed. That can be found using `get_datetime64_unit`.
|
| 1062 |
+
"""
|
| 1063 |
+
return (<PyDatetimeScalarObject*>obj).obval
|
| 1064 |
+
|
| 1065 |
+
|
| 1066 |
+
cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil:
|
| 1067 |
+
"""
|
| 1068 |
+
returns the int64 value underlying scalar numpy timedelta64 object
|
| 1069 |
+
"""
|
| 1070 |
+
return (<PyTimedeltaScalarObject*>obj).obval
|
| 1071 |
+
|
| 1072 |
+
|
| 1073 |
+
cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil:
|
| 1074 |
+
"""
|
| 1075 |
+
returns the unit part of the dtype for a numpy datetime64 object.
|
| 1076 |
+
"""
|
| 1077 |
+
return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base
|
| 1078 |
+
|
| 1079 |
+
|
| 1080 |
+
cdef extern from "numpy/arrayobject.h":
|
| 1081 |
+
|
| 1082 |
+
ctypedef struct NpyIter:
|
| 1083 |
+
pass
|
| 1084 |
+
|
| 1085 |
+
cdef enum:
|
| 1086 |
+
NPY_FAIL
|
| 1087 |
+
NPY_SUCCEED
|
| 1088 |
+
|
| 1089 |
+
cdef enum:
|
| 1090 |
+
# Track an index representing C order
|
| 1091 |
+
NPY_ITER_C_INDEX
|
| 1092 |
+
# Track an index representing Fortran order
|
| 1093 |
+
NPY_ITER_F_INDEX
|
| 1094 |
+
# Track a multi-index
|
| 1095 |
+
NPY_ITER_MULTI_INDEX
|
| 1096 |
+
# User code external to the iterator does the 1-dimensional innermost loop
|
| 1097 |
+
NPY_ITER_EXTERNAL_LOOP
|
| 1098 |
+
# Convert all the operands to a common data type
|
| 1099 |
+
NPY_ITER_COMMON_DTYPE
|
| 1100 |
+
# Operands may hold references, requiring API access during iteration
|
| 1101 |
+
NPY_ITER_REFS_OK
|
| 1102 |
+
# Zero-sized operands should be permitted, iteration checks IterSize for 0
|
| 1103 |
+
NPY_ITER_ZEROSIZE_OK
|
| 1104 |
+
# Permits reductions (size-0 stride with dimension size > 1)
|
| 1105 |
+
NPY_ITER_REDUCE_OK
|
| 1106 |
+
# Enables sub-range iteration
|
| 1107 |
+
NPY_ITER_RANGED
|
| 1108 |
+
# Enables buffering
|
| 1109 |
+
NPY_ITER_BUFFERED
|
| 1110 |
+
# When buffering is enabled, grows the inner loop if possible
|
| 1111 |
+
NPY_ITER_GROWINNER
|
| 1112 |
+
# Delay allocation of buffers until first Reset* call
|
| 1113 |
+
NPY_ITER_DELAY_BUFALLOC
|
| 1114 |
+
# When NPY_KEEPORDER is specified, disable reversing negative-stride axes
|
| 1115 |
+
NPY_ITER_DONT_NEGATE_STRIDES
|
| 1116 |
+
NPY_ITER_COPY_IF_OVERLAP
|
| 1117 |
+
# The operand will be read from and written to
|
| 1118 |
+
NPY_ITER_READWRITE
|
| 1119 |
+
# The operand will only be read from
|
| 1120 |
+
NPY_ITER_READONLY
|
| 1121 |
+
# The operand will only be written to
|
| 1122 |
+
NPY_ITER_WRITEONLY
|
| 1123 |
+
# The operand's data must be in native byte order
|
| 1124 |
+
NPY_ITER_NBO
|
| 1125 |
+
# The operand's data must be aligned
|
| 1126 |
+
NPY_ITER_ALIGNED
|
| 1127 |
+
# The operand's data must be contiguous (within the inner loop)
|
| 1128 |
+
NPY_ITER_CONTIG
|
| 1129 |
+
# The operand may be copied to satisfy requirements
|
| 1130 |
+
NPY_ITER_COPY
|
| 1131 |
+
# The operand may be copied with WRITEBACKIFCOPY to satisfy requirements
|
| 1132 |
+
NPY_ITER_UPDATEIFCOPY
|
| 1133 |
+
# Allocate the operand if it is NULL
|
| 1134 |
+
NPY_ITER_ALLOCATE
|
| 1135 |
+
# If an operand is allocated, don't use any subtype
|
| 1136 |
+
NPY_ITER_NO_SUBTYPE
|
| 1137 |
+
# This is a virtual array slot, operand is NULL but temporary data is there
|
| 1138 |
+
NPY_ITER_VIRTUAL
|
| 1139 |
+
# Require that the dimension match the iterator dimensions exactly
|
| 1140 |
+
NPY_ITER_NO_BROADCAST
|
| 1141 |
+
# A mask is being used on this array, affects buffer -> array copy
|
| 1142 |
+
NPY_ITER_WRITEMASKED
|
| 1143 |
+
# This array is the mask for all WRITEMASKED operands
|
| 1144 |
+
NPY_ITER_ARRAYMASK
|
| 1145 |
+
# Assume iterator order data access for COPY_IF_OVERLAP
|
| 1146 |
+
NPY_ITER_OVERLAP_ASSUME_ELEMENTWISE
|
| 1147 |
+
|
| 1148 |
+
# construction and destruction functions
|
| 1149 |
+
NpyIter* NpyIter_New(ndarray arr, npy_uint32 flags, NPY_ORDER order,
|
| 1150 |
+
NPY_CASTING casting, dtype datatype) except NULL
|
| 1151 |
+
NpyIter* NpyIter_MultiNew(npy_intp nop, PyArrayObject** op, npy_uint32 flags,
|
| 1152 |
+
NPY_ORDER order, NPY_CASTING casting, npy_uint32*
|
| 1153 |
+
op_flags, PyArray_Descr** op_dtypes) except NULL
|
| 1154 |
+
NpyIter* NpyIter_AdvancedNew(npy_intp nop, PyArrayObject** op,
|
| 1155 |
+
npy_uint32 flags, NPY_ORDER order,
|
| 1156 |
+
NPY_CASTING casting, npy_uint32* op_flags,
|
| 1157 |
+
PyArray_Descr** op_dtypes, int oa_ndim,
|
| 1158 |
+
int** op_axes, const npy_intp* itershape,
|
| 1159 |
+
npy_intp buffersize) except NULL
|
| 1160 |
+
NpyIter* NpyIter_Copy(NpyIter* it) except NULL
|
| 1161 |
+
int NpyIter_RemoveAxis(NpyIter* it, int axis) except NPY_FAIL
|
| 1162 |
+
int NpyIter_RemoveMultiIndex(NpyIter* it) except NPY_FAIL
|
| 1163 |
+
int NpyIter_EnableExternalLoop(NpyIter* it) except NPY_FAIL
|
| 1164 |
+
int NpyIter_Deallocate(NpyIter* it) except NPY_FAIL
|
| 1165 |
+
int NpyIter_Reset(NpyIter* it, char** errmsg) except NPY_FAIL
|
| 1166 |
+
int NpyIter_ResetToIterIndexRange(NpyIter* it, npy_intp istart,
|
| 1167 |
+
npy_intp iend, char** errmsg) except NPY_FAIL
|
| 1168 |
+
int NpyIter_ResetBasePointers(NpyIter* it, char** baseptrs, char** errmsg) except NPY_FAIL
|
| 1169 |
+
int NpyIter_GotoMultiIndex(NpyIter* it, const npy_intp* multi_index) except NPY_FAIL
|
| 1170 |
+
int NpyIter_GotoIndex(NpyIter* it, npy_intp index) except NPY_FAIL
|
| 1171 |
+
npy_intp NpyIter_GetIterSize(NpyIter* it) nogil
|
| 1172 |
+
npy_intp NpyIter_GetIterIndex(NpyIter* it) nogil
|
| 1173 |
+
void NpyIter_GetIterIndexRange(NpyIter* it, npy_intp* istart,
|
| 1174 |
+
npy_intp* iend) nogil
|
| 1175 |
+
int NpyIter_GotoIterIndex(NpyIter* it, npy_intp iterindex) except NPY_FAIL
|
| 1176 |
+
npy_bool NpyIter_HasDelayedBufAlloc(NpyIter* it) nogil
|
| 1177 |
+
npy_bool NpyIter_HasExternalLoop(NpyIter* it) nogil
|
| 1178 |
+
npy_bool NpyIter_HasMultiIndex(NpyIter* it) nogil
|
| 1179 |
+
npy_bool NpyIter_HasIndex(NpyIter* it) nogil
|
| 1180 |
+
npy_bool NpyIter_RequiresBuffering(NpyIter* it) nogil
|
| 1181 |
+
npy_bool NpyIter_IsBuffered(NpyIter* it) nogil
|
| 1182 |
+
npy_bool NpyIter_IsGrowInner(NpyIter* it) nogil
|
| 1183 |
+
npy_intp NpyIter_GetBufferSize(NpyIter* it) nogil
|
| 1184 |
+
int NpyIter_GetNDim(NpyIter* it) nogil
|
| 1185 |
+
int NpyIter_GetNOp(NpyIter* it) nogil
|
| 1186 |
+
npy_intp* NpyIter_GetAxisStrideArray(NpyIter* it, int axis) except NULL
|
| 1187 |
+
int NpyIter_GetShape(NpyIter* it, npy_intp* outshape) nogil
|
| 1188 |
+
PyArray_Descr** NpyIter_GetDescrArray(NpyIter* it)
|
| 1189 |
+
PyArrayObject** NpyIter_GetOperandArray(NpyIter* it)
|
| 1190 |
+
ndarray NpyIter_GetIterView(NpyIter* it, npy_intp i)
|
| 1191 |
+
void NpyIter_GetReadFlags(NpyIter* it, char* outreadflags)
|
| 1192 |
+
void NpyIter_GetWriteFlags(NpyIter* it, char* outwriteflags)
|
| 1193 |
+
int NpyIter_CreateCompatibleStrides(NpyIter* it, npy_intp itemsize,
|
| 1194 |
+
npy_intp* outstrides) except NPY_FAIL
|
| 1195 |
+
npy_bool NpyIter_IsFirstVisit(NpyIter* it, int iop) nogil
|
| 1196 |
+
# functions for iterating an NpyIter object
|
| 1197 |
+
#
|
| 1198 |
+
# These don't match the definition in the C API because Cython can't wrap
|
| 1199 |
+
# function pointers that return functions.
|
| 1200 |
+
NpyIter_IterNextFunc NpyIter_GetIterNext(NpyIter* it, char** errmsg) except NULL
|
| 1201 |
+
NpyIter_GetMultiIndexFunc NpyIter_GetGetMultiIndex(NpyIter* it,
|
| 1202 |
+
char** errmsg) except NULL
|
| 1203 |
+
char** NpyIter_GetDataPtrArray(NpyIter* it) nogil
|
| 1204 |
+
char** NpyIter_GetInitialDataPtrArray(NpyIter* it) nogil
|
| 1205 |
+
npy_intp* NpyIter_GetIndexPtr(NpyIter* it)
|
| 1206 |
+
npy_intp* NpyIter_GetInnerStrideArray(NpyIter* it) nogil
|
| 1207 |
+
npy_intp* NpyIter_GetInnerLoopSizePtr(NpyIter* it) nogil
|
| 1208 |
+
void NpyIter_GetInnerFixedStrideArray(NpyIter* it, npy_intp* outstrides) nogil
|
| 1209 |
+
npy_bool NpyIter_IterationNeedsAPI(NpyIter* it) nogil
|
| 1210 |
+
void NpyIter_DebugPrint(NpyIter* it)
|
| 1211 |
+
|
| 1212 |
+
# NpyString API
|
| 1213 |
+
cdef extern from "numpy/ndarraytypes.h":
|
| 1214 |
+
ctypedef struct npy_string_allocator:
|
| 1215 |
+
pass
|
| 1216 |
+
|
| 1217 |
+
ctypedef struct npy_packed_static_string:
|
| 1218 |
+
pass
|
| 1219 |
+
|
| 1220 |
+
ctypedef struct npy_static_string:
|
| 1221 |
+
size_t size
|
| 1222 |
+
const char *buf
|
| 1223 |
+
|
| 1224 |
+
ctypedef struct PyArray_StringDTypeObject:
|
| 1225 |
+
PyArray_Descr base
|
| 1226 |
+
PyObject *na_object
|
| 1227 |
+
char coerce
|
| 1228 |
+
char has_nan_na
|
| 1229 |
+
char has_string_na
|
| 1230 |
+
char array_owned
|
| 1231 |
+
npy_static_string default_string
|
| 1232 |
+
npy_static_string na_name
|
| 1233 |
+
npy_string_allocator *allocator
|
| 1234 |
+
|
| 1235 |
+
cdef extern from "numpy/arrayobject.h":
|
| 1236 |
+
npy_string_allocator *NpyString_acquire_allocator(const PyArray_StringDTypeObject *descr)
|
| 1237 |
+
void NpyString_acquire_allocators(size_t n_descriptors, PyArray_Descr *const descrs[], npy_string_allocator *allocators[])
|
| 1238 |
+
void NpyString_release_allocator(npy_string_allocator *allocator)
|
| 1239 |
+
void NpyString_release_allocators(size_t length, npy_string_allocator *allocators[])
|
| 1240 |
+
int NpyString_load(npy_string_allocator *allocator, const npy_packed_static_string *packed_string, npy_static_string *unpacked_string)
|
| 1241 |
+
int NpyString_pack_null(npy_string_allocator *allocator, npy_packed_static_string *packed_string)
|
| 1242 |
+
int NpyString_pack(npy_string_allocator *allocator, npy_packed_static_string *packed_string, const char *buf, size_t size)
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/__init__.pxd
ADDED
|
@@ -0,0 +1,1155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# NumPy static imports for Cython < 3.0
|
| 2 |
+
#
|
| 3 |
+
# If any of the PyArray_* functions are called, import_array must be
|
| 4 |
+
# called first.
|
| 5 |
+
#
|
| 6 |
+
# Author: Dag Sverre Seljebotn
|
| 7 |
+
#
|
| 8 |
+
|
| 9 |
+
DEF _buffer_format_string_len = 255
|
| 10 |
+
|
| 11 |
+
cimport cpython.buffer as pybuf
|
| 12 |
+
from cpython.ref cimport Py_INCREF
|
| 13 |
+
from cpython.mem cimport PyObject_Malloc, PyObject_Free
|
| 14 |
+
from cpython.object cimport PyObject, PyTypeObject
|
| 15 |
+
from cpython.buffer cimport PyObject_GetBuffer
|
| 16 |
+
from cpython.type cimport type
|
| 17 |
+
cimport libc.stdio as stdio
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
cdef extern from *:
|
| 21 |
+
# Leave a marker that the NumPy declarations came from NumPy itself and not from Cython.
|
| 22 |
+
# See https://github.com/cython/cython/issues/3573
|
| 23 |
+
"""
|
| 24 |
+
/* Using NumPy API declarations from "numpy/__init__.pxd" */
|
| 25 |
+
"""
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
cdef extern from "Python.h":
|
| 29 |
+
ctypedef int Py_intptr_t
|
| 30 |
+
bint PyObject_TypeCheck(object obj, PyTypeObject* type)
|
| 31 |
+
|
| 32 |
+
cdef extern from "numpy/arrayobject.h":
|
| 33 |
+
# It would be nice to use size_t and ssize_t, but ssize_t has special
|
| 34 |
+
# implicit conversion rules, so just use "long".
|
| 35 |
+
# Note: The actual type only matters for Cython promotion, so long
|
| 36 |
+
# is closer than int, but could lead to incorrect promotion.
|
| 37 |
+
# (Not to worrying, and always the status-quo.)
|
| 38 |
+
ctypedef signed long npy_intp
|
| 39 |
+
ctypedef unsigned long npy_uintp
|
| 40 |
+
|
| 41 |
+
ctypedef unsigned char npy_bool
|
| 42 |
+
|
| 43 |
+
ctypedef signed char npy_byte
|
| 44 |
+
ctypedef signed short npy_short
|
| 45 |
+
ctypedef signed int npy_int
|
| 46 |
+
ctypedef signed long npy_long
|
| 47 |
+
ctypedef signed long long npy_longlong
|
| 48 |
+
|
| 49 |
+
ctypedef unsigned char npy_ubyte
|
| 50 |
+
ctypedef unsigned short npy_ushort
|
| 51 |
+
ctypedef unsigned int npy_uint
|
| 52 |
+
ctypedef unsigned long npy_ulong
|
| 53 |
+
ctypedef unsigned long long npy_ulonglong
|
| 54 |
+
|
| 55 |
+
ctypedef float npy_float
|
| 56 |
+
ctypedef double npy_double
|
| 57 |
+
ctypedef long double npy_longdouble
|
| 58 |
+
|
| 59 |
+
ctypedef signed char npy_int8
|
| 60 |
+
ctypedef signed short npy_int16
|
| 61 |
+
ctypedef signed int npy_int32
|
| 62 |
+
ctypedef signed long long npy_int64
|
| 63 |
+
|
| 64 |
+
ctypedef unsigned char npy_uint8
|
| 65 |
+
ctypedef unsigned short npy_uint16
|
| 66 |
+
ctypedef unsigned int npy_uint32
|
| 67 |
+
ctypedef unsigned long long npy_uint64
|
| 68 |
+
|
| 69 |
+
ctypedef float npy_float32
|
| 70 |
+
ctypedef double npy_float64
|
| 71 |
+
ctypedef long double npy_float80
|
| 72 |
+
ctypedef long double npy_float96
|
| 73 |
+
ctypedef long double npy_float128
|
| 74 |
+
|
| 75 |
+
ctypedef struct npy_cfloat:
|
| 76 |
+
pass
|
| 77 |
+
|
| 78 |
+
ctypedef struct npy_cdouble:
|
| 79 |
+
pass
|
| 80 |
+
|
| 81 |
+
ctypedef struct npy_clongdouble:
|
| 82 |
+
pass
|
| 83 |
+
|
| 84 |
+
ctypedef struct npy_complex64:
|
| 85 |
+
pass
|
| 86 |
+
|
| 87 |
+
ctypedef struct npy_complex128:
|
| 88 |
+
pass
|
| 89 |
+
|
| 90 |
+
ctypedef struct npy_complex160:
|
| 91 |
+
pass
|
| 92 |
+
|
| 93 |
+
ctypedef struct npy_complex192:
|
| 94 |
+
pass
|
| 95 |
+
|
| 96 |
+
ctypedef struct npy_complex256:
|
| 97 |
+
pass
|
| 98 |
+
|
| 99 |
+
ctypedef struct PyArray_Dims:
|
| 100 |
+
npy_intp *ptr
|
| 101 |
+
int len
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
cdef enum NPY_TYPES:
|
| 105 |
+
NPY_BOOL
|
| 106 |
+
NPY_BYTE
|
| 107 |
+
NPY_UBYTE
|
| 108 |
+
NPY_SHORT
|
| 109 |
+
NPY_USHORT
|
| 110 |
+
NPY_INT
|
| 111 |
+
NPY_UINT
|
| 112 |
+
NPY_LONG
|
| 113 |
+
NPY_ULONG
|
| 114 |
+
NPY_LONGLONG
|
| 115 |
+
NPY_ULONGLONG
|
| 116 |
+
NPY_FLOAT
|
| 117 |
+
NPY_DOUBLE
|
| 118 |
+
NPY_LONGDOUBLE
|
| 119 |
+
NPY_CFLOAT
|
| 120 |
+
NPY_CDOUBLE
|
| 121 |
+
NPY_CLONGDOUBLE
|
| 122 |
+
NPY_OBJECT
|
| 123 |
+
NPY_STRING
|
| 124 |
+
NPY_UNICODE
|
| 125 |
+
NPY_VSTRING
|
| 126 |
+
NPY_VOID
|
| 127 |
+
NPY_DATETIME
|
| 128 |
+
NPY_TIMEDELTA
|
| 129 |
+
NPY_NTYPES_LEGACY
|
| 130 |
+
NPY_NOTYPE
|
| 131 |
+
|
| 132 |
+
NPY_INT8
|
| 133 |
+
NPY_INT16
|
| 134 |
+
NPY_INT32
|
| 135 |
+
NPY_INT64
|
| 136 |
+
NPY_UINT8
|
| 137 |
+
NPY_UINT16
|
| 138 |
+
NPY_UINT32
|
| 139 |
+
NPY_UINT64
|
| 140 |
+
NPY_FLOAT16
|
| 141 |
+
NPY_FLOAT32
|
| 142 |
+
NPY_FLOAT64
|
| 143 |
+
NPY_FLOAT80
|
| 144 |
+
NPY_FLOAT96
|
| 145 |
+
NPY_FLOAT128
|
| 146 |
+
NPY_COMPLEX64
|
| 147 |
+
NPY_COMPLEX128
|
| 148 |
+
NPY_COMPLEX160
|
| 149 |
+
NPY_COMPLEX192
|
| 150 |
+
NPY_COMPLEX256
|
| 151 |
+
|
| 152 |
+
NPY_INTP
|
| 153 |
+
NPY_UINTP
|
| 154 |
+
NPY_DEFAULT_INT # Not a compile time constant (normally)!
|
| 155 |
+
|
| 156 |
+
ctypedef enum NPY_ORDER:
|
| 157 |
+
NPY_ANYORDER
|
| 158 |
+
NPY_CORDER
|
| 159 |
+
NPY_FORTRANORDER
|
| 160 |
+
NPY_KEEPORDER
|
| 161 |
+
|
| 162 |
+
ctypedef enum NPY_CASTING:
|
| 163 |
+
NPY_NO_CASTING
|
| 164 |
+
NPY_EQUIV_CASTING
|
| 165 |
+
NPY_SAFE_CASTING
|
| 166 |
+
NPY_SAME_KIND_CASTING
|
| 167 |
+
NPY_UNSAFE_CASTING
|
| 168 |
+
NPY_SAME_VALUE_CASTING
|
| 169 |
+
|
| 170 |
+
ctypedef enum NPY_CLIPMODE:
|
| 171 |
+
NPY_CLIP
|
| 172 |
+
NPY_WRAP
|
| 173 |
+
NPY_RAISE
|
| 174 |
+
|
| 175 |
+
ctypedef enum NPY_SCALARKIND:
|
| 176 |
+
NPY_NOSCALAR,
|
| 177 |
+
NPY_BOOL_SCALAR,
|
| 178 |
+
NPY_INTPOS_SCALAR,
|
| 179 |
+
NPY_INTNEG_SCALAR,
|
| 180 |
+
NPY_FLOAT_SCALAR,
|
| 181 |
+
NPY_COMPLEX_SCALAR,
|
| 182 |
+
NPY_OBJECT_SCALAR
|
| 183 |
+
|
| 184 |
+
ctypedef enum NPY_SORTKIND:
|
| 185 |
+
NPY_QUICKSORT
|
| 186 |
+
NPY_HEAPSORT
|
| 187 |
+
NPY_MERGESORT
|
| 188 |
+
|
| 189 |
+
ctypedef enum NPY_SEARCHSIDE:
|
| 190 |
+
NPY_SEARCHLEFT
|
| 191 |
+
NPY_SEARCHRIGHT
|
| 192 |
+
|
| 193 |
+
enum:
|
| 194 |
+
NPY_ARRAY_C_CONTIGUOUS
|
| 195 |
+
NPY_ARRAY_F_CONTIGUOUS
|
| 196 |
+
NPY_ARRAY_OWNDATA
|
| 197 |
+
NPY_ARRAY_FORCECAST
|
| 198 |
+
NPY_ARRAY_ENSURECOPY
|
| 199 |
+
NPY_ARRAY_ENSUREARRAY
|
| 200 |
+
NPY_ARRAY_ELEMENTSTRIDES
|
| 201 |
+
NPY_ARRAY_ALIGNED
|
| 202 |
+
NPY_ARRAY_NOTSWAPPED
|
| 203 |
+
NPY_ARRAY_WRITEABLE
|
| 204 |
+
NPY_ARRAY_WRITEBACKIFCOPY
|
| 205 |
+
|
| 206 |
+
NPY_ARRAY_BEHAVED
|
| 207 |
+
NPY_ARRAY_BEHAVED_NS
|
| 208 |
+
NPY_ARRAY_CARRAY
|
| 209 |
+
NPY_ARRAY_CARRAY_RO
|
| 210 |
+
NPY_ARRAY_FARRAY
|
| 211 |
+
NPY_ARRAY_FARRAY_RO
|
| 212 |
+
NPY_ARRAY_DEFAULT
|
| 213 |
+
|
| 214 |
+
NPY_ARRAY_IN_ARRAY
|
| 215 |
+
NPY_ARRAY_OUT_ARRAY
|
| 216 |
+
NPY_ARRAY_INOUT_ARRAY
|
| 217 |
+
NPY_ARRAY_IN_FARRAY
|
| 218 |
+
NPY_ARRAY_OUT_FARRAY
|
| 219 |
+
NPY_ARRAY_INOUT_FARRAY
|
| 220 |
+
|
| 221 |
+
NPY_ARRAY_UPDATE_ALL
|
| 222 |
+
|
| 223 |
+
cdef enum:
|
| 224 |
+
NPY_MAXDIMS # 64 on NumPy 2.x and 32 on NumPy 1.x
|
| 225 |
+
NPY_RAVEL_AXIS # Used for functions like PyArray_Mean
|
| 226 |
+
|
| 227 |
+
ctypedef void (*PyArray_VectorUnaryFunc)(void *, void *, npy_intp, void *, void *)
|
| 228 |
+
|
| 229 |
+
ctypedef struct PyArray_ArrayDescr:
|
| 230 |
+
# shape is a tuple, but Cython doesn't support "tuple shape"
|
| 231 |
+
# inside a non-PyObject declaration, so we have to declare it
|
| 232 |
+
# as just a PyObject*.
|
| 233 |
+
PyObject* shape
|
| 234 |
+
|
| 235 |
+
ctypedef struct PyArray_Descr:
|
| 236 |
+
pass
|
| 237 |
+
|
| 238 |
+
ctypedef class numpy.dtype [object PyArray_Descr, check_size ignore]:
|
| 239 |
+
# Use PyDataType_* macros when possible, however there are no macros
|
| 240 |
+
# for accessing some of the fields, so some are defined.
|
| 241 |
+
cdef PyTypeObject* typeobj
|
| 242 |
+
cdef char kind
|
| 243 |
+
cdef char type
|
| 244 |
+
# Numpy sometimes mutates this without warning (e.g. it'll
|
| 245 |
+
# sometimes change "|" to "<" in shared dtype objects on
|
| 246 |
+
# little-endian machines). If this matters to you, use
|
| 247 |
+
# PyArray_IsNativeByteOrder(dtype.byteorder) instead of
|
| 248 |
+
# directly accessing this field.
|
| 249 |
+
cdef char byteorder
|
| 250 |
+
# Flags are not directly accessible on Cython <3. Use PyDataType_FLAGS.
|
| 251 |
+
# cdef char flags
|
| 252 |
+
cdef int type_num
|
| 253 |
+
# itemsize/elsize, alignment, fields, names, and subarray must
|
| 254 |
+
# use the `PyDataType_*` accessor macros. With Cython 3 you can
|
| 255 |
+
# still use getter attributes `dtype.itemsize`
|
| 256 |
+
|
| 257 |
+
ctypedef class numpy.flatiter [object PyArrayIterObject, check_size ignore]:
|
| 258 |
+
# Use through macros
|
| 259 |
+
pass
|
| 260 |
+
|
| 261 |
+
ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
|
| 262 |
+
cdef int numiter
|
| 263 |
+
cdef npy_intp size, index
|
| 264 |
+
cdef int nd
|
| 265 |
+
cdef npy_intp *dimensions
|
| 266 |
+
cdef void **iters
|
| 267 |
+
|
| 268 |
+
ctypedef struct PyArrayObject:
|
| 269 |
+
# For use in situations where ndarray can't replace PyArrayObject*,
|
| 270 |
+
# like PyArrayObject**.
|
| 271 |
+
pass
|
| 272 |
+
|
| 273 |
+
ctypedef class numpy.ndarray [object PyArrayObject, check_size ignore]:
|
| 274 |
+
cdef __cythonbufferdefaults__ = {"mode": "strided"}
|
| 275 |
+
|
| 276 |
+
cdef:
|
| 277 |
+
# Only taking a few of the most commonly used and stable fields.
|
| 278 |
+
# One should use PyArray_* macros instead to access the C fields.
|
| 279 |
+
char *data
|
| 280 |
+
int ndim "nd"
|
| 281 |
+
npy_intp *shape "dimensions"
|
| 282 |
+
npy_intp *strides
|
| 283 |
+
dtype descr # deprecated since NumPy 1.7 !
|
| 284 |
+
PyObject* base # NOT PUBLIC, DO NOT USE !
|
| 285 |
+
|
| 286 |
+
|
| 287 |
+
int _import_array() except -1
|
| 288 |
+
# A second definition so _import_array isn't marked as used when we use it here.
|
| 289 |
+
# Do not use - subject to change any time.
|
| 290 |
+
int __pyx_import_array "_import_array"() except -1
|
| 291 |
+
|
| 292 |
+
#
|
| 293 |
+
# Macros from ndarrayobject.h
|
| 294 |
+
#
|
| 295 |
+
bint PyArray_CHKFLAGS(ndarray m, int flags) nogil
|
| 296 |
+
bint PyArray_IS_C_CONTIGUOUS(ndarray arr) nogil
|
| 297 |
+
bint PyArray_IS_F_CONTIGUOUS(ndarray arr) nogil
|
| 298 |
+
bint PyArray_ISCONTIGUOUS(ndarray m) nogil
|
| 299 |
+
bint PyArray_ISWRITEABLE(ndarray m) nogil
|
| 300 |
+
bint PyArray_ISALIGNED(ndarray m) nogil
|
| 301 |
+
|
| 302 |
+
int PyArray_NDIM(ndarray) nogil
|
| 303 |
+
bint PyArray_ISONESEGMENT(ndarray) nogil
|
| 304 |
+
bint PyArray_ISFORTRAN(ndarray) nogil
|
| 305 |
+
int PyArray_FORTRANIF(ndarray) nogil
|
| 306 |
+
|
| 307 |
+
void* PyArray_DATA(ndarray) nogil
|
| 308 |
+
char* PyArray_BYTES(ndarray) nogil
|
| 309 |
+
|
| 310 |
+
npy_intp* PyArray_DIMS(ndarray) nogil
|
| 311 |
+
npy_intp* PyArray_STRIDES(ndarray) nogil
|
| 312 |
+
npy_intp PyArray_DIM(ndarray, size_t) nogil
|
| 313 |
+
npy_intp PyArray_STRIDE(ndarray, size_t) nogil
|
| 314 |
+
|
| 315 |
+
PyObject *PyArray_BASE(ndarray) nogil # returns borrowed reference!
|
| 316 |
+
PyArray_Descr *PyArray_DESCR(ndarray) nogil # returns borrowed reference to dtype!
|
| 317 |
+
PyArray_Descr *PyArray_DTYPE(ndarray) nogil # returns borrowed reference to dtype! NP 1.7+ alias for descr.
|
| 318 |
+
int PyArray_FLAGS(ndarray) nogil
|
| 319 |
+
void PyArray_CLEARFLAGS(ndarray, int flags) nogil # Added in NumPy 1.7
|
| 320 |
+
void PyArray_ENABLEFLAGS(ndarray, int flags) nogil # Added in NumPy 1.7
|
| 321 |
+
npy_intp PyArray_ITEMSIZE(ndarray) nogil
|
| 322 |
+
int PyArray_TYPE(ndarray arr) nogil
|
| 323 |
+
|
| 324 |
+
object PyArray_GETITEM(ndarray arr, void *itemptr)
|
| 325 |
+
int PyArray_SETITEM(ndarray arr, void *itemptr, object obj) except -1
|
| 326 |
+
|
| 327 |
+
bint PyTypeNum_ISBOOL(int) nogil
|
| 328 |
+
bint PyTypeNum_ISUNSIGNED(int) nogil
|
| 329 |
+
bint PyTypeNum_ISSIGNED(int) nogil
|
| 330 |
+
bint PyTypeNum_ISINTEGER(int) nogil
|
| 331 |
+
bint PyTypeNum_ISFLOAT(int) nogil
|
| 332 |
+
bint PyTypeNum_ISNUMBER(int) nogil
|
| 333 |
+
bint PyTypeNum_ISSTRING(int) nogil
|
| 334 |
+
bint PyTypeNum_ISCOMPLEX(int) nogil
|
| 335 |
+
bint PyTypeNum_ISFLEXIBLE(int) nogil
|
| 336 |
+
bint PyTypeNum_ISUSERDEF(int) nogil
|
| 337 |
+
bint PyTypeNum_ISEXTENDED(int) nogil
|
| 338 |
+
bint PyTypeNum_ISOBJECT(int) nogil
|
| 339 |
+
|
| 340 |
+
npy_intp PyDataType_ELSIZE(dtype) nogil
|
| 341 |
+
npy_intp PyDataType_ALIGNMENT(dtype) nogil
|
| 342 |
+
PyObject* PyDataType_METADATA(dtype) nogil
|
| 343 |
+
PyArray_ArrayDescr* PyDataType_SUBARRAY(dtype) nogil
|
| 344 |
+
PyObject* PyDataType_NAMES(dtype) nogil
|
| 345 |
+
PyObject* PyDataType_FIELDS(dtype) nogil
|
| 346 |
+
|
| 347 |
+
bint PyDataType_ISBOOL(dtype) nogil
|
| 348 |
+
bint PyDataType_ISUNSIGNED(dtype) nogil
|
| 349 |
+
bint PyDataType_ISSIGNED(dtype) nogil
|
| 350 |
+
bint PyDataType_ISINTEGER(dtype) nogil
|
| 351 |
+
bint PyDataType_ISFLOAT(dtype) nogil
|
| 352 |
+
bint PyDataType_ISNUMBER(dtype) nogil
|
| 353 |
+
bint PyDataType_ISSTRING(dtype) nogil
|
| 354 |
+
bint PyDataType_ISCOMPLEX(dtype) nogil
|
| 355 |
+
bint PyDataType_ISFLEXIBLE(dtype) nogil
|
| 356 |
+
bint PyDataType_ISUSERDEF(dtype) nogil
|
| 357 |
+
bint PyDataType_ISEXTENDED(dtype) nogil
|
| 358 |
+
bint PyDataType_ISOBJECT(dtype) nogil
|
| 359 |
+
bint PyDataType_HASFIELDS(dtype) nogil
|
| 360 |
+
bint PyDataType_HASSUBARRAY(dtype) nogil
|
| 361 |
+
npy_uint64 PyDataType_FLAGS(dtype) nogil
|
| 362 |
+
|
| 363 |
+
bint PyArray_ISBOOL(ndarray) nogil
|
| 364 |
+
bint PyArray_ISUNSIGNED(ndarray) nogil
|
| 365 |
+
bint PyArray_ISSIGNED(ndarray) nogil
|
| 366 |
+
bint PyArray_ISINTEGER(ndarray) nogil
|
| 367 |
+
bint PyArray_ISFLOAT(ndarray) nogil
|
| 368 |
+
bint PyArray_ISNUMBER(ndarray) nogil
|
| 369 |
+
bint PyArray_ISSTRING(ndarray) nogil
|
| 370 |
+
bint PyArray_ISCOMPLEX(ndarray) nogil
|
| 371 |
+
bint PyArray_ISFLEXIBLE(ndarray) nogil
|
| 372 |
+
bint PyArray_ISUSERDEF(ndarray) nogil
|
| 373 |
+
bint PyArray_ISEXTENDED(ndarray) nogil
|
| 374 |
+
bint PyArray_ISOBJECT(ndarray) nogil
|
| 375 |
+
bint PyArray_HASFIELDS(ndarray) nogil
|
| 376 |
+
|
| 377 |
+
bint PyArray_ISVARIABLE(ndarray) nogil
|
| 378 |
+
|
| 379 |
+
bint PyArray_SAFEALIGNEDCOPY(ndarray) nogil
|
| 380 |
+
bint PyArray_ISNBO(char) nogil # works on ndarray.byteorder
|
| 381 |
+
bint PyArray_IsNativeByteOrder(char) nogil # works on ndarray.byteorder
|
| 382 |
+
bint PyArray_ISNOTSWAPPED(ndarray) nogil
|
| 383 |
+
bint PyArray_ISBYTESWAPPED(ndarray) nogil
|
| 384 |
+
|
| 385 |
+
bint PyArray_FLAGSWAP(ndarray, int) nogil
|
| 386 |
+
|
| 387 |
+
bint PyArray_ISCARRAY(ndarray) nogil
|
| 388 |
+
bint PyArray_ISCARRAY_RO(ndarray) nogil
|
| 389 |
+
bint PyArray_ISFARRAY(ndarray) nogil
|
| 390 |
+
bint PyArray_ISFARRAY_RO(ndarray) nogil
|
| 391 |
+
bint PyArray_ISBEHAVED(ndarray) nogil
|
| 392 |
+
bint PyArray_ISBEHAVED_RO(ndarray) nogil
|
| 393 |
+
|
| 394 |
+
|
| 395 |
+
bint PyDataType_ISNOTSWAPPED(dtype) nogil
|
| 396 |
+
bint PyDataType_ISBYTESWAPPED(dtype) nogil
|
| 397 |
+
|
| 398 |
+
bint PyArray_DescrCheck(object)
|
| 399 |
+
|
| 400 |
+
bint PyArray_Check(object)
|
| 401 |
+
bint PyArray_CheckExact(object)
|
| 402 |
+
|
| 403 |
+
# Cannot be supported due to out arg:
|
| 404 |
+
# bint PyArray_HasArrayInterfaceType(object, dtype, object, object&)
|
| 405 |
+
# bint PyArray_HasArrayInterface(op, out)
|
| 406 |
+
|
| 407 |
+
|
| 408 |
+
bint PyArray_IsZeroDim(object)
|
| 409 |
+
# Cannot be supported due to ## ## in macro:
|
| 410 |
+
# bint PyArray_IsScalar(object, verbatim work)
|
| 411 |
+
bint PyArray_CheckScalar(object)
|
| 412 |
+
bint PyArray_IsPythonNumber(object)
|
| 413 |
+
bint PyArray_IsPythonScalar(object)
|
| 414 |
+
bint PyArray_IsAnyScalar(object)
|
| 415 |
+
bint PyArray_CheckAnyScalar(object)
|
| 416 |
+
|
| 417 |
+
ndarray PyArray_GETCONTIGUOUS(ndarray)
|
| 418 |
+
bint PyArray_SAMESHAPE(ndarray, ndarray) nogil
|
| 419 |
+
npy_intp PyArray_SIZE(ndarray) nogil
|
| 420 |
+
npy_intp PyArray_NBYTES(ndarray) nogil
|
| 421 |
+
|
| 422 |
+
object PyArray_FROM_O(object)
|
| 423 |
+
object PyArray_FROM_OF(object m, int flags)
|
| 424 |
+
object PyArray_FROM_OT(object m, int type)
|
| 425 |
+
object PyArray_FROM_OTF(object m, int type, int flags)
|
| 426 |
+
object PyArray_FROMANY(object m, int type, int min, int max, int flags)
|
| 427 |
+
object PyArray_ZEROS(int nd, npy_intp* dims, int type, int fortran)
|
| 428 |
+
object PyArray_EMPTY(int nd, npy_intp* dims, int type, int fortran)
|
| 429 |
+
void PyArray_FILLWBYTE(ndarray, int val)
|
| 430 |
+
object PyArray_ContiguousFromAny(op, int, int min_depth, int max_depth)
|
| 431 |
+
unsigned char PyArray_EquivArrTypes(ndarray a1, ndarray a2)
|
| 432 |
+
bint PyArray_EquivByteorders(int b1, int b2) nogil
|
| 433 |
+
object PyArray_SimpleNew(int nd, npy_intp* dims, int typenum)
|
| 434 |
+
object PyArray_SimpleNewFromData(int nd, npy_intp* dims, int typenum, void* data)
|
| 435 |
+
#object PyArray_SimpleNewFromDescr(int nd, npy_intp* dims, dtype descr)
|
| 436 |
+
object PyArray_ToScalar(void* data, ndarray arr)
|
| 437 |
+
|
| 438 |
+
void* PyArray_GETPTR1(ndarray m, npy_intp i) nogil
|
| 439 |
+
void* PyArray_GETPTR2(ndarray m, npy_intp i, npy_intp j) nogil
|
| 440 |
+
void* PyArray_GETPTR3(ndarray m, npy_intp i, npy_intp j, npy_intp k) nogil
|
| 441 |
+
void* PyArray_GETPTR4(ndarray m, npy_intp i, npy_intp j, npy_intp k, npy_intp l) nogil
|
| 442 |
+
|
| 443 |
+
# Cannot be supported due to out arg
|
| 444 |
+
# void PyArray_DESCR_REPLACE(descr)
|
| 445 |
+
|
| 446 |
+
|
| 447 |
+
object PyArray_Copy(ndarray)
|
| 448 |
+
object PyArray_FromObject(object op, int type, int min_depth, int max_depth)
|
| 449 |
+
object PyArray_ContiguousFromObject(object op, int type, int min_depth, int max_depth)
|
| 450 |
+
object PyArray_CopyFromObject(object op, int type, int min_depth, int max_depth)
|
| 451 |
+
|
| 452 |
+
object PyArray_Cast(ndarray mp, int type_num)
|
| 453 |
+
object PyArray_Take(ndarray ap, object items, int axis)
|
| 454 |
+
object PyArray_Put(ndarray ap, object items, object values)
|
| 455 |
+
|
| 456 |
+
void PyArray_ITER_RESET(flatiter it) nogil
|
| 457 |
+
void PyArray_ITER_NEXT(flatiter it) nogil
|
| 458 |
+
void PyArray_ITER_GOTO(flatiter it, npy_intp* destination) nogil
|
| 459 |
+
void PyArray_ITER_GOTO1D(flatiter it, npy_intp ind) nogil
|
| 460 |
+
void* PyArray_ITER_DATA(flatiter it) nogil
|
| 461 |
+
bint PyArray_ITER_NOTDONE(flatiter it) nogil
|
| 462 |
+
|
| 463 |
+
void PyArray_MultiIter_RESET(broadcast multi) nogil
|
| 464 |
+
void PyArray_MultiIter_NEXT(broadcast multi) nogil
|
| 465 |
+
void PyArray_MultiIter_GOTO(broadcast multi, npy_intp dest) nogil
|
| 466 |
+
void PyArray_MultiIter_GOTO1D(broadcast multi, npy_intp ind) nogil
|
| 467 |
+
void* PyArray_MultiIter_DATA(broadcast multi, npy_intp i) nogil
|
| 468 |
+
void PyArray_MultiIter_NEXTi(broadcast multi, npy_intp i) nogil
|
| 469 |
+
bint PyArray_MultiIter_NOTDONE(broadcast multi) nogil
|
| 470 |
+
npy_intp PyArray_MultiIter_SIZE(broadcast multi) nogil
|
| 471 |
+
int PyArray_MultiIter_NDIM(broadcast multi) nogil
|
| 472 |
+
npy_intp PyArray_MultiIter_INDEX(broadcast multi) nogil
|
| 473 |
+
int PyArray_MultiIter_NUMITER(broadcast multi) nogil
|
| 474 |
+
npy_intp* PyArray_MultiIter_DIMS(broadcast multi) nogil
|
| 475 |
+
void** PyArray_MultiIter_ITERS(broadcast multi) nogil
|
| 476 |
+
|
| 477 |
+
# Functions from __multiarray_api.h
|
| 478 |
+
|
| 479 |
+
# Functions taking dtype and returning object/ndarray are disabled
|
| 480 |
+
# for now as they steal dtype references. I'm conservative and disable
|
| 481 |
+
# more than is probably needed until it can be checked further.
|
| 482 |
+
int PyArray_INCREF (ndarray) except * # uses PyArray_Item_INCREF...
|
| 483 |
+
int PyArray_XDECREF (ndarray) except * # uses PyArray_Item_DECREF...
|
| 484 |
+
dtype PyArray_DescrFromType (int)
|
| 485 |
+
object PyArray_TypeObjectFromType (int)
|
| 486 |
+
char * PyArray_Zero (ndarray)
|
| 487 |
+
char * PyArray_One (ndarray)
|
| 488 |
+
#object PyArray_CastToType (ndarray, dtype, int)
|
| 489 |
+
int PyArray_CanCastSafely (int, int) # writes errors
|
| 490 |
+
npy_bool PyArray_CanCastTo (dtype, dtype) # writes errors
|
| 491 |
+
int PyArray_ObjectType (object, int) except 0
|
| 492 |
+
dtype PyArray_DescrFromObject (object, dtype)
|
| 493 |
+
#ndarray* PyArray_ConvertToCommonType (object, int *)
|
| 494 |
+
dtype PyArray_DescrFromScalar (object)
|
| 495 |
+
dtype PyArray_DescrFromTypeObject (object)
|
| 496 |
+
npy_intp PyArray_Size (object)
|
| 497 |
+
#object PyArray_Scalar (void *, dtype, object)
|
| 498 |
+
#object PyArray_FromScalar (object, dtype)
|
| 499 |
+
void PyArray_ScalarAsCtype (object, void *)
|
| 500 |
+
#int PyArray_CastScalarToCtype (object, void *, dtype)
|
| 501 |
+
#int PyArray_CastScalarDirect (object, dtype, void *, int)
|
| 502 |
+
#PyArray_VectorUnaryFunc * PyArray_GetCastFunc (dtype, int)
|
| 503 |
+
#object PyArray_FromAny (object, dtype, int, int, int, object)
|
| 504 |
+
object PyArray_EnsureArray (object)
|
| 505 |
+
object PyArray_EnsureAnyArray (object)
|
| 506 |
+
#object PyArray_FromFile (stdio.FILE *, dtype, npy_intp, char *)
|
| 507 |
+
#object PyArray_FromString (char *, npy_intp, dtype, npy_intp, char *)
|
| 508 |
+
#object PyArray_FromBuffer (object, dtype, npy_intp, npy_intp)
|
| 509 |
+
#object PyArray_FromIter (object, dtype, npy_intp)
|
| 510 |
+
object PyArray_Return (ndarray)
|
| 511 |
+
#object PyArray_GetField (ndarray, dtype, int)
|
| 512 |
+
#int PyArray_SetField (ndarray, dtype, int, object) except -1
|
| 513 |
+
object PyArray_Byteswap (ndarray, npy_bool)
|
| 514 |
+
object PyArray_Resize (ndarray, PyArray_Dims *, int, NPY_ORDER)
|
| 515 |
+
int PyArray_CopyInto (ndarray, ndarray) except -1
|
| 516 |
+
int PyArray_CopyAnyInto (ndarray, ndarray) except -1
|
| 517 |
+
int PyArray_CopyObject (ndarray, object) except -1
|
| 518 |
+
object PyArray_NewCopy (ndarray, NPY_ORDER)
|
| 519 |
+
object PyArray_ToList (ndarray)
|
| 520 |
+
object PyArray_ToString (ndarray, NPY_ORDER)
|
| 521 |
+
int PyArray_ToFile (ndarray, stdio.FILE *, char *, char *) except -1
|
| 522 |
+
int PyArray_Dump (object, object, int) except -1
|
| 523 |
+
object PyArray_Dumps (object, int)
|
| 524 |
+
int PyArray_ValidType (int) # Cannot error
|
| 525 |
+
void PyArray_UpdateFlags (ndarray, int)
|
| 526 |
+
object PyArray_New (type, int, npy_intp *, int, npy_intp *, void *, int, int, object)
|
| 527 |
+
#object PyArray_NewFromDescr (type, dtype, int, npy_intp *, npy_intp *, void *, int, object)
|
| 528 |
+
#dtype PyArray_DescrNew (dtype)
|
| 529 |
+
dtype PyArray_DescrNewFromType (int)
|
| 530 |
+
double PyArray_GetPriority (object, double) # clears errors as of 1.25
|
| 531 |
+
object PyArray_IterNew (object)
|
| 532 |
+
object PyArray_MultiIterNew (int, ...)
|
| 533 |
+
|
| 534 |
+
int PyArray_PyIntAsInt (object) except? -1
|
| 535 |
+
npy_intp PyArray_PyIntAsIntp (object)
|
| 536 |
+
int PyArray_Broadcast (broadcast) except -1
|
| 537 |
+
int PyArray_FillWithScalar (ndarray, object) except -1
|
| 538 |
+
npy_bool PyArray_CheckStrides (int, int, npy_intp, npy_intp, npy_intp *, npy_intp *)
|
| 539 |
+
dtype PyArray_DescrNewByteorder (dtype, char)
|
| 540 |
+
object PyArray_IterAllButAxis (object, int *)
|
| 541 |
+
#object PyArray_CheckFromAny (object, dtype, int, int, int, object)
|
| 542 |
+
#object PyArray_FromArray (ndarray, dtype, int)
|
| 543 |
+
object PyArray_FromInterface (object)
|
| 544 |
+
object PyArray_FromStructInterface (object)
|
| 545 |
+
#object PyArray_FromArrayAttr (object, dtype, object)
|
| 546 |
+
#NPY_SCALARKIND PyArray_ScalarKind (int, ndarray*)
|
| 547 |
+
int PyArray_CanCoerceScalar (int, int, NPY_SCALARKIND)
|
| 548 |
+
npy_bool PyArray_CanCastScalar (type, type)
|
| 549 |
+
int PyArray_RemoveSmallest (broadcast) except -1
|
| 550 |
+
int PyArray_ElementStrides (object)
|
| 551 |
+
void PyArray_Item_INCREF (char *, dtype) except *
|
| 552 |
+
void PyArray_Item_XDECREF (char *, dtype) except *
|
| 553 |
+
object PyArray_Transpose (ndarray, PyArray_Dims *)
|
| 554 |
+
object PyArray_TakeFrom (ndarray, object, int, ndarray, NPY_CLIPMODE)
|
| 555 |
+
object PyArray_PutTo (ndarray, object, object, NPY_CLIPMODE)
|
| 556 |
+
object PyArray_PutMask (ndarray, object, object)
|
| 557 |
+
object PyArray_Repeat (ndarray, object, int)
|
| 558 |
+
object PyArray_Choose (ndarray, object, ndarray, NPY_CLIPMODE)
|
| 559 |
+
int PyArray_Sort (ndarray, int, NPY_SORTKIND) except -1
|
| 560 |
+
object PyArray_ArgSort (ndarray, int, NPY_SORTKIND)
|
| 561 |
+
object PyArray_SearchSorted (ndarray, object, NPY_SEARCHSIDE, PyObject *)
|
| 562 |
+
object PyArray_ArgMax (ndarray, int, ndarray)
|
| 563 |
+
object PyArray_ArgMin (ndarray, int, ndarray)
|
| 564 |
+
object PyArray_Reshape (ndarray, object)
|
| 565 |
+
object PyArray_Newshape (ndarray, PyArray_Dims *, NPY_ORDER)
|
| 566 |
+
object PyArray_Squeeze (ndarray)
|
| 567 |
+
#object PyArray_View (ndarray, dtype, type)
|
| 568 |
+
object PyArray_SwapAxes (ndarray, int, int)
|
| 569 |
+
object PyArray_Max (ndarray, int, ndarray)
|
| 570 |
+
object PyArray_Min (ndarray, int, ndarray)
|
| 571 |
+
object PyArray_Ptp (ndarray, int, ndarray)
|
| 572 |
+
object PyArray_Mean (ndarray, int, int, ndarray)
|
| 573 |
+
object PyArray_Trace (ndarray, int, int, int, int, ndarray)
|
| 574 |
+
object PyArray_Diagonal (ndarray, int, int, int)
|
| 575 |
+
object PyArray_Clip (ndarray, object, object, ndarray)
|
| 576 |
+
object PyArray_Conjugate (ndarray, ndarray)
|
| 577 |
+
object PyArray_Nonzero (ndarray)
|
| 578 |
+
object PyArray_Std (ndarray, int, int, ndarray, int)
|
| 579 |
+
object PyArray_Sum (ndarray, int, int, ndarray)
|
| 580 |
+
object PyArray_CumSum (ndarray, int, int, ndarray)
|
| 581 |
+
object PyArray_Prod (ndarray, int, int, ndarray)
|
| 582 |
+
object PyArray_CumProd (ndarray, int, int, ndarray)
|
| 583 |
+
object PyArray_All (ndarray, int, ndarray)
|
| 584 |
+
object PyArray_Any (ndarray, int, ndarray)
|
| 585 |
+
object PyArray_Compress (ndarray, object, int, ndarray)
|
| 586 |
+
object PyArray_Flatten (ndarray, NPY_ORDER)
|
| 587 |
+
object PyArray_Ravel (ndarray, NPY_ORDER)
|
| 588 |
+
npy_intp PyArray_MultiplyList (npy_intp *, int)
|
| 589 |
+
int PyArray_MultiplyIntList (int *, int)
|
| 590 |
+
void * PyArray_GetPtr (ndarray, npy_intp*)
|
| 591 |
+
int PyArray_CompareLists (npy_intp *, npy_intp *, int)
|
| 592 |
+
#int PyArray_AsCArray (object*, void *, npy_intp *, int, dtype)
|
| 593 |
+
int PyArray_Free (object, void *)
|
| 594 |
+
#int PyArray_Converter (object, object*)
|
| 595 |
+
int PyArray_IntpFromSequence (object, npy_intp *, int) except -1
|
| 596 |
+
object PyArray_Concatenate (object, int)
|
| 597 |
+
object PyArray_InnerProduct (object, object)
|
| 598 |
+
object PyArray_MatrixProduct (object, object)
|
| 599 |
+
object PyArray_Correlate (object, object, int)
|
| 600 |
+
#int PyArray_DescrConverter (object, dtype*) except 0
|
| 601 |
+
#int PyArray_DescrConverter2 (object, dtype*) except 0
|
| 602 |
+
int PyArray_IntpConverter (object, PyArray_Dims *) except 0
|
| 603 |
+
#int PyArray_BufferConverter (object, chunk) except 0
|
| 604 |
+
int PyArray_AxisConverter (object, int *) except 0
|
| 605 |
+
int PyArray_BoolConverter (object, npy_bool *) except 0
|
| 606 |
+
int PyArray_ByteorderConverter (object, char *) except 0
|
| 607 |
+
int PyArray_OrderConverter (object, NPY_ORDER *) except 0
|
| 608 |
+
unsigned char PyArray_EquivTypes (dtype, dtype) # clears errors
|
| 609 |
+
#object PyArray_Zeros (int, npy_intp *, dtype, int)
|
| 610 |
+
#object PyArray_Empty (int, npy_intp *, dtype, int)
|
| 611 |
+
object PyArray_Where (object, object, object)
|
| 612 |
+
object PyArray_Arange (double, double, double, int)
|
| 613 |
+
#object PyArray_ArangeObj (object, object, object, dtype)
|
| 614 |
+
int PyArray_SortkindConverter (object, NPY_SORTKIND *) except 0
|
| 615 |
+
object PyArray_LexSort (object, int)
|
| 616 |
+
object PyArray_Round (ndarray, int, ndarray)
|
| 617 |
+
unsigned char PyArray_EquivTypenums (int, int)
|
| 618 |
+
int PyArray_RegisterDataType (dtype) except -1
|
| 619 |
+
int PyArray_RegisterCastFunc (dtype, int, PyArray_VectorUnaryFunc *) except -1
|
| 620 |
+
int PyArray_RegisterCanCast (dtype, int, NPY_SCALARKIND) except -1
|
| 621 |
+
#void PyArray_InitArrFuncs (PyArray_ArrFuncs *)
|
| 622 |
+
object PyArray_IntTupleFromIntp (int, npy_intp *)
|
| 623 |
+
int PyArray_ClipmodeConverter (object, NPY_CLIPMODE *) except 0
|
| 624 |
+
#int PyArray_OutputConverter (object, ndarray*) except 0
|
| 625 |
+
object PyArray_BroadcastToShape (object, npy_intp *, int)
|
| 626 |
+
#int PyArray_DescrAlignConverter (object, dtype*) except 0
|
| 627 |
+
#int PyArray_DescrAlignConverter2 (object, dtype*) except 0
|
| 628 |
+
int PyArray_SearchsideConverter (object, void *) except 0
|
| 629 |
+
object PyArray_CheckAxis (ndarray, int *, int)
|
| 630 |
+
npy_intp PyArray_OverflowMultiplyList (npy_intp *, int)
|
| 631 |
+
int PyArray_SetBaseObject(ndarray, base) except -1 # NOTE: steals a reference to base! Use "set_array_base()" instead.
|
| 632 |
+
|
| 633 |
+
# The memory handler functions require the NumPy 1.22 API
|
| 634 |
+
# and may require defining NPY_TARGET_VERSION
|
| 635 |
+
ctypedef struct PyDataMemAllocator:
|
| 636 |
+
void *ctx
|
| 637 |
+
void* (*malloc) (void *ctx, size_t size)
|
| 638 |
+
void* (*calloc) (void *ctx, size_t nelem, size_t elsize)
|
| 639 |
+
void* (*realloc) (void *ctx, void *ptr, size_t new_size)
|
| 640 |
+
void (*free) (void *ctx, void *ptr, size_t size)
|
| 641 |
+
|
| 642 |
+
ctypedef struct PyDataMem_Handler:
|
| 643 |
+
char* name
|
| 644 |
+
npy_uint8 version
|
| 645 |
+
PyDataMemAllocator allocator
|
| 646 |
+
|
| 647 |
+
object PyDataMem_SetHandler(object handler)
|
| 648 |
+
object PyDataMem_GetHandler()
|
| 649 |
+
|
| 650 |
+
# additional datetime related functions are defined below
|
| 651 |
+
|
| 652 |
+
|
| 653 |
+
# Typedefs that matches the runtime dtype objects in
|
| 654 |
+
# the numpy module.
|
| 655 |
+
|
| 656 |
+
# The ones that are commented out needs an IFDEF function
|
| 657 |
+
# in Cython to enable them only on the right systems.
|
| 658 |
+
|
| 659 |
+
ctypedef npy_int8 int8_t
|
| 660 |
+
ctypedef npy_int16 int16_t
|
| 661 |
+
ctypedef npy_int32 int32_t
|
| 662 |
+
ctypedef npy_int64 int64_t
|
| 663 |
+
|
| 664 |
+
ctypedef npy_uint8 uint8_t
|
| 665 |
+
ctypedef npy_uint16 uint16_t
|
| 666 |
+
ctypedef npy_uint32 uint32_t
|
| 667 |
+
ctypedef npy_uint64 uint64_t
|
| 668 |
+
|
| 669 |
+
ctypedef npy_float32 float32_t
|
| 670 |
+
ctypedef npy_float64 float64_t
|
| 671 |
+
#ctypedef npy_float80 float80_t
|
| 672 |
+
#ctypedef npy_float128 float128_t
|
| 673 |
+
|
| 674 |
+
ctypedef float complex complex64_t
|
| 675 |
+
ctypedef double complex complex128_t
|
| 676 |
+
|
| 677 |
+
ctypedef npy_longlong longlong_t
|
| 678 |
+
ctypedef npy_ulonglong ulonglong_t
|
| 679 |
+
|
| 680 |
+
ctypedef npy_intp intp_t
|
| 681 |
+
ctypedef npy_uintp uintp_t
|
| 682 |
+
|
| 683 |
+
ctypedef npy_double float_t
|
| 684 |
+
ctypedef npy_double double_t
|
| 685 |
+
ctypedef npy_longdouble longdouble_t
|
| 686 |
+
|
| 687 |
+
ctypedef float complex cfloat_t
|
| 688 |
+
ctypedef double complex cdouble_t
|
| 689 |
+
ctypedef double complex complex_t
|
| 690 |
+
ctypedef long double complex clongdouble_t
|
| 691 |
+
|
| 692 |
+
cdef inline object PyArray_MultiIterNew1(a):
|
| 693 |
+
return PyArray_MultiIterNew(1, <void*>a)
|
| 694 |
+
|
| 695 |
+
cdef inline object PyArray_MultiIterNew2(a, b):
|
| 696 |
+
return PyArray_MultiIterNew(2, <void*>a, <void*>b)
|
| 697 |
+
|
| 698 |
+
cdef inline object PyArray_MultiIterNew3(a, b, c):
|
| 699 |
+
return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
|
| 700 |
+
|
| 701 |
+
cdef inline object PyArray_MultiIterNew4(a, b, c, d):
|
| 702 |
+
return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
|
| 703 |
+
|
| 704 |
+
cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
|
| 705 |
+
return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
|
| 706 |
+
|
| 707 |
+
cdef inline tuple PyDataType_SHAPE(dtype d):
|
| 708 |
+
if PyDataType_HASSUBARRAY(d):
|
| 709 |
+
return <tuple>d.subarray.shape
|
| 710 |
+
else:
|
| 711 |
+
return ()
|
| 712 |
+
|
| 713 |
+
|
| 714 |
+
cdef extern from "numpy/ndarrayobject.h":
|
| 715 |
+
PyTypeObject PyTimedeltaArrType_Type
|
| 716 |
+
PyTypeObject PyDatetimeArrType_Type
|
| 717 |
+
ctypedef int64_t npy_timedelta
|
| 718 |
+
ctypedef int64_t npy_datetime
|
| 719 |
+
|
| 720 |
+
cdef extern from "numpy/ndarraytypes.h":
|
| 721 |
+
ctypedef struct PyArray_DatetimeMetaData:
|
| 722 |
+
NPY_DATETIMEUNIT base
|
| 723 |
+
int64_t num
|
| 724 |
+
|
| 725 |
+
ctypedef struct npy_datetimestruct:
|
| 726 |
+
int64_t year
|
| 727 |
+
int32_t month, day, hour, min, sec, us, ps, as
|
| 728 |
+
|
| 729 |
+
# Iterator API added in v1.6
|
| 730 |
+
#
|
| 731 |
+
# These don't match the definition in the C API because Cython can't wrap
|
| 732 |
+
# function pointers that return functions.
|
| 733 |
+
# https://github.com/cython/cython/issues/6720
|
| 734 |
+
ctypedef int (*NpyIter_IterNextFunc "NpyIter_IterNextFunc *")(NpyIter* it) noexcept nogil
|
| 735 |
+
ctypedef void (*NpyIter_GetMultiIndexFunc "NpyIter_GetMultiIndexFunc *")(NpyIter* it, npy_intp* outcoords) noexcept nogil
|
| 736 |
+
|
| 737 |
+
cdef extern from "numpy/arrayscalars.h":
|
| 738 |
+
|
| 739 |
+
# abstract types
|
| 740 |
+
ctypedef class numpy.generic [object PyObject]:
|
| 741 |
+
pass
|
| 742 |
+
ctypedef class numpy.number [object PyObject]:
|
| 743 |
+
pass
|
| 744 |
+
ctypedef class numpy.integer [object PyObject]:
|
| 745 |
+
pass
|
| 746 |
+
ctypedef class numpy.signedinteger [object PyObject]:
|
| 747 |
+
pass
|
| 748 |
+
ctypedef class numpy.unsignedinteger [object PyObject]:
|
| 749 |
+
pass
|
| 750 |
+
ctypedef class numpy.inexact [object PyObject]:
|
| 751 |
+
pass
|
| 752 |
+
ctypedef class numpy.floating [object PyObject]:
|
| 753 |
+
pass
|
| 754 |
+
ctypedef class numpy.complexfloating [object PyObject]:
|
| 755 |
+
pass
|
| 756 |
+
ctypedef class numpy.flexible [object PyObject]:
|
| 757 |
+
pass
|
| 758 |
+
ctypedef class numpy.character [object PyObject]:
|
| 759 |
+
pass
|
| 760 |
+
|
| 761 |
+
ctypedef struct PyDatetimeScalarObject:
|
| 762 |
+
# PyObject_HEAD
|
| 763 |
+
npy_datetime obval
|
| 764 |
+
PyArray_DatetimeMetaData obmeta
|
| 765 |
+
|
| 766 |
+
ctypedef struct PyTimedeltaScalarObject:
|
| 767 |
+
# PyObject_HEAD
|
| 768 |
+
npy_timedelta obval
|
| 769 |
+
PyArray_DatetimeMetaData obmeta
|
| 770 |
+
|
| 771 |
+
ctypedef enum NPY_DATETIMEUNIT:
|
| 772 |
+
NPY_FR_Y
|
| 773 |
+
NPY_FR_M
|
| 774 |
+
NPY_FR_W
|
| 775 |
+
NPY_FR_D
|
| 776 |
+
NPY_FR_B
|
| 777 |
+
NPY_FR_h
|
| 778 |
+
NPY_FR_m
|
| 779 |
+
NPY_FR_s
|
| 780 |
+
NPY_FR_ms
|
| 781 |
+
NPY_FR_us
|
| 782 |
+
NPY_FR_ns
|
| 783 |
+
NPY_FR_ps
|
| 784 |
+
NPY_FR_fs
|
| 785 |
+
NPY_FR_as
|
| 786 |
+
NPY_FR_GENERIC
|
| 787 |
+
|
| 788 |
+
|
| 789 |
+
cdef extern from "numpy/arrayobject.h":
|
| 790 |
+
# These are part of the C-API defined in `__multiarray_api.h`
|
| 791 |
+
|
| 792 |
+
# NumPy internal definitions in datetime_strings.c:
|
| 793 |
+
int get_datetime_iso_8601_strlen "NpyDatetime_GetDatetimeISO8601StrLen" (
|
| 794 |
+
int local, NPY_DATETIMEUNIT base)
|
| 795 |
+
int make_iso_8601_datetime "NpyDatetime_MakeISO8601Datetime" (
|
| 796 |
+
npy_datetimestruct *dts, char *outstr, npy_intp outlen,
|
| 797 |
+
int local, int utc, NPY_DATETIMEUNIT base, int tzoffset,
|
| 798 |
+
NPY_CASTING casting) except -1
|
| 799 |
+
|
| 800 |
+
# NumPy internal definition in datetime.c:
|
| 801 |
+
# May return 1 to indicate that object does not appear to be a datetime
|
| 802 |
+
# (returns 0 on success).
|
| 803 |
+
int convert_pydatetime_to_datetimestruct "NpyDatetime_ConvertPyDateTimeToDatetimeStruct" (
|
| 804 |
+
PyObject *obj, npy_datetimestruct *out,
|
| 805 |
+
NPY_DATETIMEUNIT *out_bestunit, int apply_tzinfo) except -1
|
| 806 |
+
int convert_datetime64_to_datetimestruct "NpyDatetime_ConvertDatetime64ToDatetimeStruct" (
|
| 807 |
+
PyArray_DatetimeMetaData *meta, npy_datetime dt,
|
| 808 |
+
npy_datetimestruct *out) except -1
|
| 809 |
+
int convert_datetimestruct_to_datetime64 "NpyDatetime_ConvertDatetimeStructToDatetime64"(
|
| 810 |
+
PyArray_DatetimeMetaData *meta, const npy_datetimestruct *dts,
|
| 811 |
+
npy_datetime *out) except -1
|
| 812 |
+
|
| 813 |
+
|
| 814 |
+
#
|
| 815 |
+
# ufunc API
|
| 816 |
+
#
|
| 817 |
+
|
| 818 |
+
cdef extern from "numpy/ufuncobject.h":
|
| 819 |
+
|
| 820 |
+
ctypedef void (*PyUFuncGenericFunction) (char **, npy_intp *, npy_intp *, void *)
|
| 821 |
+
|
| 822 |
+
ctypedef class numpy.ufunc [object PyUFuncObject, check_size ignore]:
|
| 823 |
+
cdef:
|
| 824 |
+
int nin, nout, nargs
|
| 825 |
+
int identity
|
| 826 |
+
PyUFuncGenericFunction *functions
|
| 827 |
+
void **data
|
| 828 |
+
int ntypes
|
| 829 |
+
int check_return
|
| 830 |
+
char *name
|
| 831 |
+
char *types
|
| 832 |
+
char *doc
|
| 833 |
+
void *ptr
|
| 834 |
+
PyObject *obj
|
| 835 |
+
PyObject *userloops
|
| 836 |
+
|
| 837 |
+
cdef enum:
|
| 838 |
+
PyUFunc_Zero
|
| 839 |
+
PyUFunc_One
|
| 840 |
+
PyUFunc_None
|
| 841 |
+
# deprecated
|
| 842 |
+
UFUNC_FPE_DIVIDEBYZERO
|
| 843 |
+
UFUNC_FPE_OVERFLOW
|
| 844 |
+
UFUNC_FPE_UNDERFLOW
|
| 845 |
+
UFUNC_FPE_INVALID
|
| 846 |
+
# use these instead
|
| 847 |
+
NPY_FPE_DIVIDEBYZERO
|
| 848 |
+
NPY_FPE_OVERFLOW
|
| 849 |
+
NPY_FPE_UNDERFLOW
|
| 850 |
+
NPY_FPE_INVALID
|
| 851 |
+
|
| 852 |
+
object PyUFunc_FromFuncAndData(PyUFuncGenericFunction *,
|
| 853 |
+
void **, char *, int, int, int, int, char *, char *, int)
|
| 854 |
+
int PyUFunc_RegisterLoopForType(ufunc, int,
|
| 855 |
+
PyUFuncGenericFunction, int *, void *) except -1
|
| 856 |
+
void PyUFunc_f_f_As_d_d \
|
| 857 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 858 |
+
void PyUFunc_d_d \
|
| 859 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 860 |
+
void PyUFunc_f_f \
|
| 861 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 862 |
+
void PyUFunc_g_g \
|
| 863 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 864 |
+
void PyUFunc_F_F_As_D_D \
|
| 865 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 866 |
+
void PyUFunc_F_F \
|
| 867 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 868 |
+
void PyUFunc_D_D \
|
| 869 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 870 |
+
void PyUFunc_G_G \
|
| 871 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 872 |
+
void PyUFunc_O_O \
|
| 873 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 874 |
+
void PyUFunc_ff_f_As_dd_d \
|
| 875 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 876 |
+
void PyUFunc_ff_f \
|
| 877 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 878 |
+
void PyUFunc_dd_d \
|
| 879 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 880 |
+
void PyUFunc_gg_g \
|
| 881 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 882 |
+
void PyUFunc_FF_F_As_DD_D \
|
| 883 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 884 |
+
void PyUFunc_DD_D \
|
| 885 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 886 |
+
void PyUFunc_FF_F \
|
| 887 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 888 |
+
void PyUFunc_GG_G \
|
| 889 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 890 |
+
void PyUFunc_OO_O \
|
| 891 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 892 |
+
void PyUFunc_O_O_method \
|
| 893 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 894 |
+
void PyUFunc_OO_O_method \
|
| 895 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 896 |
+
void PyUFunc_On_Om \
|
| 897 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 898 |
+
void PyUFunc_clearfperr()
|
| 899 |
+
int PyUFunc_getfperr()
|
| 900 |
+
int PyUFunc_ReplaceLoopBySignature \
|
| 901 |
+
(ufunc, PyUFuncGenericFunction, int *, PyUFuncGenericFunction *)
|
| 902 |
+
object PyUFunc_FromFuncAndDataAndSignature \
|
| 903 |
+
(PyUFuncGenericFunction *, void **, char *, int, int, int,
|
| 904 |
+
int, char *, char *, int, char *)
|
| 905 |
+
|
| 906 |
+
int _import_umath() except -1
|
| 907 |
+
|
| 908 |
+
cdef inline void set_array_base(ndarray arr, object base):
|
| 909 |
+
Py_INCREF(base) # important to do this before stealing the reference below!
|
| 910 |
+
PyArray_SetBaseObject(arr, base)
|
| 911 |
+
|
| 912 |
+
cdef inline object get_array_base(ndarray arr):
|
| 913 |
+
base = PyArray_BASE(arr)
|
| 914 |
+
if base is NULL:
|
| 915 |
+
return None
|
| 916 |
+
return <object>base
|
| 917 |
+
|
| 918 |
+
# Versions of the import_* functions which are more suitable for
|
| 919 |
+
# Cython code.
|
| 920 |
+
cdef inline int import_array() except -1:
|
| 921 |
+
try:
|
| 922 |
+
__pyx_import_array()
|
| 923 |
+
except Exception:
|
| 924 |
+
raise ImportError("numpy._core.multiarray failed to import")
|
| 925 |
+
|
| 926 |
+
cdef inline int import_umath() except -1:
|
| 927 |
+
try:
|
| 928 |
+
_import_umath()
|
| 929 |
+
except Exception:
|
| 930 |
+
raise ImportError("numpy._core.umath failed to import")
|
| 931 |
+
|
| 932 |
+
cdef inline int import_ufunc() except -1:
|
| 933 |
+
try:
|
| 934 |
+
_import_umath()
|
| 935 |
+
except Exception:
|
| 936 |
+
raise ImportError("numpy._core.umath failed to import")
|
| 937 |
+
|
| 938 |
+
|
| 939 |
+
cdef inline bint is_timedelta64_object(object obj):
|
| 940 |
+
"""
|
| 941 |
+
Cython equivalent of `isinstance(obj, np.timedelta64)`
|
| 942 |
+
|
| 943 |
+
Parameters
|
| 944 |
+
----------
|
| 945 |
+
obj : object
|
| 946 |
+
|
| 947 |
+
Returns
|
| 948 |
+
-------
|
| 949 |
+
bool
|
| 950 |
+
"""
|
| 951 |
+
return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)
|
| 952 |
+
|
| 953 |
+
|
| 954 |
+
cdef inline bint is_datetime64_object(object obj):
|
| 955 |
+
"""
|
| 956 |
+
Cython equivalent of `isinstance(obj, np.datetime64)`
|
| 957 |
+
|
| 958 |
+
Parameters
|
| 959 |
+
----------
|
| 960 |
+
obj : object
|
| 961 |
+
|
| 962 |
+
Returns
|
| 963 |
+
-------
|
| 964 |
+
bool
|
| 965 |
+
"""
|
| 966 |
+
return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)
|
| 967 |
+
|
| 968 |
+
|
| 969 |
+
cdef inline npy_datetime get_datetime64_value(object obj) nogil:
|
| 970 |
+
"""
|
| 971 |
+
returns the int64 value underlying scalar numpy datetime64 object
|
| 972 |
+
|
| 973 |
+
Note that to interpret this as a datetime, the corresponding unit is
|
| 974 |
+
also needed. That can be found using `get_datetime64_unit`.
|
| 975 |
+
"""
|
| 976 |
+
return (<PyDatetimeScalarObject*>obj).obval
|
| 977 |
+
|
| 978 |
+
|
| 979 |
+
cdef inline npy_timedelta get_timedelta64_value(object obj) nogil:
|
| 980 |
+
"""
|
| 981 |
+
returns the int64 value underlying scalar numpy timedelta64 object
|
| 982 |
+
"""
|
| 983 |
+
return (<PyTimedeltaScalarObject*>obj).obval
|
| 984 |
+
|
| 985 |
+
|
| 986 |
+
cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:
|
| 987 |
+
"""
|
| 988 |
+
returns the unit part of the dtype for a numpy datetime64 object.
|
| 989 |
+
"""
|
| 990 |
+
return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base
|
| 991 |
+
|
| 992 |
+
|
| 993 |
+
cdef extern from "numpy/arrayobject.h":
|
| 994 |
+
|
| 995 |
+
ctypedef struct NpyIter:
|
| 996 |
+
pass
|
| 997 |
+
|
| 998 |
+
cdef enum:
|
| 999 |
+
NPY_FAIL
|
| 1000 |
+
NPY_SUCCEED
|
| 1001 |
+
|
| 1002 |
+
cdef enum:
|
| 1003 |
+
# Track an index representing C order
|
| 1004 |
+
NPY_ITER_C_INDEX
|
| 1005 |
+
# Track an index representing Fortran order
|
| 1006 |
+
NPY_ITER_F_INDEX
|
| 1007 |
+
# Track a multi-index
|
| 1008 |
+
NPY_ITER_MULTI_INDEX
|
| 1009 |
+
# User code external to the iterator does the 1-dimensional innermost loop
|
| 1010 |
+
NPY_ITER_EXTERNAL_LOOP
|
| 1011 |
+
# Convert all the operands to a common data type
|
| 1012 |
+
NPY_ITER_COMMON_DTYPE
|
| 1013 |
+
# Operands may hold references, requiring API access during iteration
|
| 1014 |
+
NPY_ITER_REFS_OK
|
| 1015 |
+
# Zero-sized operands should be permitted, iteration checks IterSize for 0
|
| 1016 |
+
NPY_ITER_ZEROSIZE_OK
|
| 1017 |
+
# Permits reductions (size-0 stride with dimension size > 1)
|
| 1018 |
+
NPY_ITER_REDUCE_OK
|
| 1019 |
+
# Enables sub-range iteration
|
| 1020 |
+
NPY_ITER_RANGED
|
| 1021 |
+
# Enables buffering
|
| 1022 |
+
NPY_ITER_BUFFERED
|
| 1023 |
+
# When buffering is enabled, grows the inner loop if possible
|
| 1024 |
+
NPY_ITER_GROWINNER
|
| 1025 |
+
# Delay allocation of buffers until first Reset* call
|
| 1026 |
+
NPY_ITER_DELAY_BUFALLOC
|
| 1027 |
+
# When NPY_KEEPORDER is specified, disable reversing negative-stride axes
|
| 1028 |
+
NPY_ITER_DONT_NEGATE_STRIDES
|
| 1029 |
+
NPY_ITER_COPY_IF_OVERLAP
|
| 1030 |
+
# The operand will be read from and written to
|
| 1031 |
+
NPY_ITER_READWRITE
|
| 1032 |
+
# The operand will only be read from
|
| 1033 |
+
NPY_ITER_READONLY
|
| 1034 |
+
# The operand will only be written to
|
| 1035 |
+
NPY_ITER_WRITEONLY
|
| 1036 |
+
# The operand's data must be in native byte order
|
| 1037 |
+
NPY_ITER_NBO
|
| 1038 |
+
# The operand's data must be aligned
|
| 1039 |
+
NPY_ITER_ALIGNED
|
| 1040 |
+
# The operand's data must be contiguous (within the inner loop)
|
| 1041 |
+
NPY_ITER_CONTIG
|
| 1042 |
+
# The operand may be copied to satisfy requirements
|
| 1043 |
+
NPY_ITER_COPY
|
| 1044 |
+
# The operand may be copied with WRITEBACKIFCOPY to satisfy requirements
|
| 1045 |
+
NPY_ITER_UPDATEIFCOPY
|
| 1046 |
+
# Allocate the operand if it is NULL
|
| 1047 |
+
NPY_ITER_ALLOCATE
|
| 1048 |
+
# If an operand is allocated, don't use any subtype
|
| 1049 |
+
NPY_ITER_NO_SUBTYPE
|
| 1050 |
+
# This is a virtual array slot, operand is NULL but temporary data is there
|
| 1051 |
+
NPY_ITER_VIRTUAL
|
| 1052 |
+
# Require that the dimension match the iterator dimensions exactly
|
| 1053 |
+
NPY_ITER_NO_BROADCAST
|
| 1054 |
+
# A mask is being used on this array, affects buffer -> array copy
|
| 1055 |
+
NPY_ITER_WRITEMASKED
|
| 1056 |
+
# This array is the mask for all WRITEMASKED operands
|
| 1057 |
+
NPY_ITER_ARRAYMASK
|
| 1058 |
+
# Assume iterator order data access for COPY_IF_OVERLAP
|
| 1059 |
+
NPY_ITER_OVERLAP_ASSUME_ELEMENTWISE
|
| 1060 |
+
|
| 1061 |
+
# construction and destruction functions
|
| 1062 |
+
NpyIter* NpyIter_New(ndarray arr, npy_uint32 flags, NPY_ORDER order,
|
| 1063 |
+
NPY_CASTING casting, dtype datatype) except NULL
|
| 1064 |
+
NpyIter* NpyIter_MultiNew(npy_intp nop, PyArrayObject** op, npy_uint32 flags,
|
| 1065 |
+
NPY_ORDER order, NPY_CASTING casting, npy_uint32*
|
| 1066 |
+
op_flags, PyArray_Descr** op_dtypes) except NULL
|
| 1067 |
+
NpyIter* NpyIter_AdvancedNew(npy_intp nop, PyArrayObject** op,
|
| 1068 |
+
npy_uint32 flags, NPY_ORDER order,
|
| 1069 |
+
NPY_CASTING casting, npy_uint32* op_flags,
|
| 1070 |
+
PyArray_Descr** op_dtypes, int oa_ndim,
|
| 1071 |
+
int** op_axes, const npy_intp* itershape,
|
| 1072 |
+
npy_intp buffersize) except NULL
|
| 1073 |
+
NpyIter* NpyIter_Copy(NpyIter* it) except NULL
|
| 1074 |
+
int NpyIter_RemoveAxis(NpyIter* it, int axis) except NPY_FAIL
|
| 1075 |
+
int NpyIter_RemoveMultiIndex(NpyIter* it) except NPY_FAIL
|
| 1076 |
+
int NpyIter_EnableExternalLoop(NpyIter* it) except NPY_FAIL
|
| 1077 |
+
int NpyIter_Deallocate(NpyIter* it) except NPY_FAIL
|
| 1078 |
+
int NpyIter_Reset(NpyIter* it, char** errmsg) except NPY_FAIL
|
| 1079 |
+
int NpyIter_ResetToIterIndexRange(NpyIter* it, npy_intp istart,
|
| 1080 |
+
npy_intp iend, char** errmsg) except NPY_FAIL
|
| 1081 |
+
int NpyIter_ResetBasePointers(NpyIter* it, char** baseptrs, char** errmsg) except NPY_FAIL
|
| 1082 |
+
int NpyIter_GotoMultiIndex(NpyIter* it, const npy_intp* multi_index) except NPY_FAIL
|
| 1083 |
+
int NpyIter_GotoIndex(NpyIter* it, npy_intp index) except NPY_FAIL
|
| 1084 |
+
npy_intp NpyIter_GetIterSize(NpyIter* it) nogil
|
| 1085 |
+
npy_intp NpyIter_GetIterIndex(NpyIter* it) nogil
|
| 1086 |
+
void NpyIter_GetIterIndexRange(NpyIter* it, npy_intp* istart,
|
| 1087 |
+
npy_intp* iend) nogil
|
| 1088 |
+
int NpyIter_GotoIterIndex(NpyIter* it, npy_intp iterindex) except NPY_FAIL
|
| 1089 |
+
npy_bool NpyIter_HasDelayedBufAlloc(NpyIter* it) nogil
|
| 1090 |
+
npy_bool NpyIter_HasExternalLoop(NpyIter* it) nogil
|
| 1091 |
+
npy_bool NpyIter_HasMultiIndex(NpyIter* it) nogil
|
| 1092 |
+
npy_bool NpyIter_HasIndex(NpyIter* it) nogil
|
| 1093 |
+
npy_bool NpyIter_RequiresBuffering(NpyIter* it) nogil
|
| 1094 |
+
npy_bool NpyIter_IsBuffered(NpyIter* it) nogil
|
| 1095 |
+
npy_bool NpyIter_IsGrowInner(NpyIter* it) nogil
|
| 1096 |
+
npy_intp NpyIter_GetBufferSize(NpyIter* it) nogil
|
| 1097 |
+
int NpyIter_GetNDim(NpyIter* it) nogil
|
| 1098 |
+
int NpyIter_GetNOp(NpyIter* it) nogil
|
| 1099 |
+
npy_intp* NpyIter_GetAxisStrideArray(NpyIter* it, int axis) except NULL
|
| 1100 |
+
int NpyIter_GetShape(NpyIter* it, npy_intp* outshape) nogil
|
| 1101 |
+
PyArray_Descr** NpyIter_GetDescrArray(NpyIter* it)
|
| 1102 |
+
PyArrayObject** NpyIter_GetOperandArray(NpyIter* it)
|
| 1103 |
+
ndarray NpyIter_GetIterView(NpyIter* it, npy_intp i)
|
| 1104 |
+
void NpyIter_GetReadFlags(NpyIter* it, char* outreadflags)
|
| 1105 |
+
void NpyIter_GetWriteFlags(NpyIter* it, char* outwriteflags)
|
| 1106 |
+
int NpyIter_CreateCompatibleStrides(NpyIter* it, npy_intp itemsize,
|
| 1107 |
+
npy_intp* outstrides) except NPY_FAIL
|
| 1108 |
+
npy_bool NpyIter_IsFirstVisit(NpyIter* it, int iop) nogil
|
| 1109 |
+
# functions for iterating an NpyIter object
|
| 1110 |
+
#
|
| 1111 |
+
# These don't match the definition in the C API because Cython can't wrap
|
| 1112 |
+
# function pointers that return functions.
|
| 1113 |
+
NpyIter_IterNextFunc* NpyIter_GetIterNext(NpyIter* it, char** errmsg) except NULL
|
| 1114 |
+
NpyIter_GetMultiIndexFunc* NpyIter_GetGetMultiIndex(NpyIter* it,
|
| 1115 |
+
char** errmsg) except NULL
|
| 1116 |
+
char** NpyIter_GetDataPtrArray(NpyIter* it) nogil
|
| 1117 |
+
char** NpyIter_GetInitialDataPtrArray(NpyIter* it) nogil
|
| 1118 |
+
npy_intp* NpyIter_GetIndexPtr(NpyIter* it)
|
| 1119 |
+
npy_intp* NpyIter_GetInnerStrideArray(NpyIter* it) nogil
|
| 1120 |
+
npy_intp* NpyIter_GetInnerLoopSizePtr(NpyIter* it) nogil
|
| 1121 |
+
void NpyIter_GetInnerFixedStrideArray(NpyIter* it, npy_intp* outstrides) nogil
|
| 1122 |
+
npy_bool NpyIter_IterationNeedsAPI(NpyIter* it) nogil
|
| 1123 |
+
void NpyIter_DebugPrint(NpyIter* it)
|
| 1124 |
+
|
| 1125 |
+
# NpyString API
|
| 1126 |
+
cdef extern from "numpy/ndarraytypes.h":
|
| 1127 |
+
ctypedef struct npy_string_allocator:
|
| 1128 |
+
pass
|
| 1129 |
+
|
| 1130 |
+
ctypedef struct npy_packed_static_string:
|
| 1131 |
+
pass
|
| 1132 |
+
|
| 1133 |
+
ctypedef struct npy_static_string:
|
| 1134 |
+
size_t size
|
| 1135 |
+
const char *buf
|
| 1136 |
+
|
| 1137 |
+
ctypedef struct PyArray_StringDTypeObject:
|
| 1138 |
+
PyArray_Descr base
|
| 1139 |
+
PyObject *na_object
|
| 1140 |
+
char coerce
|
| 1141 |
+
char has_nan_na
|
| 1142 |
+
char has_string_na
|
| 1143 |
+
char array_owned
|
| 1144 |
+
npy_static_string default_string
|
| 1145 |
+
npy_static_string na_name
|
| 1146 |
+
npy_string_allocator *allocator
|
| 1147 |
+
|
| 1148 |
+
cdef extern from "numpy/arrayobject.h":
|
| 1149 |
+
npy_string_allocator *NpyString_acquire_allocator(const PyArray_StringDTypeObject *descr)
|
| 1150 |
+
void NpyString_acquire_allocators(size_t n_descriptors, PyArray_Descr *const descrs[], npy_string_allocator *allocators[])
|
| 1151 |
+
void NpyString_release_allocator(npy_string_allocator *allocator)
|
| 1152 |
+
void NpyString_release_allocators(size_t length, npy_string_allocator *allocators[])
|
| 1153 |
+
int NpyString_load(npy_string_allocator *allocator, const npy_packed_static_string *packed_string, npy_static_string *unpacked_string)
|
| 1154 |
+
int NpyString_pack_null(npy_string_allocator *allocator, npy_packed_static_string *packed_string)
|
| 1155 |
+
int NpyString_pack(npy_string_allocator *allocator, npy_packed_static_string *packed_string, const char *buf, size_t size)
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/__init__.py
ADDED
|
@@ -0,0 +1,955 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
NumPy
|
| 3 |
+
=====
|
| 4 |
+
|
| 5 |
+
Provides
|
| 6 |
+
1. An array object of arbitrary homogeneous items
|
| 7 |
+
2. Fast mathematical operations over arrays
|
| 8 |
+
3. Linear Algebra, Fourier Transforms, Random Number Generation
|
| 9 |
+
|
| 10 |
+
How to use the documentation
|
| 11 |
+
----------------------------
|
| 12 |
+
Documentation is available in two forms: docstrings provided
|
| 13 |
+
with the code, and a loose standing reference guide, available from
|
| 14 |
+
`the NumPy homepage <https://numpy.org>`_.
|
| 15 |
+
|
| 16 |
+
We recommend exploring the docstrings using
|
| 17 |
+
`IPython <https://ipython.org>`_, an advanced Python shell with
|
| 18 |
+
TAB-completion and introspection capabilities. See below for further
|
| 19 |
+
instructions.
|
| 20 |
+
|
| 21 |
+
The docstring examples assume that `numpy` has been imported as ``np``::
|
| 22 |
+
|
| 23 |
+
>>> import numpy as np
|
| 24 |
+
|
| 25 |
+
Code snippets are indicated by three greater-than signs::
|
| 26 |
+
|
| 27 |
+
>>> x = 42
|
| 28 |
+
>>> x = x + 1
|
| 29 |
+
|
| 30 |
+
Use the built-in ``help`` function to view a function's docstring::
|
| 31 |
+
|
| 32 |
+
>>> help(np.sort)
|
| 33 |
+
... # doctest: +SKIP
|
| 34 |
+
|
| 35 |
+
For some objects, ``np.info(obj)`` may provide additional help. This is
|
| 36 |
+
particularly true if you see the line "Help on ufunc object:" at the top
|
| 37 |
+
of the help() page. Ufuncs are implemented in C, not Python, for speed.
|
| 38 |
+
The native Python help() does not know how to view their help, but our
|
| 39 |
+
np.info() function does.
|
| 40 |
+
|
| 41 |
+
Available subpackages
|
| 42 |
+
---------------------
|
| 43 |
+
lib
|
| 44 |
+
Basic functions used by several sub-packages.
|
| 45 |
+
random
|
| 46 |
+
Core Random Tools
|
| 47 |
+
linalg
|
| 48 |
+
Core Linear Algebra Tools
|
| 49 |
+
fft
|
| 50 |
+
Core FFT routines
|
| 51 |
+
polynomial
|
| 52 |
+
Polynomial tools
|
| 53 |
+
testing
|
| 54 |
+
NumPy testing tools
|
| 55 |
+
distutils
|
| 56 |
+
Enhancements to distutils with support for
|
| 57 |
+
Fortran compilers support and more (for Python <= 3.11)
|
| 58 |
+
|
| 59 |
+
Utilities
|
| 60 |
+
---------
|
| 61 |
+
test
|
| 62 |
+
Run numpy unittests
|
| 63 |
+
show_config
|
| 64 |
+
Show numpy build configuration
|
| 65 |
+
__version__
|
| 66 |
+
NumPy version string
|
| 67 |
+
|
| 68 |
+
Viewing documentation using IPython
|
| 69 |
+
-----------------------------------
|
| 70 |
+
|
| 71 |
+
Start IPython and import `numpy` usually under the alias ``np``: `import
|
| 72 |
+
numpy as np`. Then, directly past or use the ``%cpaste`` magic to paste
|
| 73 |
+
examples into the shell. To see which functions are available in `numpy`,
|
| 74 |
+
type ``np.<TAB>`` (where ``<TAB>`` refers to the TAB key), or use
|
| 75 |
+
``np.*cos*?<ENTER>`` (where ``<ENTER>`` refers to the ENTER key) to narrow
|
| 76 |
+
down the list. To view the docstring for a function, use
|
| 77 |
+
``np.cos?<ENTER>`` (to view the docstring) and ``np.cos??<ENTER>`` (to view
|
| 78 |
+
the source code).
|
| 79 |
+
|
| 80 |
+
Copies vs. in-place operation
|
| 81 |
+
-----------------------------
|
| 82 |
+
Most of the functions in `numpy` return a copy of the array argument
|
| 83 |
+
(e.g., `np.sort`). In-place versions of these functions are often
|
| 84 |
+
available as array methods, i.e. ``x = np.array([1,2,3]); x.sort()``.
|
| 85 |
+
Exceptions to this rule are documented.
|
| 86 |
+
|
| 87 |
+
"""
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
# start delvewheel patch
|
| 91 |
+
def _delvewheel_patch_1_11_2():
|
| 92 |
+
import os
|
| 93 |
+
if os.path.isdir(libs_dir := os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'numpy.libs'))):
|
| 94 |
+
os.add_dll_directory(libs_dir)
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
_delvewheel_patch_1_11_2()
|
| 98 |
+
del _delvewheel_patch_1_11_2
|
| 99 |
+
# end delvewheel patch
|
| 100 |
+
|
| 101 |
+
import os
|
| 102 |
+
import sys
|
| 103 |
+
import warnings
|
| 104 |
+
|
| 105 |
+
# If a version with git hash was stored, use that instead
|
| 106 |
+
from . import version
|
| 107 |
+
from ._expired_attrs_2_0 import __expired_attributes__
|
| 108 |
+
from ._globals import _CopyMode, _NoValue
|
| 109 |
+
from .version import __version__
|
| 110 |
+
|
| 111 |
+
# We first need to detect if we're being called as part of the numpy setup
|
| 112 |
+
# procedure itself in a reliable manner.
|
| 113 |
+
try:
|
| 114 |
+
__NUMPY_SETUP__ # noqa: B018
|
| 115 |
+
except NameError:
|
| 116 |
+
__NUMPY_SETUP__ = False
|
| 117 |
+
|
| 118 |
+
if __NUMPY_SETUP__:
|
| 119 |
+
sys.stderr.write('Running from numpy source directory.\n')
|
| 120 |
+
else:
|
| 121 |
+
# Allow distributors to run custom init code before importing numpy._core
|
| 122 |
+
from . import _distributor_init
|
| 123 |
+
|
| 124 |
+
try:
|
| 125 |
+
from numpy.__config__ import show_config
|
| 126 |
+
except ImportError as e:
|
| 127 |
+
if isinstance(e, ModuleNotFoundError) and e.name == "numpy.__config__":
|
| 128 |
+
# The __config__ module itself was not found, so add this info:
|
| 129 |
+
msg = """Error importing numpy: you should not try to import numpy from
|
| 130 |
+
its source directory; please exit the numpy source tree, and relaunch
|
| 131 |
+
your python interpreter from there."""
|
| 132 |
+
raise ImportError(msg) from e
|
| 133 |
+
raise
|
| 134 |
+
|
| 135 |
+
from . import _core
|
| 136 |
+
from ._core import (
|
| 137 |
+
False_,
|
| 138 |
+
ScalarType,
|
| 139 |
+
True_,
|
| 140 |
+
abs,
|
| 141 |
+
absolute,
|
| 142 |
+
acos,
|
| 143 |
+
acosh,
|
| 144 |
+
add,
|
| 145 |
+
all,
|
| 146 |
+
allclose,
|
| 147 |
+
amax,
|
| 148 |
+
amin,
|
| 149 |
+
any,
|
| 150 |
+
arange,
|
| 151 |
+
arccos,
|
| 152 |
+
arccosh,
|
| 153 |
+
arcsin,
|
| 154 |
+
arcsinh,
|
| 155 |
+
arctan,
|
| 156 |
+
arctan2,
|
| 157 |
+
arctanh,
|
| 158 |
+
argmax,
|
| 159 |
+
argmin,
|
| 160 |
+
argpartition,
|
| 161 |
+
argsort,
|
| 162 |
+
argwhere,
|
| 163 |
+
around,
|
| 164 |
+
array,
|
| 165 |
+
array2string,
|
| 166 |
+
array_equal,
|
| 167 |
+
array_equiv,
|
| 168 |
+
array_repr,
|
| 169 |
+
array_str,
|
| 170 |
+
asanyarray,
|
| 171 |
+
asarray,
|
| 172 |
+
ascontiguousarray,
|
| 173 |
+
asfortranarray,
|
| 174 |
+
asin,
|
| 175 |
+
asinh,
|
| 176 |
+
astype,
|
| 177 |
+
atan,
|
| 178 |
+
atan2,
|
| 179 |
+
atanh,
|
| 180 |
+
atleast_1d,
|
| 181 |
+
atleast_2d,
|
| 182 |
+
atleast_3d,
|
| 183 |
+
base_repr,
|
| 184 |
+
binary_repr,
|
| 185 |
+
bitwise_and,
|
| 186 |
+
bitwise_count,
|
| 187 |
+
bitwise_invert,
|
| 188 |
+
bitwise_left_shift,
|
| 189 |
+
bitwise_not,
|
| 190 |
+
bitwise_or,
|
| 191 |
+
bitwise_right_shift,
|
| 192 |
+
bitwise_xor,
|
| 193 |
+
block,
|
| 194 |
+
bool,
|
| 195 |
+
bool_,
|
| 196 |
+
broadcast,
|
| 197 |
+
busday_count,
|
| 198 |
+
busday_offset,
|
| 199 |
+
busdaycalendar,
|
| 200 |
+
byte,
|
| 201 |
+
bytes_,
|
| 202 |
+
can_cast,
|
| 203 |
+
cbrt,
|
| 204 |
+
cdouble,
|
| 205 |
+
ceil,
|
| 206 |
+
character,
|
| 207 |
+
choose,
|
| 208 |
+
clip,
|
| 209 |
+
clongdouble,
|
| 210 |
+
complex64,
|
| 211 |
+
complex128,
|
| 212 |
+
complexfloating,
|
| 213 |
+
compress,
|
| 214 |
+
concat,
|
| 215 |
+
concatenate,
|
| 216 |
+
conj,
|
| 217 |
+
conjugate,
|
| 218 |
+
convolve,
|
| 219 |
+
copysign,
|
| 220 |
+
copyto,
|
| 221 |
+
correlate,
|
| 222 |
+
cos,
|
| 223 |
+
cosh,
|
| 224 |
+
count_nonzero,
|
| 225 |
+
cross,
|
| 226 |
+
csingle,
|
| 227 |
+
cumprod,
|
| 228 |
+
cumsum,
|
| 229 |
+
cumulative_prod,
|
| 230 |
+
cumulative_sum,
|
| 231 |
+
datetime64,
|
| 232 |
+
datetime_as_string,
|
| 233 |
+
datetime_data,
|
| 234 |
+
deg2rad,
|
| 235 |
+
degrees,
|
| 236 |
+
diagonal,
|
| 237 |
+
divide,
|
| 238 |
+
divmod,
|
| 239 |
+
dot,
|
| 240 |
+
double,
|
| 241 |
+
dtype,
|
| 242 |
+
e,
|
| 243 |
+
einsum,
|
| 244 |
+
einsum_path,
|
| 245 |
+
empty,
|
| 246 |
+
empty_like,
|
| 247 |
+
equal,
|
| 248 |
+
errstate,
|
| 249 |
+
euler_gamma,
|
| 250 |
+
exp,
|
| 251 |
+
exp2,
|
| 252 |
+
expm1,
|
| 253 |
+
fabs,
|
| 254 |
+
finfo,
|
| 255 |
+
flatiter,
|
| 256 |
+
flatnonzero,
|
| 257 |
+
flexible,
|
| 258 |
+
float16,
|
| 259 |
+
float32,
|
| 260 |
+
float64,
|
| 261 |
+
float_power,
|
| 262 |
+
floating,
|
| 263 |
+
floor,
|
| 264 |
+
floor_divide,
|
| 265 |
+
fmax,
|
| 266 |
+
fmin,
|
| 267 |
+
fmod,
|
| 268 |
+
format_float_positional,
|
| 269 |
+
format_float_scientific,
|
| 270 |
+
frexp,
|
| 271 |
+
from_dlpack,
|
| 272 |
+
frombuffer,
|
| 273 |
+
fromfile,
|
| 274 |
+
fromfunction,
|
| 275 |
+
fromiter,
|
| 276 |
+
frompyfunc,
|
| 277 |
+
fromstring,
|
| 278 |
+
full,
|
| 279 |
+
full_like,
|
| 280 |
+
gcd,
|
| 281 |
+
generic,
|
| 282 |
+
geomspace,
|
| 283 |
+
get_printoptions,
|
| 284 |
+
getbufsize,
|
| 285 |
+
geterr,
|
| 286 |
+
geterrcall,
|
| 287 |
+
greater,
|
| 288 |
+
greater_equal,
|
| 289 |
+
half,
|
| 290 |
+
heaviside,
|
| 291 |
+
hstack,
|
| 292 |
+
hypot,
|
| 293 |
+
identity,
|
| 294 |
+
iinfo,
|
| 295 |
+
indices,
|
| 296 |
+
inexact,
|
| 297 |
+
inf,
|
| 298 |
+
inner,
|
| 299 |
+
int8,
|
| 300 |
+
int16,
|
| 301 |
+
int32,
|
| 302 |
+
int64,
|
| 303 |
+
int_,
|
| 304 |
+
intc,
|
| 305 |
+
integer,
|
| 306 |
+
intp,
|
| 307 |
+
invert,
|
| 308 |
+
is_busday,
|
| 309 |
+
isclose,
|
| 310 |
+
isdtype,
|
| 311 |
+
isfinite,
|
| 312 |
+
isfortran,
|
| 313 |
+
isinf,
|
| 314 |
+
isnan,
|
| 315 |
+
isnat,
|
| 316 |
+
isscalar,
|
| 317 |
+
issubdtype,
|
| 318 |
+
lcm,
|
| 319 |
+
ldexp,
|
| 320 |
+
left_shift,
|
| 321 |
+
less,
|
| 322 |
+
less_equal,
|
| 323 |
+
lexsort,
|
| 324 |
+
linspace,
|
| 325 |
+
little_endian,
|
| 326 |
+
log,
|
| 327 |
+
log1p,
|
| 328 |
+
log2,
|
| 329 |
+
log10,
|
| 330 |
+
logaddexp,
|
| 331 |
+
logaddexp2,
|
| 332 |
+
logical_and,
|
| 333 |
+
logical_not,
|
| 334 |
+
logical_or,
|
| 335 |
+
logical_xor,
|
| 336 |
+
logspace,
|
| 337 |
+
long,
|
| 338 |
+
longdouble,
|
| 339 |
+
longlong,
|
| 340 |
+
matmul,
|
| 341 |
+
matrix_transpose,
|
| 342 |
+
matvec,
|
| 343 |
+
max,
|
| 344 |
+
maximum,
|
| 345 |
+
may_share_memory,
|
| 346 |
+
mean,
|
| 347 |
+
memmap,
|
| 348 |
+
min,
|
| 349 |
+
min_scalar_type,
|
| 350 |
+
minimum,
|
| 351 |
+
mod,
|
| 352 |
+
modf,
|
| 353 |
+
moveaxis,
|
| 354 |
+
multiply,
|
| 355 |
+
nan,
|
| 356 |
+
ndarray,
|
| 357 |
+
ndim,
|
| 358 |
+
nditer,
|
| 359 |
+
negative,
|
| 360 |
+
nested_iters,
|
| 361 |
+
newaxis,
|
| 362 |
+
nextafter,
|
| 363 |
+
nonzero,
|
| 364 |
+
not_equal,
|
| 365 |
+
number,
|
| 366 |
+
object_,
|
| 367 |
+
ones,
|
| 368 |
+
ones_like,
|
| 369 |
+
outer,
|
| 370 |
+
partition,
|
| 371 |
+
permute_dims,
|
| 372 |
+
pi,
|
| 373 |
+
positive,
|
| 374 |
+
pow,
|
| 375 |
+
power,
|
| 376 |
+
printoptions,
|
| 377 |
+
prod,
|
| 378 |
+
promote_types,
|
| 379 |
+
ptp,
|
| 380 |
+
put,
|
| 381 |
+
putmask,
|
| 382 |
+
rad2deg,
|
| 383 |
+
radians,
|
| 384 |
+
ravel,
|
| 385 |
+
recarray,
|
| 386 |
+
reciprocal,
|
| 387 |
+
record,
|
| 388 |
+
remainder,
|
| 389 |
+
repeat,
|
| 390 |
+
require,
|
| 391 |
+
reshape,
|
| 392 |
+
resize,
|
| 393 |
+
result_type,
|
| 394 |
+
right_shift,
|
| 395 |
+
rint,
|
| 396 |
+
roll,
|
| 397 |
+
rollaxis,
|
| 398 |
+
round,
|
| 399 |
+
sctypeDict,
|
| 400 |
+
searchsorted,
|
| 401 |
+
set_printoptions,
|
| 402 |
+
setbufsize,
|
| 403 |
+
seterr,
|
| 404 |
+
seterrcall,
|
| 405 |
+
shape,
|
| 406 |
+
shares_memory,
|
| 407 |
+
short,
|
| 408 |
+
sign,
|
| 409 |
+
signbit,
|
| 410 |
+
signedinteger,
|
| 411 |
+
sin,
|
| 412 |
+
single,
|
| 413 |
+
sinh,
|
| 414 |
+
size,
|
| 415 |
+
sort,
|
| 416 |
+
spacing,
|
| 417 |
+
sqrt,
|
| 418 |
+
square,
|
| 419 |
+
squeeze,
|
| 420 |
+
stack,
|
| 421 |
+
std,
|
| 422 |
+
str_,
|
| 423 |
+
subtract,
|
| 424 |
+
sum,
|
| 425 |
+
swapaxes,
|
| 426 |
+
take,
|
| 427 |
+
tan,
|
| 428 |
+
tanh,
|
| 429 |
+
tensordot,
|
| 430 |
+
timedelta64,
|
| 431 |
+
trace,
|
| 432 |
+
transpose,
|
| 433 |
+
true_divide,
|
| 434 |
+
trunc,
|
| 435 |
+
typecodes,
|
| 436 |
+
ubyte,
|
| 437 |
+
ufunc,
|
| 438 |
+
uint,
|
| 439 |
+
uint8,
|
| 440 |
+
uint16,
|
| 441 |
+
uint32,
|
| 442 |
+
uint64,
|
| 443 |
+
uintc,
|
| 444 |
+
uintp,
|
| 445 |
+
ulong,
|
| 446 |
+
ulonglong,
|
| 447 |
+
unsignedinteger,
|
| 448 |
+
unstack,
|
| 449 |
+
ushort,
|
| 450 |
+
var,
|
| 451 |
+
vdot,
|
| 452 |
+
vecdot,
|
| 453 |
+
vecmat,
|
| 454 |
+
void,
|
| 455 |
+
vstack,
|
| 456 |
+
where,
|
| 457 |
+
zeros,
|
| 458 |
+
zeros_like,
|
| 459 |
+
)
|
| 460 |
+
|
| 461 |
+
# NOTE: It's still under discussion whether these aliases
|
| 462 |
+
# should be removed.
|
| 463 |
+
for ta in ["float96", "float128", "complex192", "complex256"]:
|
| 464 |
+
try:
|
| 465 |
+
globals()[ta] = getattr(_core, ta)
|
| 466 |
+
except AttributeError:
|
| 467 |
+
pass
|
| 468 |
+
del ta
|
| 469 |
+
|
| 470 |
+
from . import lib, matrixlib as _mat
|
| 471 |
+
from .lib import scimath as emath
|
| 472 |
+
from .lib._arraypad_impl import pad
|
| 473 |
+
from .lib._arraysetops_impl import (
|
| 474 |
+
ediff1d,
|
| 475 |
+
intersect1d,
|
| 476 |
+
isin,
|
| 477 |
+
setdiff1d,
|
| 478 |
+
setxor1d,
|
| 479 |
+
union1d,
|
| 480 |
+
unique,
|
| 481 |
+
unique_all,
|
| 482 |
+
unique_counts,
|
| 483 |
+
unique_inverse,
|
| 484 |
+
unique_values,
|
| 485 |
+
)
|
| 486 |
+
from .lib._function_base_impl import (
|
| 487 |
+
angle,
|
| 488 |
+
append,
|
| 489 |
+
asarray_chkfinite,
|
| 490 |
+
average,
|
| 491 |
+
bartlett,
|
| 492 |
+
bincount,
|
| 493 |
+
blackman,
|
| 494 |
+
copy,
|
| 495 |
+
corrcoef,
|
| 496 |
+
cov,
|
| 497 |
+
delete,
|
| 498 |
+
diff,
|
| 499 |
+
digitize,
|
| 500 |
+
extract,
|
| 501 |
+
flip,
|
| 502 |
+
gradient,
|
| 503 |
+
hamming,
|
| 504 |
+
hanning,
|
| 505 |
+
i0,
|
| 506 |
+
insert,
|
| 507 |
+
interp,
|
| 508 |
+
iterable,
|
| 509 |
+
kaiser,
|
| 510 |
+
median,
|
| 511 |
+
meshgrid,
|
| 512 |
+
percentile,
|
| 513 |
+
piecewise,
|
| 514 |
+
place,
|
| 515 |
+
quantile,
|
| 516 |
+
rot90,
|
| 517 |
+
select,
|
| 518 |
+
sinc,
|
| 519 |
+
sort_complex,
|
| 520 |
+
trapezoid,
|
| 521 |
+
trim_zeros,
|
| 522 |
+
unwrap,
|
| 523 |
+
vectorize,
|
| 524 |
+
)
|
| 525 |
+
from .lib._histograms_impl import histogram, histogram_bin_edges, histogramdd
|
| 526 |
+
from .lib._index_tricks_impl import (
|
| 527 |
+
c_,
|
| 528 |
+
diag_indices,
|
| 529 |
+
diag_indices_from,
|
| 530 |
+
fill_diagonal,
|
| 531 |
+
index_exp,
|
| 532 |
+
ix_,
|
| 533 |
+
mgrid,
|
| 534 |
+
ndenumerate,
|
| 535 |
+
ndindex,
|
| 536 |
+
ogrid,
|
| 537 |
+
r_,
|
| 538 |
+
ravel_multi_index,
|
| 539 |
+
s_,
|
| 540 |
+
unravel_index,
|
| 541 |
+
)
|
| 542 |
+
from .lib._nanfunctions_impl import (
|
| 543 |
+
nanargmax,
|
| 544 |
+
nanargmin,
|
| 545 |
+
nancumprod,
|
| 546 |
+
nancumsum,
|
| 547 |
+
nanmax,
|
| 548 |
+
nanmean,
|
| 549 |
+
nanmedian,
|
| 550 |
+
nanmin,
|
| 551 |
+
nanpercentile,
|
| 552 |
+
nanprod,
|
| 553 |
+
nanquantile,
|
| 554 |
+
nanstd,
|
| 555 |
+
nansum,
|
| 556 |
+
nanvar,
|
| 557 |
+
)
|
| 558 |
+
from .lib._npyio_impl import (
|
| 559 |
+
fromregex,
|
| 560 |
+
genfromtxt,
|
| 561 |
+
load,
|
| 562 |
+
loadtxt,
|
| 563 |
+
packbits,
|
| 564 |
+
save,
|
| 565 |
+
savetxt,
|
| 566 |
+
savez,
|
| 567 |
+
savez_compressed,
|
| 568 |
+
unpackbits,
|
| 569 |
+
)
|
| 570 |
+
from .lib._polynomial_impl import (
|
| 571 |
+
poly,
|
| 572 |
+
poly1d,
|
| 573 |
+
polyadd,
|
| 574 |
+
polyder,
|
| 575 |
+
polydiv,
|
| 576 |
+
polyfit,
|
| 577 |
+
polyint,
|
| 578 |
+
polymul,
|
| 579 |
+
polysub,
|
| 580 |
+
polyval,
|
| 581 |
+
roots,
|
| 582 |
+
)
|
| 583 |
+
from .lib._shape_base_impl import (
|
| 584 |
+
apply_along_axis,
|
| 585 |
+
apply_over_axes,
|
| 586 |
+
array_split,
|
| 587 |
+
column_stack,
|
| 588 |
+
dsplit,
|
| 589 |
+
dstack,
|
| 590 |
+
expand_dims,
|
| 591 |
+
hsplit,
|
| 592 |
+
kron,
|
| 593 |
+
put_along_axis,
|
| 594 |
+
row_stack,
|
| 595 |
+
split,
|
| 596 |
+
take_along_axis,
|
| 597 |
+
tile,
|
| 598 |
+
vsplit,
|
| 599 |
+
)
|
| 600 |
+
from .lib._stride_tricks_impl import (
|
| 601 |
+
broadcast_arrays,
|
| 602 |
+
broadcast_shapes,
|
| 603 |
+
broadcast_to,
|
| 604 |
+
)
|
| 605 |
+
from .lib._twodim_base_impl import (
|
| 606 |
+
diag,
|
| 607 |
+
diagflat,
|
| 608 |
+
eye,
|
| 609 |
+
fliplr,
|
| 610 |
+
flipud,
|
| 611 |
+
histogram2d,
|
| 612 |
+
mask_indices,
|
| 613 |
+
tri,
|
| 614 |
+
tril,
|
| 615 |
+
tril_indices,
|
| 616 |
+
tril_indices_from,
|
| 617 |
+
triu,
|
| 618 |
+
triu_indices,
|
| 619 |
+
triu_indices_from,
|
| 620 |
+
vander,
|
| 621 |
+
)
|
| 622 |
+
from .lib._type_check_impl import (
|
| 623 |
+
common_type,
|
| 624 |
+
imag,
|
| 625 |
+
iscomplex,
|
| 626 |
+
iscomplexobj,
|
| 627 |
+
isreal,
|
| 628 |
+
isrealobj,
|
| 629 |
+
mintypecode,
|
| 630 |
+
nan_to_num,
|
| 631 |
+
real,
|
| 632 |
+
real_if_close,
|
| 633 |
+
typename,
|
| 634 |
+
)
|
| 635 |
+
from .lib._ufunclike_impl import fix, isneginf, isposinf
|
| 636 |
+
from .lib._utils_impl import get_include, info, show_runtime
|
| 637 |
+
from .matrixlib import asmatrix, bmat, matrix
|
| 638 |
+
|
| 639 |
+
# public submodules are imported lazily, therefore are accessible from
|
| 640 |
+
# __getattr__. Note that `distutils` (deprecated) and `array_api`
|
| 641 |
+
# (experimental label) are not added here, because `from numpy import *`
|
| 642 |
+
# must not raise any warnings - that's too disruptive.
|
| 643 |
+
__numpy_submodules__ = {
|
| 644 |
+
"linalg", "fft", "dtypes", "random", "polynomial", "ma",
|
| 645 |
+
"exceptions", "lib", "ctypeslib", "testing", "typing",
|
| 646 |
+
"f2py", "test", "rec", "char", "core", "strings",
|
| 647 |
+
}
|
| 648 |
+
|
| 649 |
+
# We build warning messages for former attributes
|
| 650 |
+
_msg = (
|
| 651 |
+
"module 'numpy' has no attribute '{n}'.\n"
|
| 652 |
+
"`np.{n}` was a deprecated alias for the builtin `{n}`. "
|
| 653 |
+
"To avoid this error in existing code, use `{n}` by itself. "
|
| 654 |
+
"Doing this will not modify any behavior and is safe. {extended_msg}\n"
|
| 655 |
+
"The aliases was originally deprecated in NumPy 1.20; for more "
|
| 656 |
+
"details and guidance see the original release note at:\n"
|
| 657 |
+
" https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations")
|
| 658 |
+
|
| 659 |
+
_specific_msg = (
|
| 660 |
+
"If you specifically wanted the numpy scalar type, use `np.{}` here.")
|
| 661 |
+
|
| 662 |
+
_int_extended_msg = (
|
| 663 |
+
"When replacing `np.{}`, you may wish to use e.g. `np.int64` "
|
| 664 |
+
"or `np.int32` to specify the precision. If you wish to review "
|
| 665 |
+
"your current use, check the release note link for "
|
| 666 |
+
"additional information.")
|
| 667 |
+
|
| 668 |
+
_type_info = [
|
| 669 |
+
("object", ""), # The NumPy scalar only exists by name.
|
| 670 |
+
("float", _specific_msg.format("float64")),
|
| 671 |
+
("complex", _specific_msg.format("complex128")),
|
| 672 |
+
("str", _specific_msg.format("str_")),
|
| 673 |
+
("int", _int_extended_msg.format("int"))]
|
| 674 |
+
|
| 675 |
+
__former_attrs__ = {
|
| 676 |
+
n: _msg.format(n=n, extended_msg=extended_msg)
|
| 677 |
+
for n, extended_msg in _type_info
|
| 678 |
+
}
|
| 679 |
+
|
| 680 |
+
# Some of these could be defined right away, but most were aliases to
|
| 681 |
+
# the Python objects and only removed in NumPy 1.24. Defining them should
|
| 682 |
+
# probably wait for NumPy 1.26 or 2.0.
|
| 683 |
+
# When defined, these should possibly not be added to `__all__` to avoid
|
| 684 |
+
# import with `from numpy import *`.
|
| 685 |
+
__future_scalars__ = {"str", "bytes", "object"}
|
| 686 |
+
|
| 687 |
+
__array_api_version__ = "2024.12"
|
| 688 |
+
|
| 689 |
+
from ._array_api_info import __array_namespace_info__
|
| 690 |
+
|
| 691 |
+
__all__ = list(
|
| 692 |
+
__numpy_submodules__ |
|
| 693 |
+
set(_core.__all__) |
|
| 694 |
+
set(_mat.__all__) |
|
| 695 |
+
set(lib._histograms_impl.__all__) |
|
| 696 |
+
set(lib._nanfunctions_impl.__all__) |
|
| 697 |
+
set(lib._function_base_impl.__all__) |
|
| 698 |
+
set(lib._twodim_base_impl.__all__) |
|
| 699 |
+
set(lib._shape_base_impl.__all__) |
|
| 700 |
+
set(lib._type_check_impl.__all__) |
|
| 701 |
+
set(lib._arraysetops_impl.__all__) |
|
| 702 |
+
set(lib._ufunclike_impl.__all__) |
|
| 703 |
+
set(lib._arraypad_impl.__all__) |
|
| 704 |
+
set(lib._utils_impl.__all__) |
|
| 705 |
+
set(lib._stride_tricks_impl.__all__) |
|
| 706 |
+
set(lib._polynomial_impl.__all__) |
|
| 707 |
+
set(lib._npyio_impl.__all__) |
|
| 708 |
+
set(lib._index_tricks_impl.__all__) |
|
| 709 |
+
{"emath", "show_config", "__version__", "__array_namespace_info__"}
|
| 710 |
+
)
|
| 711 |
+
|
| 712 |
+
# Filter out Cython harmless warnings
|
| 713 |
+
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
|
| 714 |
+
warnings.filterwarnings("ignore", message="numpy.ufunc size changed")
|
| 715 |
+
warnings.filterwarnings("ignore", message="numpy.ndarray size changed")
|
| 716 |
+
|
| 717 |
+
def __getattr__(attr):
|
| 718 |
+
# Warn for expired attributes
|
| 719 |
+
import warnings
|
| 720 |
+
|
| 721 |
+
if attr == "linalg":
|
| 722 |
+
import numpy.linalg as linalg
|
| 723 |
+
return linalg
|
| 724 |
+
elif attr == "fft":
|
| 725 |
+
import numpy.fft as fft
|
| 726 |
+
return fft
|
| 727 |
+
elif attr == "dtypes":
|
| 728 |
+
import numpy.dtypes as dtypes
|
| 729 |
+
return dtypes
|
| 730 |
+
elif attr == "random":
|
| 731 |
+
import numpy.random as random
|
| 732 |
+
return random
|
| 733 |
+
elif attr == "polynomial":
|
| 734 |
+
import numpy.polynomial as polynomial
|
| 735 |
+
return polynomial
|
| 736 |
+
elif attr == "ma":
|
| 737 |
+
import numpy.ma as ma
|
| 738 |
+
return ma
|
| 739 |
+
elif attr == "ctypeslib":
|
| 740 |
+
import numpy.ctypeslib as ctypeslib
|
| 741 |
+
return ctypeslib
|
| 742 |
+
elif attr == "exceptions":
|
| 743 |
+
import numpy.exceptions as exceptions
|
| 744 |
+
return exceptions
|
| 745 |
+
elif attr == "testing":
|
| 746 |
+
import numpy.testing as testing
|
| 747 |
+
return testing
|
| 748 |
+
elif attr == "matlib":
|
| 749 |
+
import numpy.matlib as matlib
|
| 750 |
+
return matlib
|
| 751 |
+
elif attr == "f2py":
|
| 752 |
+
import numpy.f2py as f2py
|
| 753 |
+
return f2py
|
| 754 |
+
elif attr == "typing":
|
| 755 |
+
import numpy.typing as typing
|
| 756 |
+
return typing
|
| 757 |
+
elif attr == "rec":
|
| 758 |
+
import numpy.rec as rec
|
| 759 |
+
return rec
|
| 760 |
+
elif attr == "char":
|
| 761 |
+
import numpy.char as char
|
| 762 |
+
return char
|
| 763 |
+
elif attr == "array_api":
|
| 764 |
+
raise AttributeError("`numpy.array_api` is not available from "
|
| 765 |
+
"numpy 2.0 onwards", name=None)
|
| 766 |
+
elif attr == "core":
|
| 767 |
+
import numpy.core as core
|
| 768 |
+
return core
|
| 769 |
+
elif attr == "strings":
|
| 770 |
+
import numpy.strings as strings
|
| 771 |
+
return strings
|
| 772 |
+
elif attr == "distutils":
|
| 773 |
+
if 'distutils' in __numpy_submodules__:
|
| 774 |
+
import numpy.distutils as distutils
|
| 775 |
+
return distutils
|
| 776 |
+
else:
|
| 777 |
+
raise AttributeError("`numpy.distutils` is not available from "
|
| 778 |
+
"Python 3.12 onwards", name=None)
|
| 779 |
+
|
| 780 |
+
if attr in __future_scalars__:
|
| 781 |
+
# And future warnings for those that will change, but also give
|
| 782 |
+
# the AttributeError
|
| 783 |
+
warnings.warn(
|
| 784 |
+
f"In the future `np.{attr}` will be defined as the "
|
| 785 |
+
"corresponding NumPy scalar.", FutureWarning, stacklevel=2)
|
| 786 |
+
|
| 787 |
+
if attr in __former_attrs__:
|
| 788 |
+
raise AttributeError(__former_attrs__[attr], name=None)
|
| 789 |
+
|
| 790 |
+
if attr in __expired_attributes__:
|
| 791 |
+
raise AttributeError(
|
| 792 |
+
f"`np.{attr}` was removed in the NumPy 2.0 release. "
|
| 793 |
+
f"{__expired_attributes__[attr]}",
|
| 794 |
+
name=None
|
| 795 |
+
)
|
| 796 |
+
|
| 797 |
+
if attr == "chararray":
|
| 798 |
+
warnings.warn(
|
| 799 |
+
"`np.chararray` is deprecated and will be removed from "
|
| 800 |
+
"the main namespace in the future. Use an array with a string "
|
| 801 |
+
"or bytes dtype instead.", DeprecationWarning, stacklevel=2)
|
| 802 |
+
import numpy.char as char
|
| 803 |
+
return char.chararray
|
| 804 |
+
|
| 805 |
+
raise AttributeError(f"module {__name__!r} has no attribute {attr!r}")
|
| 806 |
+
|
| 807 |
+
def __dir__():
|
| 808 |
+
public_symbols = (
|
| 809 |
+
globals().keys() | __numpy_submodules__
|
| 810 |
+
)
|
| 811 |
+
public_symbols -= {
|
| 812 |
+
"matrixlib", "matlib", "tests", "conftest", "version",
|
| 813 |
+
"distutils", "array_api"
|
| 814 |
+
}
|
| 815 |
+
return list(public_symbols)
|
| 816 |
+
|
| 817 |
+
# Pytest testing
|
| 818 |
+
from numpy._pytesttester import PytestTester
|
| 819 |
+
test = PytestTester(__name__)
|
| 820 |
+
del PytestTester
|
| 821 |
+
|
| 822 |
+
def _sanity_check():
|
| 823 |
+
"""
|
| 824 |
+
Quick sanity checks for common bugs caused by environment.
|
| 825 |
+
There are some cases e.g. with wrong BLAS ABI that cause wrong
|
| 826 |
+
results under specific runtime conditions that are not necessarily
|
| 827 |
+
achieved during test suite runs, and it is useful to catch those early.
|
| 828 |
+
|
| 829 |
+
See https://github.com/numpy/numpy/issues/8577 and other
|
| 830 |
+
similar bug reports.
|
| 831 |
+
|
| 832 |
+
"""
|
| 833 |
+
try:
|
| 834 |
+
x = ones(2, dtype=float32)
|
| 835 |
+
if not abs(x.dot(x) - float32(2.0)) < 1e-5:
|
| 836 |
+
raise AssertionError
|
| 837 |
+
except AssertionError:
|
| 838 |
+
msg = ("The current Numpy installation ({!r}) fails to "
|
| 839 |
+
"pass simple sanity checks. This can be caused for example "
|
| 840 |
+
"by incorrect BLAS library being linked in, or by mixing "
|
| 841 |
+
"package managers (pip, conda, apt, ...). Search closed "
|
| 842 |
+
"numpy issues for similar problems.")
|
| 843 |
+
raise RuntimeError(msg.format(__file__)) from None
|
| 844 |
+
|
| 845 |
+
_sanity_check()
|
| 846 |
+
del _sanity_check
|
| 847 |
+
|
| 848 |
+
def _mac_os_check():
|
| 849 |
+
"""
|
| 850 |
+
Quick Sanity check for Mac OS look for accelerate build bugs.
|
| 851 |
+
Testing numpy polyfit calls init_dgelsd(LAPACK)
|
| 852 |
+
"""
|
| 853 |
+
try:
|
| 854 |
+
c = array([3., 2., 1.])
|
| 855 |
+
x = linspace(0, 2, 5)
|
| 856 |
+
y = polyval(c, x)
|
| 857 |
+
_ = polyfit(x, y, 2, cov=True)
|
| 858 |
+
except ValueError:
|
| 859 |
+
pass
|
| 860 |
+
|
| 861 |
+
if sys.platform == "darwin":
|
| 862 |
+
from . import exceptions
|
| 863 |
+
with warnings.catch_warnings(record=True) as w:
|
| 864 |
+
_mac_os_check()
|
| 865 |
+
# Throw runtime error, if the test failed
|
| 866 |
+
# Check for warning and report the error_message
|
| 867 |
+
if len(w) > 0:
|
| 868 |
+
for _wn in w:
|
| 869 |
+
if _wn.category is exceptions.RankWarning:
|
| 870 |
+
# Ignore other warnings, they may not be relevant (see gh-25433)
|
| 871 |
+
error_message = (
|
| 872 |
+
f"{_wn.category.__name__}: {_wn.message}"
|
| 873 |
+
)
|
| 874 |
+
msg = (
|
| 875 |
+
"Polyfit sanity test emitted a warning, most likely due "
|
| 876 |
+
"to using a buggy Accelerate backend."
|
| 877 |
+
"\nIf you compiled yourself, more information is available at:" # noqa: E501
|
| 878 |
+
"\nhttps://numpy.org/devdocs/building/index.html"
|
| 879 |
+
"\nOtherwise report this to the vendor "
|
| 880 |
+
f"that provided NumPy.\n\n{error_message}\n")
|
| 881 |
+
raise RuntimeError(msg)
|
| 882 |
+
del _wn
|
| 883 |
+
del w
|
| 884 |
+
del _mac_os_check
|
| 885 |
+
|
| 886 |
+
def blas_fpe_check():
|
| 887 |
+
# Check if BLAS adds spurious FPEs, mostly seen on M4 arms with Accelerate.
|
| 888 |
+
with errstate(all='raise'):
|
| 889 |
+
x = ones((20, 20))
|
| 890 |
+
try:
|
| 891 |
+
x @ x
|
| 892 |
+
except FloatingPointError:
|
| 893 |
+
res = _core._multiarray_umath._blas_supports_fpe(False)
|
| 894 |
+
if res: # res was not modified (hardcoded to True for now)
|
| 895 |
+
warnings.warn(
|
| 896 |
+
"Spurious warnings given by blas but suppression not "
|
| 897 |
+
"set up on this platform. Please open a NumPy issue.",
|
| 898 |
+
UserWarning, stacklevel=2)
|
| 899 |
+
|
| 900 |
+
blas_fpe_check()
|
| 901 |
+
del blas_fpe_check
|
| 902 |
+
|
| 903 |
+
def hugepage_setup():
|
| 904 |
+
"""
|
| 905 |
+
We usually use madvise hugepages support, but on some old kernels it
|
| 906 |
+
is slow and thus better avoided. Specifically kernel version 4.6
|
| 907 |
+
had a bug fix which probably fixed this:
|
| 908 |
+
https://github.com/torvalds/linux/commit/7cf91a98e607c2f935dbcc177d70011e95b8faff
|
| 909 |
+
"""
|
| 910 |
+
use_hugepage = os.environ.get("NUMPY_MADVISE_HUGEPAGE", None)
|
| 911 |
+
if sys.platform == "linux" and use_hugepage is None:
|
| 912 |
+
# If there is an issue with parsing the kernel version,
|
| 913 |
+
# set use_hugepage to 0. Usage of LooseVersion will handle
|
| 914 |
+
# the kernel version parsing better, but avoided since it
|
| 915 |
+
# will increase the import time.
|
| 916 |
+
# See: #16679 for related discussion.
|
| 917 |
+
try:
|
| 918 |
+
use_hugepage = 1
|
| 919 |
+
kernel_version = os.uname().release.split(".")[:2]
|
| 920 |
+
kernel_version = tuple(int(v) for v in kernel_version)
|
| 921 |
+
if kernel_version < (4, 6):
|
| 922 |
+
use_hugepage = 0
|
| 923 |
+
except ValueError:
|
| 924 |
+
use_hugepage = 0
|
| 925 |
+
elif use_hugepage is None:
|
| 926 |
+
# This is not Linux, so it should not matter, just enable anyway
|
| 927 |
+
use_hugepage = 1
|
| 928 |
+
else:
|
| 929 |
+
use_hugepage = int(use_hugepage)
|
| 930 |
+
return use_hugepage
|
| 931 |
+
|
| 932 |
+
# Note that this will currently only make a difference on Linux
|
| 933 |
+
_core.multiarray._set_madvise_hugepage(hugepage_setup())
|
| 934 |
+
del hugepage_setup
|
| 935 |
+
|
| 936 |
+
# Give a warning if NumPy is reloaded or imported on a sub-interpreter
|
| 937 |
+
# We do this from python, since the C-module may not be reloaded and
|
| 938 |
+
# it is tidier organized.
|
| 939 |
+
_core.multiarray._multiarray_umath._reload_guard()
|
| 940 |
+
|
| 941 |
+
# TODO: Remove the environment variable entirely now that it is "weak"
|
| 942 |
+
if (os.environ.get("NPY_PROMOTION_STATE", "weak") != "weak"):
|
| 943 |
+
warnings.warn(
|
| 944 |
+
"NPY_PROMOTION_STATE was a temporary feature for NumPy 2.0 "
|
| 945 |
+
"transition and is ignored after NumPy 2.2.",
|
| 946 |
+
UserWarning, stacklevel=2)
|
| 947 |
+
|
| 948 |
+
# Tell PyInstaller where to find hook-numpy.py
|
| 949 |
+
def _pyinstaller_hooks_dir():
|
| 950 |
+
from pathlib import Path
|
| 951 |
+
return [str(Path(__file__).with_name("_pyinstaller").resolve())]
|
| 952 |
+
|
| 953 |
+
|
| 954 |
+
# Remove symbols imported for internal use
|
| 955 |
+
del os, sys, warnings
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/__init__.pyi
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/__config__.cpython-312.pyc
ADDED
|
Binary file (5.3 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (28.9 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/_array_api_info.cpython-312.pyc
ADDED
|
Binary file (11.2 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/_distributor_init.cpython-312.pyc
ADDED
|
Binary file (660 Bytes). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/_expired_attrs_2_0.cpython-312.pyc
ADDED
|
Binary file (4.24 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/_globals.cpython-312.pyc
ADDED
|
Binary file (4.56 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/_pytesttester.cpython-312.pyc
ADDED
|
Binary file (6.72 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/dtypes.cpython-312.pyc
ADDED
|
Binary file (1.54 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/exceptions.cpython-312.pyc
ADDED
|
Binary file (8.64 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/__pycache__/version.cpython-312.pyc
ADDED
|
Binary file (549 Bytes). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_array_api_info.py
ADDED
|
@@ -0,0 +1,346 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Array API Inspection namespace
|
| 3 |
+
|
| 4 |
+
This is the namespace for inspection functions as defined by the array API
|
| 5 |
+
standard. See
|
| 6 |
+
https://data-apis.org/array-api/latest/API_specification/inspection.html for
|
| 7 |
+
more details.
|
| 8 |
+
|
| 9 |
+
"""
|
| 10 |
+
from numpy._core import (
|
| 11 |
+
bool,
|
| 12 |
+
complex64,
|
| 13 |
+
complex128,
|
| 14 |
+
dtype,
|
| 15 |
+
float32,
|
| 16 |
+
float64,
|
| 17 |
+
int8,
|
| 18 |
+
int16,
|
| 19 |
+
int32,
|
| 20 |
+
int64,
|
| 21 |
+
intp,
|
| 22 |
+
uint8,
|
| 23 |
+
uint16,
|
| 24 |
+
uint32,
|
| 25 |
+
uint64,
|
| 26 |
+
)
|
| 27 |
+
from numpy._utils import set_module
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
@set_module('numpy')
|
| 31 |
+
class __array_namespace_info__:
|
| 32 |
+
"""
|
| 33 |
+
Get the array API inspection namespace for NumPy.
|
| 34 |
+
|
| 35 |
+
The array API inspection namespace defines the following functions:
|
| 36 |
+
|
| 37 |
+
- capabilities()
|
| 38 |
+
- default_device()
|
| 39 |
+
- default_dtypes()
|
| 40 |
+
- dtypes()
|
| 41 |
+
- devices()
|
| 42 |
+
|
| 43 |
+
See
|
| 44 |
+
https://data-apis.org/array-api/latest/API_specification/inspection.html
|
| 45 |
+
for more details.
|
| 46 |
+
|
| 47 |
+
Returns
|
| 48 |
+
-------
|
| 49 |
+
info : ModuleType
|
| 50 |
+
The array API inspection namespace for NumPy.
|
| 51 |
+
|
| 52 |
+
Examples
|
| 53 |
+
--------
|
| 54 |
+
>>> info = np.__array_namespace_info__()
|
| 55 |
+
>>> info.default_dtypes()
|
| 56 |
+
{'real floating': numpy.float64,
|
| 57 |
+
'complex floating': numpy.complex128,
|
| 58 |
+
'integral': numpy.int64,
|
| 59 |
+
'indexing': numpy.int64}
|
| 60 |
+
|
| 61 |
+
"""
|
| 62 |
+
|
| 63 |
+
def capabilities(self):
|
| 64 |
+
"""
|
| 65 |
+
Return a dictionary of array API library capabilities.
|
| 66 |
+
|
| 67 |
+
The resulting dictionary has the following keys:
|
| 68 |
+
|
| 69 |
+
- **"boolean indexing"**: boolean indicating whether an array library
|
| 70 |
+
supports boolean indexing. Always ``True`` for NumPy.
|
| 71 |
+
|
| 72 |
+
- **"data-dependent shapes"**: boolean indicating whether an array
|
| 73 |
+
library supports data-dependent output shapes. Always ``True`` for
|
| 74 |
+
NumPy.
|
| 75 |
+
|
| 76 |
+
See
|
| 77 |
+
https://data-apis.org/array-api/latest/API_specification/generated/array_api.info.capabilities.html
|
| 78 |
+
for more details.
|
| 79 |
+
|
| 80 |
+
See Also
|
| 81 |
+
--------
|
| 82 |
+
__array_namespace_info__.default_device,
|
| 83 |
+
__array_namespace_info__.default_dtypes,
|
| 84 |
+
__array_namespace_info__.dtypes,
|
| 85 |
+
__array_namespace_info__.devices
|
| 86 |
+
|
| 87 |
+
Returns
|
| 88 |
+
-------
|
| 89 |
+
capabilities : dict
|
| 90 |
+
A dictionary of array API library capabilities.
|
| 91 |
+
|
| 92 |
+
Examples
|
| 93 |
+
--------
|
| 94 |
+
>>> info = np.__array_namespace_info__()
|
| 95 |
+
>>> info.capabilities()
|
| 96 |
+
{'boolean indexing': True,
|
| 97 |
+
'data-dependent shapes': True,
|
| 98 |
+
'max dimensions': 64}
|
| 99 |
+
|
| 100 |
+
"""
|
| 101 |
+
return {
|
| 102 |
+
"boolean indexing": True,
|
| 103 |
+
"data-dependent shapes": True,
|
| 104 |
+
"max dimensions": 64,
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
def default_device(self):
|
| 108 |
+
"""
|
| 109 |
+
The default device used for new NumPy arrays.
|
| 110 |
+
|
| 111 |
+
For NumPy, this always returns ``'cpu'``.
|
| 112 |
+
|
| 113 |
+
See Also
|
| 114 |
+
--------
|
| 115 |
+
__array_namespace_info__.capabilities,
|
| 116 |
+
__array_namespace_info__.default_dtypes,
|
| 117 |
+
__array_namespace_info__.dtypes,
|
| 118 |
+
__array_namespace_info__.devices
|
| 119 |
+
|
| 120 |
+
Returns
|
| 121 |
+
-------
|
| 122 |
+
device : str
|
| 123 |
+
The default device used for new NumPy arrays.
|
| 124 |
+
|
| 125 |
+
Examples
|
| 126 |
+
--------
|
| 127 |
+
>>> info = np.__array_namespace_info__()
|
| 128 |
+
>>> info.default_device()
|
| 129 |
+
'cpu'
|
| 130 |
+
|
| 131 |
+
"""
|
| 132 |
+
return "cpu"
|
| 133 |
+
|
| 134 |
+
def default_dtypes(self, *, device=None):
|
| 135 |
+
"""
|
| 136 |
+
The default data types used for new NumPy arrays.
|
| 137 |
+
|
| 138 |
+
For NumPy, this always returns the following dictionary:
|
| 139 |
+
|
| 140 |
+
- **"real floating"**: ``numpy.float64``
|
| 141 |
+
- **"complex floating"**: ``numpy.complex128``
|
| 142 |
+
- **"integral"**: ``numpy.intp``
|
| 143 |
+
- **"indexing"**: ``numpy.intp``
|
| 144 |
+
|
| 145 |
+
Parameters
|
| 146 |
+
----------
|
| 147 |
+
device : str, optional
|
| 148 |
+
The device to get the default data types for. For NumPy, only
|
| 149 |
+
``'cpu'`` is allowed.
|
| 150 |
+
|
| 151 |
+
Returns
|
| 152 |
+
-------
|
| 153 |
+
dtypes : dict
|
| 154 |
+
A dictionary describing the default data types used for new NumPy
|
| 155 |
+
arrays.
|
| 156 |
+
|
| 157 |
+
See Also
|
| 158 |
+
--------
|
| 159 |
+
__array_namespace_info__.capabilities,
|
| 160 |
+
__array_namespace_info__.default_device,
|
| 161 |
+
__array_namespace_info__.dtypes,
|
| 162 |
+
__array_namespace_info__.devices
|
| 163 |
+
|
| 164 |
+
Examples
|
| 165 |
+
--------
|
| 166 |
+
>>> info = np.__array_namespace_info__()
|
| 167 |
+
>>> info.default_dtypes()
|
| 168 |
+
{'real floating': numpy.float64,
|
| 169 |
+
'complex floating': numpy.complex128,
|
| 170 |
+
'integral': numpy.int64,
|
| 171 |
+
'indexing': numpy.int64}
|
| 172 |
+
|
| 173 |
+
"""
|
| 174 |
+
if device not in ["cpu", None]:
|
| 175 |
+
raise ValueError(
|
| 176 |
+
'Device not understood. Only "cpu" is allowed, but received:'
|
| 177 |
+
f' {device}'
|
| 178 |
+
)
|
| 179 |
+
return {
|
| 180 |
+
"real floating": dtype(float64),
|
| 181 |
+
"complex floating": dtype(complex128),
|
| 182 |
+
"integral": dtype(intp),
|
| 183 |
+
"indexing": dtype(intp),
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
def dtypes(self, *, device=None, kind=None):
|
| 187 |
+
"""
|
| 188 |
+
The array API data types supported by NumPy.
|
| 189 |
+
|
| 190 |
+
Note that this function only returns data types that are defined by
|
| 191 |
+
the array API.
|
| 192 |
+
|
| 193 |
+
Parameters
|
| 194 |
+
----------
|
| 195 |
+
device : str, optional
|
| 196 |
+
The device to get the data types for. For NumPy, only ``'cpu'`` is
|
| 197 |
+
allowed.
|
| 198 |
+
kind : str or tuple of str, optional
|
| 199 |
+
The kind of data types to return. If ``None``, all data types are
|
| 200 |
+
returned. If a string, only data types of that kind are returned.
|
| 201 |
+
If a tuple, a dictionary containing the union of the given kinds
|
| 202 |
+
is returned. The following kinds are supported:
|
| 203 |
+
|
| 204 |
+
- ``'bool'``: boolean data types (i.e., ``bool``).
|
| 205 |
+
- ``'signed integer'``: signed integer data types (i.e., ``int8``,
|
| 206 |
+
``int16``, ``int32``, ``int64``).
|
| 207 |
+
- ``'unsigned integer'``: unsigned integer data types (i.e.,
|
| 208 |
+
``uint8``, ``uint16``, ``uint32``, ``uint64``).
|
| 209 |
+
- ``'integral'``: integer data types. Shorthand for ``('signed
|
| 210 |
+
integer', 'unsigned integer')``.
|
| 211 |
+
- ``'real floating'``: real-valued floating-point data types
|
| 212 |
+
(i.e., ``float32``, ``float64``).
|
| 213 |
+
- ``'complex floating'``: complex floating-point data types (i.e.,
|
| 214 |
+
``complex64``, ``complex128``).
|
| 215 |
+
- ``'numeric'``: numeric data types. Shorthand for ``('integral',
|
| 216 |
+
'real floating', 'complex floating')``.
|
| 217 |
+
|
| 218 |
+
Returns
|
| 219 |
+
-------
|
| 220 |
+
dtypes : dict
|
| 221 |
+
A dictionary mapping the names of data types to the corresponding
|
| 222 |
+
NumPy data types.
|
| 223 |
+
|
| 224 |
+
See Also
|
| 225 |
+
--------
|
| 226 |
+
__array_namespace_info__.capabilities,
|
| 227 |
+
__array_namespace_info__.default_device,
|
| 228 |
+
__array_namespace_info__.default_dtypes,
|
| 229 |
+
__array_namespace_info__.devices
|
| 230 |
+
|
| 231 |
+
Examples
|
| 232 |
+
--------
|
| 233 |
+
>>> info = np.__array_namespace_info__()
|
| 234 |
+
>>> info.dtypes(kind='signed integer')
|
| 235 |
+
{'int8': numpy.int8,
|
| 236 |
+
'int16': numpy.int16,
|
| 237 |
+
'int32': numpy.int32,
|
| 238 |
+
'int64': numpy.int64}
|
| 239 |
+
|
| 240 |
+
"""
|
| 241 |
+
if device not in ["cpu", None]:
|
| 242 |
+
raise ValueError(
|
| 243 |
+
'Device not understood. Only "cpu" is allowed, but received:'
|
| 244 |
+
f' {device}'
|
| 245 |
+
)
|
| 246 |
+
if kind is None:
|
| 247 |
+
return {
|
| 248 |
+
"bool": dtype(bool),
|
| 249 |
+
"int8": dtype(int8),
|
| 250 |
+
"int16": dtype(int16),
|
| 251 |
+
"int32": dtype(int32),
|
| 252 |
+
"int64": dtype(int64),
|
| 253 |
+
"uint8": dtype(uint8),
|
| 254 |
+
"uint16": dtype(uint16),
|
| 255 |
+
"uint32": dtype(uint32),
|
| 256 |
+
"uint64": dtype(uint64),
|
| 257 |
+
"float32": dtype(float32),
|
| 258 |
+
"float64": dtype(float64),
|
| 259 |
+
"complex64": dtype(complex64),
|
| 260 |
+
"complex128": dtype(complex128),
|
| 261 |
+
}
|
| 262 |
+
if kind == "bool":
|
| 263 |
+
return {"bool": bool}
|
| 264 |
+
if kind == "signed integer":
|
| 265 |
+
return {
|
| 266 |
+
"int8": dtype(int8),
|
| 267 |
+
"int16": dtype(int16),
|
| 268 |
+
"int32": dtype(int32),
|
| 269 |
+
"int64": dtype(int64),
|
| 270 |
+
}
|
| 271 |
+
if kind == "unsigned integer":
|
| 272 |
+
return {
|
| 273 |
+
"uint8": dtype(uint8),
|
| 274 |
+
"uint16": dtype(uint16),
|
| 275 |
+
"uint32": dtype(uint32),
|
| 276 |
+
"uint64": dtype(uint64),
|
| 277 |
+
}
|
| 278 |
+
if kind == "integral":
|
| 279 |
+
return {
|
| 280 |
+
"int8": dtype(int8),
|
| 281 |
+
"int16": dtype(int16),
|
| 282 |
+
"int32": dtype(int32),
|
| 283 |
+
"int64": dtype(int64),
|
| 284 |
+
"uint8": dtype(uint8),
|
| 285 |
+
"uint16": dtype(uint16),
|
| 286 |
+
"uint32": dtype(uint32),
|
| 287 |
+
"uint64": dtype(uint64),
|
| 288 |
+
}
|
| 289 |
+
if kind == "real floating":
|
| 290 |
+
return {
|
| 291 |
+
"float32": dtype(float32),
|
| 292 |
+
"float64": dtype(float64),
|
| 293 |
+
}
|
| 294 |
+
if kind == "complex floating":
|
| 295 |
+
return {
|
| 296 |
+
"complex64": dtype(complex64),
|
| 297 |
+
"complex128": dtype(complex128),
|
| 298 |
+
}
|
| 299 |
+
if kind == "numeric":
|
| 300 |
+
return {
|
| 301 |
+
"int8": dtype(int8),
|
| 302 |
+
"int16": dtype(int16),
|
| 303 |
+
"int32": dtype(int32),
|
| 304 |
+
"int64": dtype(int64),
|
| 305 |
+
"uint8": dtype(uint8),
|
| 306 |
+
"uint16": dtype(uint16),
|
| 307 |
+
"uint32": dtype(uint32),
|
| 308 |
+
"uint64": dtype(uint64),
|
| 309 |
+
"float32": dtype(float32),
|
| 310 |
+
"float64": dtype(float64),
|
| 311 |
+
"complex64": dtype(complex64),
|
| 312 |
+
"complex128": dtype(complex128),
|
| 313 |
+
}
|
| 314 |
+
if isinstance(kind, tuple):
|
| 315 |
+
res = {}
|
| 316 |
+
for k in kind:
|
| 317 |
+
res.update(self.dtypes(kind=k))
|
| 318 |
+
return res
|
| 319 |
+
raise ValueError(f"unsupported kind: {kind!r}")
|
| 320 |
+
|
| 321 |
+
def devices(self):
|
| 322 |
+
"""
|
| 323 |
+
The devices supported by NumPy.
|
| 324 |
+
|
| 325 |
+
For NumPy, this always returns ``['cpu']``.
|
| 326 |
+
|
| 327 |
+
Returns
|
| 328 |
+
-------
|
| 329 |
+
devices : list of str
|
| 330 |
+
The devices supported by NumPy.
|
| 331 |
+
|
| 332 |
+
See Also
|
| 333 |
+
--------
|
| 334 |
+
__array_namespace_info__.capabilities,
|
| 335 |
+
__array_namespace_info__.default_device,
|
| 336 |
+
__array_namespace_info__.default_dtypes,
|
| 337 |
+
__array_namespace_info__.dtypes
|
| 338 |
+
|
| 339 |
+
Examples
|
| 340 |
+
--------
|
| 341 |
+
>>> info = np.__array_namespace_info__()
|
| 342 |
+
>>> info.devices()
|
| 343 |
+
['cpu']
|
| 344 |
+
|
| 345 |
+
"""
|
| 346 |
+
return ["cpu"]
|
loan-advisor-agent/.venv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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import (
|
| 2 |
+
Literal,
|
| 3 |
+
Never,
|
| 4 |
+
TypeAlias,
|
| 5 |
+
TypedDict,
|
| 6 |
+
TypeVar,
|
| 7 |
+
final,
|
| 8 |
+
overload,
|
| 9 |
+
type_check_only,
|
| 10 |
+
)
|
| 11 |
+
|
| 12 |
+
import numpy as np
|
| 13 |
+
|
| 14 |
+
_Device: TypeAlias = Literal["cpu"]
|
| 15 |
+
_DeviceLike: TypeAlias = _Device | None
|
| 16 |
+
|
| 17 |
+
_Capabilities = TypedDict(
|
| 18 |
+
"_Capabilities",
|
| 19 |
+
{
|
| 20 |
+
"boolean indexing": Literal[True],
|
| 21 |
+
"data-dependent shapes": Literal[True],
|
| 22 |
+
},
|
| 23 |
+
)
|
| 24 |
+
|
| 25 |
+
_DefaultDTypes = TypedDict(
|
| 26 |
+
"_DefaultDTypes",
|
| 27 |
+
{
|
| 28 |
+
"real floating": np.dtype[np.float64],
|
| 29 |
+
"complex floating": np.dtype[np.complex128],
|
| 30 |
+
"integral": np.dtype[np.intp],
|
| 31 |
+
"indexing": np.dtype[np.intp],
|
| 32 |
+
},
|
| 33 |
+
)
|
| 34 |
+
|
| 35 |
+
_KindBool: TypeAlias = Literal["bool"]
|
| 36 |
+
_KindInt: TypeAlias = Literal["signed integer"]
|
| 37 |
+
_KindUInt: TypeAlias = Literal["unsigned integer"]
|
| 38 |
+
_KindInteger: TypeAlias = Literal["integral"]
|
| 39 |
+
_KindFloat: TypeAlias = Literal["real floating"]
|
| 40 |
+
_KindComplex: TypeAlias = Literal["complex floating"]
|
| 41 |
+
_KindNumber: TypeAlias = Literal["numeric"]
|
| 42 |
+
_Kind: TypeAlias = (
|
| 43 |
+
_KindBool
|
| 44 |
+
| _KindInt
|
| 45 |
+
| _KindUInt
|
| 46 |
+
| _KindInteger
|
| 47 |
+
| _KindFloat
|
| 48 |
+
| _KindComplex
|
| 49 |
+
| _KindNumber
|
| 50 |
+
)
|
| 51 |
+
|
| 52 |
+
_T1 = TypeVar("_T1")
|
| 53 |
+
_T2 = TypeVar("_T2")
|
| 54 |
+
_T3 = TypeVar("_T3")
|
| 55 |
+
_Permute1: TypeAlias = _T1 | tuple[_T1]
|
| 56 |
+
_Permute2: TypeAlias = tuple[_T1, _T2] | tuple[_T2, _T1]
|
| 57 |
+
_Permute3: TypeAlias = (
|
| 58 |
+
tuple[_T1, _T2, _T3] | tuple[_T1, _T3, _T2]
|
| 59 |
+
| tuple[_T2, _T1, _T3] | tuple[_T2, _T3, _T1]
|
| 60 |
+
| tuple[_T3, _T1, _T2] | tuple[_T3, _T2, _T1]
|
| 61 |
+
)
|
| 62 |
+
|
| 63 |
+
@type_check_only
|
| 64 |
+
class _DTypesBool(TypedDict):
|
| 65 |
+
bool: np.dtype[np.bool]
|
| 66 |
+
|
| 67 |
+
@type_check_only
|
| 68 |
+
class _DTypesInt(TypedDict):
|
| 69 |
+
int8: np.dtype[np.int8]
|
| 70 |
+
int16: np.dtype[np.int16]
|
| 71 |
+
int32: np.dtype[np.int32]
|
| 72 |
+
int64: np.dtype[np.int64]
|
| 73 |
+
|
| 74 |
+
@type_check_only
|
| 75 |
+
class _DTypesUInt(TypedDict):
|
| 76 |
+
uint8: np.dtype[np.uint8]
|
| 77 |
+
uint16: np.dtype[np.uint16]
|
| 78 |
+
uint32: np.dtype[np.uint32]
|
| 79 |
+
uint64: np.dtype[np.uint64]
|
| 80 |
+
|
| 81 |
+
@type_check_only
|
| 82 |
+
class _DTypesInteger(_DTypesInt, _DTypesUInt): ...
|
| 83 |
+
|
| 84 |
+
@type_check_only
|
| 85 |
+
class _DTypesFloat(TypedDict):
|
| 86 |
+
float32: np.dtype[np.float32]
|
| 87 |
+
float64: np.dtype[np.float64]
|
| 88 |
+
|
| 89 |
+
@type_check_only
|
| 90 |
+
class _DTypesComplex(TypedDict):
|
| 91 |
+
complex64: np.dtype[np.complex64]
|
| 92 |
+
complex128: np.dtype[np.complex128]
|
| 93 |
+
|
| 94 |
+
@type_check_only
|
| 95 |
+
class _DTypesNumber(_DTypesInteger, _DTypesFloat, _DTypesComplex): ...
|
| 96 |
+
|
| 97 |
+
@type_check_only
|
| 98 |
+
class _DTypes(_DTypesBool, _DTypesNumber): ...
|
| 99 |
+
|
| 100 |
+
@type_check_only
|
| 101 |
+
class _DTypesUnion(TypedDict, total=False):
|
| 102 |
+
bool: np.dtype[np.bool]
|
| 103 |
+
int8: np.dtype[np.int8]
|
| 104 |
+
int16: np.dtype[np.int16]
|
| 105 |
+
int32: np.dtype[np.int32]
|
| 106 |
+
int64: np.dtype[np.int64]
|
| 107 |
+
uint8: np.dtype[np.uint8]
|
| 108 |
+
uint16: np.dtype[np.uint16]
|
| 109 |
+
uint32: np.dtype[np.uint32]
|
| 110 |
+
uint64: np.dtype[np.uint64]
|
| 111 |
+
float32: np.dtype[np.float32]
|
| 112 |
+
float64: np.dtype[np.float64]
|
| 113 |
+
complex64: np.dtype[np.complex64]
|
| 114 |
+
complex128: np.dtype[np.complex128]
|
| 115 |
+
|
| 116 |
+
_EmptyDict: TypeAlias = dict[Never, Never]
|
| 117 |
+
|
| 118 |
+
@final
|
| 119 |
+
class __array_namespace_info__:
|
| 120 |
+
__module__: Literal["numpy"] = "numpy"
|
| 121 |
+
|
| 122 |
+
def capabilities(self) -> _Capabilities: ...
|
| 123 |
+
def default_device(self) -> _Device: ...
|
| 124 |
+
def default_dtypes(
|
| 125 |
+
self,
|
| 126 |
+
*,
|
| 127 |
+
device: _DeviceLike = None,
|
| 128 |
+
) -> _DefaultDTypes: ...
|
| 129 |
+
def devices(self) -> list[_Device]: ...
|
| 130 |
+
|
| 131 |
+
@overload
|
| 132 |
+
def dtypes(
|
| 133 |
+
self,
|
| 134 |
+
*,
|
| 135 |
+
device: _DeviceLike = None,
|
| 136 |
+
kind: None = None,
|
| 137 |
+
) -> _DTypes: ...
|
| 138 |
+
@overload
|
| 139 |
+
def dtypes(
|
| 140 |
+
self,
|
| 141 |
+
*,
|
| 142 |
+
device: _DeviceLike = None,
|
| 143 |
+
kind: _Permute1[_KindBool],
|
| 144 |
+
) -> _DTypesBool: ...
|
| 145 |
+
@overload
|
| 146 |
+
def dtypes(
|
| 147 |
+
self,
|
| 148 |
+
*,
|
| 149 |
+
device: _DeviceLike = None,
|
| 150 |
+
kind: _Permute1[_KindInt],
|
| 151 |
+
) -> _DTypesInt: ...
|
| 152 |
+
@overload
|
| 153 |
+
def dtypes(
|
| 154 |
+
self,
|
| 155 |
+
*,
|
| 156 |
+
device: _DeviceLike = None,
|
| 157 |
+
kind: _Permute1[_KindUInt],
|
| 158 |
+
) -> _DTypesUInt: ...
|
| 159 |
+
@overload
|
| 160 |
+
def dtypes(
|
| 161 |
+
self,
|
| 162 |
+
*,
|
| 163 |
+
device: _DeviceLike = None,
|
| 164 |
+
kind: _Permute1[_KindFloat],
|
| 165 |
+
) -> _DTypesFloat: ...
|
| 166 |
+
@overload
|
| 167 |
+
def dtypes(
|
| 168 |
+
self,
|
| 169 |
+
*,
|
| 170 |
+
device: _DeviceLike = None,
|
| 171 |
+
kind: _Permute1[_KindComplex],
|
| 172 |
+
) -> _DTypesComplex: ...
|
| 173 |
+
@overload
|
| 174 |
+
def dtypes(
|
| 175 |
+
self,
|
| 176 |
+
*,
|
| 177 |
+
device: _DeviceLike = None,
|
| 178 |
+
kind: (
|
| 179 |
+
_Permute1[_KindInteger]
|
| 180 |
+
| _Permute2[_KindInt, _KindUInt]
|
| 181 |
+
),
|
| 182 |
+
) -> _DTypesInteger: ...
|
| 183 |
+
@overload
|
| 184 |
+
def dtypes(
|
| 185 |
+
self,
|
| 186 |
+
*,
|
| 187 |
+
device: _DeviceLike = None,
|
| 188 |
+
kind: (
|
| 189 |
+
_Permute1[_KindNumber]
|
| 190 |
+
| _Permute3[_KindInteger, _KindFloat, _KindComplex]
|
| 191 |
+
),
|
| 192 |
+
) -> _DTypesNumber: ...
|
| 193 |
+
@overload
|
| 194 |
+
def dtypes(
|
| 195 |
+
self,
|
| 196 |
+
*,
|
| 197 |
+
device: _DeviceLike = None,
|
| 198 |
+
kind: tuple[()],
|
| 199 |
+
) -> _EmptyDict: ...
|
| 200 |
+
@overload
|
| 201 |
+
def dtypes(
|
| 202 |
+
self,
|
| 203 |
+
*,
|
| 204 |
+
device: _DeviceLike = None,
|
| 205 |
+
kind: tuple[_Kind, ...],
|
| 206 |
+
) -> _DTypesUnion: ...
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_configtool.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import argparse
|
| 2 |
+
import sys
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
|
| 5 |
+
from .lib._utils_impl import get_include
|
| 6 |
+
from .version import __version__
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def main() -> None:
|
| 10 |
+
parser = argparse.ArgumentParser()
|
| 11 |
+
parser.add_argument(
|
| 12 |
+
"--version",
|
| 13 |
+
action="version",
|
| 14 |
+
version=__version__,
|
| 15 |
+
help="Print the version and exit.",
|
| 16 |
+
)
|
| 17 |
+
parser.add_argument(
|
| 18 |
+
"--cflags",
|
| 19 |
+
action="store_true",
|
| 20 |
+
help="Compile flag needed when using the NumPy headers.",
|
| 21 |
+
)
|
| 22 |
+
parser.add_argument(
|
| 23 |
+
"--pkgconfigdir",
|
| 24 |
+
action="store_true",
|
| 25 |
+
help=("Print the pkgconfig directory in which `numpy.pc` is stored "
|
| 26 |
+
"(useful for setting $PKG_CONFIG_PATH)."),
|
| 27 |
+
)
|
| 28 |
+
args = parser.parse_args()
|
| 29 |
+
if not sys.argv[1:]:
|
| 30 |
+
parser.print_help()
|
| 31 |
+
if args.cflags:
|
| 32 |
+
print("-I" + get_include())
|
| 33 |
+
if args.pkgconfigdir:
|
| 34 |
+
_path = Path(get_include()) / '..' / 'lib' / 'pkgconfig'
|
| 35 |
+
print(_path.resolve())
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
if __name__ == "__main__":
|
| 39 |
+
main()
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_configtool.pyi
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
def main() -> None: ...
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__init__.py
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Contains the core of NumPy: ndarray, ufuncs, dtypes, etc.
|
| 3 |
+
|
| 4 |
+
Please note that this module is private. All functions and objects
|
| 5 |
+
are available in the main ``numpy`` namespace - use that instead.
|
| 6 |
+
|
| 7 |
+
"""
|
| 8 |
+
|
| 9 |
+
import os
|
| 10 |
+
|
| 11 |
+
from numpy.version import version as __version__
|
| 12 |
+
|
| 13 |
+
# disables OpenBLAS affinity setting of the main thread that limits
|
| 14 |
+
# python threads or processes to one core
|
| 15 |
+
env_added = []
|
| 16 |
+
for envkey in ['OPENBLAS_MAIN_FREE']:
|
| 17 |
+
if envkey not in os.environ:
|
| 18 |
+
# Note: using `putenv` (and `unsetenv` further down) instead of updating
|
| 19 |
+
# `os.environ` on purpose to avoid a race condition, see gh-30627.
|
| 20 |
+
os.putenv(envkey, '1')
|
| 21 |
+
env_added.append(envkey)
|
| 22 |
+
|
| 23 |
+
try:
|
| 24 |
+
from . import multiarray
|
| 25 |
+
except ImportError as exc:
|
| 26 |
+
import sys
|
| 27 |
+
|
| 28 |
+
# Bypass for the module re-initialization opt-out
|
| 29 |
+
if exc.msg == "cannot load module more than once per process":
|
| 30 |
+
raise
|
| 31 |
+
|
| 32 |
+
# Basically always, the problem should be that the C module is wrong/missing...
|
| 33 |
+
if (
|
| 34 |
+
isinstance(exc, ModuleNotFoundError)
|
| 35 |
+
and exc.name == "numpy._core._multiarray_umath"
|
| 36 |
+
):
|
| 37 |
+
import sys
|
| 38 |
+
candidates = []
|
| 39 |
+
for path in __path__:
|
| 40 |
+
candidates.extend(
|
| 41 |
+
f for f in os.listdir(path) if f.startswith("_multiarray_umath"))
|
| 42 |
+
if len(candidates) == 0:
|
| 43 |
+
bad_c_module_info = (
|
| 44 |
+
"We found no compiled module, did NumPy build successfully?\n")
|
| 45 |
+
else:
|
| 46 |
+
candidate_str = '\n * '.join(candidates)
|
| 47 |
+
# cache_tag is documented to be possibly None, so just use name if it is
|
| 48 |
+
# this guesses at cache_tag being the same as the extension module scheme
|
| 49 |
+
tag = sys.implementation.cache_tag or sys.implementation.name
|
| 50 |
+
bad_c_module_info = (
|
| 51 |
+
f"The following compiled module files exist, but seem incompatible\n"
|
| 52 |
+
f"with with either python '{tag}' or the "
|
| 53 |
+
f"platform '{sys.platform}':\n\n * {candidate_str}\n"
|
| 54 |
+
)
|
| 55 |
+
else:
|
| 56 |
+
bad_c_module_info = ""
|
| 57 |
+
|
| 58 |
+
major, minor, *_ = sys.version_info
|
| 59 |
+
msg = f"""
|
| 60 |
+
|
| 61 |
+
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
|
| 62 |
+
|
| 63 |
+
Importing the numpy C-extensions failed. This error can happen for
|
| 64 |
+
many reasons, often due to issues with your setup or how NumPy was
|
| 65 |
+
installed.
|
| 66 |
+
{bad_c_module_info}
|
| 67 |
+
We have compiled some common reasons and troubleshooting tips at:
|
| 68 |
+
|
| 69 |
+
https://numpy.org/devdocs/user/troubleshooting-importerror.html
|
| 70 |
+
|
| 71 |
+
Please note and check the following:
|
| 72 |
+
|
| 73 |
+
* The Python version is: Python {major}.{minor} from "{sys.executable}"
|
| 74 |
+
* The NumPy version is: "{__version__}"
|
| 75 |
+
|
| 76 |
+
and make sure that they are the versions you expect.
|
| 77 |
+
|
| 78 |
+
Please carefully study the information and documentation linked above.
|
| 79 |
+
This is unlikely to be a NumPy issue but will be caused by a bad install
|
| 80 |
+
or environment on your machine.
|
| 81 |
+
|
| 82 |
+
Original error was: {exc}
|
| 83 |
+
"""
|
| 84 |
+
|
| 85 |
+
raise ImportError(msg) from exc
|
| 86 |
+
finally:
|
| 87 |
+
for envkey in env_added:
|
| 88 |
+
os.unsetenv(envkey)
|
| 89 |
+
del envkey
|
| 90 |
+
del env_added
|
| 91 |
+
del os
|
| 92 |
+
|
| 93 |
+
from . import umath
|
| 94 |
+
|
| 95 |
+
# Check that multiarray,umath are pure python modules wrapping
|
| 96 |
+
# _multiarray_umath and not either of the old c-extension modules
|
| 97 |
+
if not (hasattr(multiarray, '_multiarray_umath') and
|
| 98 |
+
hasattr(umath, '_multiarray_umath')):
|
| 99 |
+
import sys
|
| 100 |
+
path = sys.modules['numpy'].__path__
|
| 101 |
+
msg = ("Something is wrong with the numpy installation. "
|
| 102 |
+
"While importing we detected an older version of "
|
| 103 |
+
"numpy in {}. One method of fixing this is to repeatedly uninstall "
|
| 104 |
+
"numpy until none is found, then reinstall this version.")
|
| 105 |
+
raise ImportError(msg.format(path))
|
| 106 |
+
|
| 107 |
+
from . import numerictypes as nt
|
| 108 |
+
from .numerictypes import sctypeDict, sctypes
|
| 109 |
+
|
| 110 |
+
multiarray.set_typeDict(nt.sctypeDict)
|
| 111 |
+
from . import einsumfunc, fromnumeric, function_base, getlimits, numeric, shape_base
|
| 112 |
+
from .einsumfunc import *
|
| 113 |
+
from .fromnumeric import *
|
| 114 |
+
from .function_base import *
|
| 115 |
+
from .getlimits import *
|
| 116 |
+
|
| 117 |
+
# Note: module name memmap is overwritten by a class with same name
|
| 118 |
+
from .memmap import *
|
| 119 |
+
from .numeric import *
|
| 120 |
+
from .records import recarray, record
|
| 121 |
+
from .shape_base import *
|
| 122 |
+
|
| 123 |
+
del nt
|
| 124 |
+
|
| 125 |
+
# do this after everything else, to minimize the chance of this misleadingly
|
| 126 |
+
# appearing in an import-time traceback
|
| 127 |
+
# add these for module-freeze analysis (like PyInstaller)
|
| 128 |
+
from . import (
|
| 129 |
+
_add_newdocs,
|
| 130 |
+
_add_newdocs_scalars,
|
| 131 |
+
_dtype,
|
| 132 |
+
_dtype_ctypes,
|
| 133 |
+
_internal,
|
| 134 |
+
_methods,
|
| 135 |
+
)
|
| 136 |
+
from .numeric import absolute as abs
|
| 137 |
+
|
| 138 |
+
acos = numeric.arccos
|
| 139 |
+
acosh = numeric.arccosh
|
| 140 |
+
asin = numeric.arcsin
|
| 141 |
+
asinh = numeric.arcsinh
|
| 142 |
+
atan = numeric.arctan
|
| 143 |
+
atanh = numeric.arctanh
|
| 144 |
+
atan2 = numeric.arctan2
|
| 145 |
+
concat = numeric.concatenate
|
| 146 |
+
bitwise_left_shift = numeric.left_shift
|
| 147 |
+
bitwise_invert = numeric.invert
|
| 148 |
+
bitwise_right_shift = numeric.right_shift
|
| 149 |
+
permute_dims = numeric.transpose
|
| 150 |
+
pow = numeric.power
|
| 151 |
+
|
| 152 |
+
__all__ = [
|
| 153 |
+
"abs", "acos", "acosh", "asin", "asinh", "atan", "atanh", "atan2",
|
| 154 |
+
"bitwise_invert", "bitwise_left_shift", "bitwise_right_shift", "concat",
|
| 155 |
+
"pow", "permute_dims", "memmap", "sctypeDict", "record", "recarray"
|
| 156 |
+
]
|
| 157 |
+
__all__ += numeric.__all__
|
| 158 |
+
__all__ += function_base.__all__
|
| 159 |
+
__all__ += getlimits.__all__
|
| 160 |
+
__all__ += shape_base.__all__
|
| 161 |
+
__all__ += einsumfunc.__all__
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
def _ufunc_reduce(func):
|
| 165 |
+
# Report the `__name__`. pickle will try to find the module. Note that
|
| 166 |
+
# pickle supports for this `__name__` to be a `__qualname__`. It may
|
| 167 |
+
# make sense to add a `__qualname__` to ufuncs, to allow this more
|
| 168 |
+
# explicitly (Numba has ufuncs as attributes).
|
| 169 |
+
# See also: https://github.com/dask/distributed/issues/3450
|
| 170 |
+
return func.__name__
|
| 171 |
+
|
| 172 |
+
|
| 173 |
+
def _DType_reconstruct(scalar_type):
|
| 174 |
+
# This is a work-around to pickle type(np.dtype(np.float64)), etc.
|
| 175 |
+
# and it should eventually be replaced with a better solution, e.g. when
|
| 176 |
+
# DTypes become HeapTypes.
|
| 177 |
+
return type(dtype(scalar_type))
|
| 178 |
+
|
| 179 |
+
|
| 180 |
+
def _DType_reduce(DType):
|
| 181 |
+
# As types/classes, most DTypes can simply be pickled by their name:
|
| 182 |
+
if not DType._legacy or DType.__module__ == "numpy.dtypes":
|
| 183 |
+
return DType.__name__
|
| 184 |
+
|
| 185 |
+
# However, user defined legacy dtypes (like rational) do not end up in
|
| 186 |
+
# `numpy.dtypes` as module and do not have a public class at all.
|
| 187 |
+
# For these, we pickle them by reconstructing them from the scalar type:
|
| 188 |
+
scalar_type = DType.type
|
| 189 |
+
return _DType_reconstruct, (scalar_type,)
|
| 190 |
+
|
| 191 |
+
|
| 192 |
+
import copyreg
|
| 193 |
+
|
| 194 |
+
copyreg.pickle(ufunc, _ufunc_reduce)
|
| 195 |
+
copyreg.pickle(type(dtype), _DType_reduce, _DType_reconstruct)
|
| 196 |
+
|
| 197 |
+
# Unclutter namespace (must keep _*_reconstruct for unpickling)
|
| 198 |
+
del copyreg, _ufunc_reduce, _DType_reduce
|
| 199 |
+
|
| 200 |
+
from numpy._pytesttester import PytestTester
|
| 201 |
+
|
| 202 |
+
test = PytestTester(__name__)
|
| 203 |
+
del PytestTester
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__init__.pyi
ADDED
|
@@ -0,0 +1,666 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# keep in sync with https://github.com/numpy/numtype/blob/main/src/numpy-stubs/_core/__init__.pyi
|
| 2 |
+
|
| 3 |
+
from ._asarray import require
|
| 4 |
+
from ._ufunc_config import (
|
| 5 |
+
errstate,
|
| 6 |
+
getbufsize,
|
| 7 |
+
geterr,
|
| 8 |
+
geterrcall,
|
| 9 |
+
setbufsize,
|
| 10 |
+
seterr,
|
| 11 |
+
seterrcall,
|
| 12 |
+
)
|
| 13 |
+
from .arrayprint import (
|
| 14 |
+
array2string,
|
| 15 |
+
array_repr,
|
| 16 |
+
array_str,
|
| 17 |
+
format_float_positional,
|
| 18 |
+
format_float_scientific,
|
| 19 |
+
get_printoptions,
|
| 20 |
+
printoptions,
|
| 21 |
+
set_printoptions,
|
| 22 |
+
)
|
| 23 |
+
from .einsumfunc import einsum, einsum_path
|
| 24 |
+
from .fromnumeric import (
|
| 25 |
+
all,
|
| 26 |
+
amax,
|
| 27 |
+
amin,
|
| 28 |
+
any,
|
| 29 |
+
argmax,
|
| 30 |
+
argmin,
|
| 31 |
+
argpartition,
|
| 32 |
+
argsort,
|
| 33 |
+
around,
|
| 34 |
+
choose,
|
| 35 |
+
clip,
|
| 36 |
+
compress,
|
| 37 |
+
cumprod,
|
| 38 |
+
cumsum,
|
| 39 |
+
cumulative_prod,
|
| 40 |
+
cumulative_sum,
|
| 41 |
+
diagonal,
|
| 42 |
+
matrix_transpose,
|
| 43 |
+
max,
|
| 44 |
+
mean,
|
| 45 |
+
min,
|
| 46 |
+
ndim,
|
| 47 |
+
nonzero,
|
| 48 |
+
partition,
|
| 49 |
+
prod,
|
| 50 |
+
ptp,
|
| 51 |
+
put,
|
| 52 |
+
ravel,
|
| 53 |
+
repeat,
|
| 54 |
+
reshape,
|
| 55 |
+
resize,
|
| 56 |
+
round,
|
| 57 |
+
searchsorted,
|
| 58 |
+
shape,
|
| 59 |
+
size,
|
| 60 |
+
sort,
|
| 61 |
+
squeeze,
|
| 62 |
+
std,
|
| 63 |
+
sum,
|
| 64 |
+
swapaxes,
|
| 65 |
+
take,
|
| 66 |
+
trace,
|
| 67 |
+
transpose,
|
| 68 |
+
transpose as permute_dims,
|
| 69 |
+
var,
|
| 70 |
+
)
|
| 71 |
+
from .function_base import geomspace, linspace, logspace
|
| 72 |
+
from .getlimits import finfo, iinfo
|
| 73 |
+
from .memmap import memmap
|
| 74 |
+
from .numeric import (
|
| 75 |
+
False_,
|
| 76 |
+
True_,
|
| 77 |
+
allclose,
|
| 78 |
+
arange,
|
| 79 |
+
argwhere,
|
| 80 |
+
array,
|
| 81 |
+
array_equal,
|
| 82 |
+
array_equiv,
|
| 83 |
+
asanyarray,
|
| 84 |
+
asarray,
|
| 85 |
+
ascontiguousarray,
|
| 86 |
+
asfortranarray,
|
| 87 |
+
astype,
|
| 88 |
+
base_repr,
|
| 89 |
+
binary_repr,
|
| 90 |
+
bitwise_not,
|
| 91 |
+
broadcast,
|
| 92 |
+
can_cast,
|
| 93 |
+
concatenate,
|
| 94 |
+
concatenate as concat,
|
| 95 |
+
convolve,
|
| 96 |
+
copyto,
|
| 97 |
+
correlate,
|
| 98 |
+
count_nonzero,
|
| 99 |
+
cross,
|
| 100 |
+
dot,
|
| 101 |
+
dtype,
|
| 102 |
+
empty,
|
| 103 |
+
empty_like,
|
| 104 |
+
flatiter,
|
| 105 |
+
flatnonzero,
|
| 106 |
+
from_dlpack,
|
| 107 |
+
frombuffer,
|
| 108 |
+
fromfile,
|
| 109 |
+
fromfunction,
|
| 110 |
+
fromiter,
|
| 111 |
+
fromstring,
|
| 112 |
+
full,
|
| 113 |
+
full_like,
|
| 114 |
+
identity,
|
| 115 |
+
indices,
|
| 116 |
+
inf,
|
| 117 |
+
inner,
|
| 118 |
+
isclose,
|
| 119 |
+
isfortran,
|
| 120 |
+
isscalar,
|
| 121 |
+
lexsort,
|
| 122 |
+
little_endian,
|
| 123 |
+
matmul,
|
| 124 |
+
may_share_memory,
|
| 125 |
+
min_scalar_type,
|
| 126 |
+
moveaxis,
|
| 127 |
+
nan,
|
| 128 |
+
ndarray,
|
| 129 |
+
nditer,
|
| 130 |
+
nested_iters,
|
| 131 |
+
newaxis,
|
| 132 |
+
ones,
|
| 133 |
+
ones_like,
|
| 134 |
+
outer,
|
| 135 |
+
promote_types,
|
| 136 |
+
putmask,
|
| 137 |
+
result_type,
|
| 138 |
+
roll,
|
| 139 |
+
rollaxis,
|
| 140 |
+
shares_memory,
|
| 141 |
+
tensordot,
|
| 142 |
+
ufunc,
|
| 143 |
+
vdot,
|
| 144 |
+
vecdot,
|
| 145 |
+
where,
|
| 146 |
+
zeros,
|
| 147 |
+
zeros_like,
|
| 148 |
+
)
|
| 149 |
+
from .numerictypes import (
|
| 150 |
+
ScalarType,
|
| 151 |
+
bool,
|
| 152 |
+
bool_,
|
| 153 |
+
busday_count,
|
| 154 |
+
busday_offset,
|
| 155 |
+
busdaycalendar,
|
| 156 |
+
byte,
|
| 157 |
+
bytes_,
|
| 158 |
+
cdouble,
|
| 159 |
+
character,
|
| 160 |
+
clongdouble,
|
| 161 |
+
complex64,
|
| 162 |
+
complex128,
|
| 163 |
+
complex192,
|
| 164 |
+
complex256,
|
| 165 |
+
complexfloating,
|
| 166 |
+
csingle,
|
| 167 |
+
datetime64,
|
| 168 |
+
datetime_as_string,
|
| 169 |
+
datetime_data,
|
| 170 |
+
double,
|
| 171 |
+
flexible,
|
| 172 |
+
float16,
|
| 173 |
+
float32,
|
| 174 |
+
float64,
|
| 175 |
+
float96,
|
| 176 |
+
float128,
|
| 177 |
+
floating,
|
| 178 |
+
generic,
|
| 179 |
+
half,
|
| 180 |
+
inexact,
|
| 181 |
+
int8,
|
| 182 |
+
int16,
|
| 183 |
+
int32,
|
| 184 |
+
int64,
|
| 185 |
+
int_,
|
| 186 |
+
intc,
|
| 187 |
+
integer,
|
| 188 |
+
intp,
|
| 189 |
+
is_busday,
|
| 190 |
+
isdtype,
|
| 191 |
+
issubdtype,
|
| 192 |
+
long,
|
| 193 |
+
longdouble,
|
| 194 |
+
longlong,
|
| 195 |
+
number,
|
| 196 |
+
object_,
|
| 197 |
+
sctypeDict,
|
| 198 |
+
short,
|
| 199 |
+
signedinteger,
|
| 200 |
+
single,
|
| 201 |
+
str_,
|
| 202 |
+
timedelta64,
|
| 203 |
+
typecodes,
|
| 204 |
+
ubyte,
|
| 205 |
+
uint,
|
| 206 |
+
uint8,
|
| 207 |
+
uint16,
|
| 208 |
+
uint32,
|
| 209 |
+
uint64,
|
| 210 |
+
uintc,
|
| 211 |
+
uintp,
|
| 212 |
+
ulong,
|
| 213 |
+
ulonglong,
|
| 214 |
+
unsignedinteger,
|
| 215 |
+
ushort,
|
| 216 |
+
void,
|
| 217 |
+
)
|
| 218 |
+
from .records import recarray, record
|
| 219 |
+
from .shape_base import (
|
| 220 |
+
atleast_1d,
|
| 221 |
+
atleast_2d,
|
| 222 |
+
atleast_3d,
|
| 223 |
+
block,
|
| 224 |
+
hstack,
|
| 225 |
+
stack,
|
| 226 |
+
unstack,
|
| 227 |
+
vstack,
|
| 228 |
+
)
|
| 229 |
+
from .umath import (
|
| 230 |
+
absolute,
|
| 231 |
+
absolute as abs,
|
| 232 |
+
add,
|
| 233 |
+
arccos,
|
| 234 |
+
arccos as acos,
|
| 235 |
+
arccosh,
|
| 236 |
+
arccosh as acosh,
|
| 237 |
+
arcsin,
|
| 238 |
+
arcsin as asin,
|
| 239 |
+
arcsinh,
|
| 240 |
+
arcsinh as asinh,
|
| 241 |
+
arctan,
|
| 242 |
+
arctan as atan,
|
| 243 |
+
arctan2,
|
| 244 |
+
arctan2 as atan2,
|
| 245 |
+
arctanh,
|
| 246 |
+
arctanh as atanh,
|
| 247 |
+
bitwise_and,
|
| 248 |
+
bitwise_count,
|
| 249 |
+
bitwise_or,
|
| 250 |
+
bitwise_xor,
|
| 251 |
+
cbrt,
|
| 252 |
+
ceil,
|
| 253 |
+
conj,
|
| 254 |
+
conjugate,
|
| 255 |
+
copysign,
|
| 256 |
+
cos,
|
| 257 |
+
cosh,
|
| 258 |
+
deg2rad,
|
| 259 |
+
degrees,
|
| 260 |
+
divide,
|
| 261 |
+
divmod,
|
| 262 |
+
e,
|
| 263 |
+
equal,
|
| 264 |
+
euler_gamma,
|
| 265 |
+
exp,
|
| 266 |
+
exp2,
|
| 267 |
+
expm1,
|
| 268 |
+
fabs,
|
| 269 |
+
float_power,
|
| 270 |
+
floor,
|
| 271 |
+
floor_divide,
|
| 272 |
+
fmax,
|
| 273 |
+
fmin,
|
| 274 |
+
fmod,
|
| 275 |
+
frexp,
|
| 276 |
+
frompyfunc,
|
| 277 |
+
gcd,
|
| 278 |
+
greater,
|
| 279 |
+
greater_equal,
|
| 280 |
+
heaviside,
|
| 281 |
+
hypot,
|
| 282 |
+
invert,
|
| 283 |
+
invert as bitwise_invert,
|
| 284 |
+
isfinite,
|
| 285 |
+
isinf,
|
| 286 |
+
isnan,
|
| 287 |
+
isnat,
|
| 288 |
+
lcm,
|
| 289 |
+
ldexp,
|
| 290 |
+
left_shift,
|
| 291 |
+
left_shift as bitwise_left_shift,
|
| 292 |
+
less,
|
| 293 |
+
less_equal,
|
| 294 |
+
log,
|
| 295 |
+
log1p,
|
| 296 |
+
log2,
|
| 297 |
+
log10,
|
| 298 |
+
logaddexp,
|
| 299 |
+
logaddexp2,
|
| 300 |
+
logical_and,
|
| 301 |
+
logical_not,
|
| 302 |
+
logical_or,
|
| 303 |
+
logical_xor,
|
| 304 |
+
matvec,
|
| 305 |
+
maximum,
|
| 306 |
+
minimum,
|
| 307 |
+
mod,
|
| 308 |
+
modf,
|
| 309 |
+
multiply,
|
| 310 |
+
negative,
|
| 311 |
+
nextafter,
|
| 312 |
+
not_equal,
|
| 313 |
+
pi,
|
| 314 |
+
positive,
|
| 315 |
+
power,
|
| 316 |
+
power as pow,
|
| 317 |
+
rad2deg,
|
| 318 |
+
radians,
|
| 319 |
+
reciprocal,
|
| 320 |
+
remainder,
|
| 321 |
+
right_shift,
|
| 322 |
+
right_shift as bitwise_right_shift,
|
| 323 |
+
rint,
|
| 324 |
+
sign,
|
| 325 |
+
signbit,
|
| 326 |
+
sin,
|
| 327 |
+
sinh,
|
| 328 |
+
spacing,
|
| 329 |
+
sqrt,
|
| 330 |
+
square,
|
| 331 |
+
subtract,
|
| 332 |
+
tan,
|
| 333 |
+
tanh,
|
| 334 |
+
true_divide,
|
| 335 |
+
trunc,
|
| 336 |
+
vecmat,
|
| 337 |
+
)
|
| 338 |
+
|
| 339 |
+
__all__ = [
|
| 340 |
+
"False_",
|
| 341 |
+
"ScalarType",
|
| 342 |
+
"True_",
|
| 343 |
+
"abs",
|
| 344 |
+
"absolute",
|
| 345 |
+
"acos",
|
| 346 |
+
"acosh",
|
| 347 |
+
"add",
|
| 348 |
+
"all",
|
| 349 |
+
"allclose",
|
| 350 |
+
"amax",
|
| 351 |
+
"amin",
|
| 352 |
+
"any",
|
| 353 |
+
"arange",
|
| 354 |
+
"arccos",
|
| 355 |
+
"arccosh",
|
| 356 |
+
"arcsin",
|
| 357 |
+
"arcsinh",
|
| 358 |
+
"arctan",
|
| 359 |
+
"arctan2",
|
| 360 |
+
"arctanh",
|
| 361 |
+
"argmax",
|
| 362 |
+
"argmin",
|
| 363 |
+
"argpartition",
|
| 364 |
+
"argsort",
|
| 365 |
+
"argwhere",
|
| 366 |
+
"around",
|
| 367 |
+
"array",
|
| 368 |
+
"array2string",
|
| 369 |
+
"array_equal",
|
| 370 |
+
"array_equiv",
|
| 371 |
+
"array_repr",
|
| 372 |
+
"array_str",
|
| 373 |
+
"asanyarray",
|
| 374 |
+
"asarray",
|
| 375 |
+
"ascontiguousarray",
|
| 376 |
+
"asfortranarray",
|
| 377 |
+
"asin",
|
| 378 |
+
"asinh",
|
| 379 |
+
"astype",
|
| 380 |
+
"atan",
|
| 381 |
+
"atan2",
|
| 382 |
+
"atanh",
|
| 383 |
+
"atleast_1d",
|
| 384 |
+
"atleast_2d",
|
| 385 |
+
"atleast_3d",
|
| 386 |
+
"base_repr",
|
| 387 |
+
"binary_repr",
|
| 388 |
+
"bitwise_and",
|
| 389 |
+
"bitwise_count",
|
| 390 |
+
"bitwise_invert",
|
| 391 |
+
"bitwise_left_shift",
|
| 392 |
+
"bitwise_not",
|
| 393 |
+
"bitwise_or",
|
| 394 |
+
"bitwise_right_shift",
|
| 395 |
+
"bitwise_xor",
|
| 396 |
+
"block",
|
| 397 |
+
"bool",
|
| 398 |
+
"bool_",
|
| 399 |
+
"broadcast",
|
| 400 |
+
"busday_count",
|
| 401 |
+
"busday_offset",
|
| 402 |
+
"busdaycalendar",
|
| 403 |
+
"byte",
|
| 404 |
+
"bytes_",
|
| 405 |
+
"can_cast",
|
| 406 |
+
"cbrt",
|
| 407 |
+
"cdouble",
|
| 408 |
+
"ceil",
|
| 409 |
+
"character",
|
| 410 |
+
"choose",
|
| 411 |
+
"clip",
|
| 412 |
+
"clongdouble",
|
| 413 |
+
"complex64",
|
| 414 |
+
"complex128",
|
| 415 |
+
"complex192",
|
| 416 |
+
"complex256",
|
| 417 |
+
"complexfloating",
|
| 418 |
+
"compress",
|
| 419 |
+
"concat",
|
| 420 |
+
"concatenate",
|
| 421 |
+
"conj",
|
| 422 |
+
"conjugate",
|
| 423 |
+
"convolve",
|
| 424 |
+
"copysign",
|
| 425 |
+
"copyto",
|
| 426 |
+
"correlate",
|
| 427 |
+
"cos",
|
| 428 |
+
"cosh",
|
| 429 |
+
"count_nonzero",
|
| 430 |
+
"cross",
|
| 431 |
+
"csingle",
|
| 432 |
+
"cumprod",
|
| 433 |
+
"cumsum",
|
| 434 |
+
"cumulative_prod",
|
| 435 |
+
"cumulative_sum",
|
| 436 |
+
"datetime64",
|
| 437 |
+
"datetime_as_string",
|
| 438 |
+
"datetime_data",
|
| 439 |
+
"deg2rad",
|
| 440 |
+
"degrees",
|
| 441 |
+
"diagonal",
|
| 442 |
+
"divide",
|
| 443 |
+
"divmod",
|
| 444 |
+
"dot",
|
| 445 |
+
"double",
|
| 446 |
+
"dtype",
|
| 447 |
+
"e",
|
| 448 |
+
"einsum",
|
| 449 |
+
"einsum_path",
|
| 450 |
+
"empty",
|
| 451 |
+
"empty_like",
|
| 452 |
+
"equal",
|
| 453 |
+
"errstate",
|
| 454 |
+
"euler_gamma",
|
| 455 |
+
"exp",
|
| 456 |
+
"exp2",
|
| 457 |
+
"expm1",
|
| 458 |
+
"fabs",
|
| 459 |
+
"finfo",
|
| 460 |
+
"flatiter",
|
| 461 |
+
"flatnonzero",
|
| 462 |
+
"flexible",
|
| 463 |
+
"float16",
|
| 464 |
+
"float32",
|
| 465 |
+
"float64",
|
| 466 |
+
"float96",
|
| 467 |
+
"float128",
|
| 468 |
+
"float_power",
|
| 469 |
+
"floating",
|
| 470 |
+
"floor",
|
| 471 |
+
"floor_divide",
|
| 472 |
+
"fmax",
|
| 473 |
+
"fmin",
|
| 474 |
+
"fmod",
|
| 475 |
+
"format_float_positional",
|
| 476 |
+
"format_float_scientific",
|
| 477 |
+
"frexp",
|
| 478 |
+
"from_dlpack",
|
| 479 |
+
"frombuffer",
|
| 480 |
+
"fromfile",
|
| 481 |
+
"fromfunction",
|
| 482 |
+
"fromiter",
|
| 483 |
+
"frompyfunc",
|
| 484 |
+
"fromstring",
|
| 485 |
+
"full",
|
| 486 |
+
"full_like",
|
| 487 |
+
"gcd",
|
| 488 |
+
"generic",
|
| 489 |
+
"geomspace",
|
| 490 |
+
"get_printoptions",
|
| 491 |
+
"getbufsize",
|
| 492 |
+
"geterr",
|
| 493 |
+
"geterrcall",
|
| 494 |
+
"greater",
|
| 495 |
+
"greater_equal",
|
| 496 |
+
"half",
|
| 497 |
+
"heaviside",
|
| 498 |
+
"hstack",
|
| 499 |
+
"hypot",
|
| 500 |
+
"identity",
|
| 501 |
+
"iinfo",
|
| 502 |
+
"indices",
|
| 503 |
+
"inexact",
|
| 504 |
+
"inf",
|
| 505 |
+
"inner",
|
| 506 |
+
"int8",
|
| 507 |
+
"int16",
|
| 508 |
+
"int32",
|
| 509 |
+
"int64",
|
| 510 |
+
"int_",
|
| 511 |
+
"intc",
|
| 512 |
+
"integer",
|
| 513 |
+
"intp",
|
| 514 |
+
"invert",
|
| 515 |
+
"is_busday",
|
| 516 |
+
"isclose",
|
| 517 |
+
"isdtype",
|
| 518 |
+
"isfinite",
|
| 519 |
+
"isfortran",
|
| 520 |
+
"isinf",
|
| 521 |
+
"isnan",
|
| 522 |
+
"isnat",
|
| 523 |
+
"isscalar",
|
| 524 |
+
"issubdtype",
|
| 525 |
+
"lcm",
|
| 526 |
+
"ldexp",
|
| 527 |
+
"left_shift",
|
| 528 |
+
"less",
|
| 529 |
+
"less_equal",
|
| 530 |
+
"lexsort",
|
| 531 |
+
"linspace",
|
| 532 |
+
"little_endian",
|
| 533 |
+
"log",
|
| 534 |
+
"log1p",
|
| 535 |
+
"log2",
|
| 536 |
+
"log10",
|
| 537 |
+
"logaddexp",
|
| 538 |
+
"logaddexp2",
|
| 539 |
+
"logical_and",
|
| 540 |
+
"logical_not",
|
| 541 |
+
"logical_or",
|
| 542 |
+
"logical_xor",
|
| 543 |
+
"logspace",
|
| 544 |
+
"long",
|
| 545 |
+
"longdouble",
|
| 546 |
+
"longlong",
|
| 547 |
+
"matmul",
|
| 548 |
+
"matrix_transpose",
|
| 549 |
+
"matvec",
|
| 550 |
+
"max",
|
| 551 |
+
"maximum",
|
| 552 |
+
"may_share_memory",
|
| 553 |
+
"mean",
|
| 554 |
+
"memmap",
|
| 555 |
+
"min",
|
| 556 |
+
"min_scalar_type",
|
| 557 |
+
"minimum",
|
| 558 |
+
"mod",
|
| 559 |
+
"modf",
|
| 560 |
+
"moveaxis",
|
| 561 |
+
"multiply",
|
| 562 |
+
"nan",
|
| 563 |
+
"ndarray",
|
| 564 |
+
"ndim",
|
| 565 |
+
"nditer",
|
| 566 |
+
"negative",
|
| 567 |
+
"nested_iters",
|
| 568 |
+
"newaxis",
|
| 569 |
+
"nextafter",
|
| 570 |
+
"nonzero",
|
| 571 |
+
"not_equal",
|
| 572 |
+
"number",
|
| 573 |
+
"object_",
|
| 574 |
+
"ones",
|
| 575 |
+
"ones_like",
|
| 576 |
+
"outer",
|
| 577 |
+
"partition",
|
| 578 |
+
"permute_dims",
|
| 579 |
+
"pi",
|
| 580 |
+
"positive",
|
| 581 |
+
"pow",
|
| 582 |
+
"power",
|
| 583 |
+
"printoptions",
|
| 584 |
+
"prod",
|
| 585 |
+
"promote_types",
|
| 586 |
+
"ptp",
|
| 587 |
+
"put",
|
| 588 |
+
"putmask",
|
| 589 |
+
"rad2deg",
|
| 590 |
+
"radians",
|
| 591 |
+
"ravel",
|
| 592 |
+
"recarray",
|
| 593 |
+
"reciprocal",
|
| 594 |
+
"record",
|
| 595 |
+
"remainder",
|
| 596 |
+
"repeat",
|
| 597 |
+
"require",
|
| 598 |
+
"reshape",
|
| 599 |
+
"resize",
|
| 600 |
+
"result_type",
|
| 601 |
+
"right_shift",
|
| 602 |
+
"rint",
|
| 603 |
+
"roll",
|
| 604 |
+
"rollaxis",
|
| 605 |
+
"round",
|
| 606 |
+
"sctypeDict",
|
| 607 |
+
"searchsorted",
|
| 608 |
+
"set_printoptions",
|
| 609 |
+
"setbufsize",
|
| 610 |
+
"seterr",
|
| 611 |
+
"seterrcall",
|
| 612 |
+
"shape",
|
| 613 |
+
"shares_memory",
|
| 614 |
+
"short",
|
| 615 |
+
"sign",
|
| 616 |
+
"signbit",
|
| 617 |
+
"signedinteger",
|
| 618 |
+
"sin",
|
| 619 |
+
"single",
|
| 620 |
+
"sinh",
|
| 621 |
+
"size",
|
| 622 |
+
"sort",
|
| 623 |
+
"spacing",
|
| 624 |
+
"sqrt",
|
| 625 |
+
"square",
|
| 626 |
+
"squeeze",
|
| 627 |
+
"stack",
|
| 628 |
+
"std",
|
| 629 |
+
"str_",
|
| 630 |
+
"subtract",
|
| 631 |
+
"sum",
|
| 632 |
+
"swapaxes",
|
| 633 |
+
"take",
|
| 634 |
+
"tan",
|
| 635 |
+
"tanh",
|
| 636 |
+
"tensordot",
|
| 637 |
+
"timedelta64",
|
| 638 |
+
"trace",
|
| 639 |
+
"transpose",
|
| 640 |
+
"true_divide",
|
| 641 |
+
"trunc",
|
| 642 |
+
"typecodes",
|
| 643 |
+
"ubyte",
|
| 644 |
+
"ufunc",
|
| 645 |
+
"uint",
|
| 646 |
+
"uint8",
|
| 647 |
+
"uint16",
|
| 648 |
+
"uint32",
|
| 649 |
+
"uint64",
|
| 650 |
+
"uintc",
|
| 651 |
+
"uintp",
|
| 652 |
+
"ulong",
|
| 653 |
+
"ulonglong",
|
| 654 |
+
"unsignedinteger",
|
| 655 |
+
"unstack",
|
| 656 |
+
"ushort",
|
| 657 |
+
"var",
|
| 658 |
+
"vdot",
|
| 659 |
+
"vecdot",
|
| 660 |
+
"vecmat",
|
| 661 |
+
"void",
|
| 662 |
+
"vstack",
|
| 663 |
+
"where",
|
| 664 |
+
"zeros",
|
| 665 |
+
"zeros_like",
|
| 666 |
+
]
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (6.57 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_add_newdocs.cpython-312.pyc
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:19cc6761d1202bd3598b25f79deb434889e0f380c53b5b5f6abd3b435c3d03ec
|
| 3 |
+
size 209722
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_add_newdocs_scalars.cpython-312.pyc
ADDED
|
Binary file (13.3 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_asarray.cpython-312.pyc
ADDED
|
Binary file (4.27 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_dtype.cpython-312.pyc
ADDED
|
Binary file (13.5 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_dtype_ctypes.cpython-312.pyc
ADDED
|
Binary file (4.82 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_exceptions.cpython-312.pyc
ADDED
|
Binary file (8.29 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_internal.cpython-312.pyc
ADDED
|
Binary file (35.4 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_methods.cpython-312.pyc
ADDED
|
Binary file (11.4 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_string_helpers.cpython-312.pyc
ADDED
|
Binary file (3.29 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_type_aliases.cpython-312.pyc
ADDED
|
Binary file (3.7 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/_ufunc_config.cpython-312.pyc
ADDED
|
Binary file (17.2 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/arrayprint.cpython-312.pyc
ADDED
|
Binary file (72.5 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/defchararray.cpython-312.pyc
ADDED
|
Binary file (42 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/einsumfunc.cpython-312.pyc
ADDED
|
Binary file (55.6 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/fromnumeric.cpython-312.pyc
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:86d17516e12e061c4a81488748c5693b19cb48a1c370fa95d8a023a00ef53d77
|
| 3 |
+
size 149597
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/function_base.cpython-312.pyc
ADDED
|
Binary file (20.8 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/getlimits.cpython-312.pyc
ADDED
|
Binary file (19.2 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/memmap.cpython-312.pyc
ADDED
|
Binary file (13.3 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/multiarray.cpython-312.pyc
ADDED
|
Binary file (57.4 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/numeric.cpython-312.pyc
ADDED
|
Binary file (91.9 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/numerictypes.cpython-312.pyc
ADDED
|
Binary file (17.7 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/overrides.cpython-312.pyc
ADDED
|
Binary file (8.2 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/printoptions.cpython-312.pyc
ADDED
|
Binary file (941 Bytes). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/records.cpython-312.pyc
ADDED
|
Binary file (39.5 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/shape_base.cpython-312.pyc
ADDED
|
Binary file (34.4 kB). View file
|
|
|
loan-advisor-agent/.venv/Lib/site-packages/numpy/_core/__pycache__/strings.cpython-312.pyc
ADDED
|
Binary file (60.1 kB). View file
|
|
|