AntonioJun commited on
Commit
9911fbf
·
verified ·
1 Parent(s): 43e25fc

Add files using upload-large-folder tool

Browse files
Files changed (50) hide show
  1. .ipynb_checkpoints/setup-checkpoint.sh +96 -0
  2. .venv/bin/Activate.ps1 +247 -0
  3. .venv/bin/activate +63 -0
  4. .venv/bin/activate.csh +26 -0
  5. .venv/bin/activate.fish +69 -0
  6. .venv/bin/pip +8 -0
  7. .venv/bin/pip3 +8 -0
  8. .venv/bin/pip3.11 +8 -0
  9. .venv/bin/pygmentize +6 -0
  10. .venv/bin/pygrun +164 -0
  11. .venv/bin/tabulate +6 -0
  12. .venv/bin/tqdm +6 -0
  13. .venv/etc/jupyter/nbconfig/notebook.d/widgetsnbextension.json +5 -0
  14. .venv/lib/python3.11/site-packages/numpy-1.26.1.dist-info/LICENSE.txt +973 -0
  15. .venv/lib/python3.11/site-packages/numpy-1.26.1.dist-info/METADATA +1094 -0
  16. .venv/lib/python3.11/site-packages/numpy-1.26.1.dist-info/RECORD +902 -0
  17. .venv/lib/python3.11/site-packages/numpy-1.26.1.dist-info/WHEEL +6 -0
  18. .venv/lib/python3.11/site-packages/numpy-1.26.1.dist-info/entry_points.txt +9 -0
  19. .venv/lib/python3.11/site-packages/numpy/__config__.py +156 -0
  20. .venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd +1049 -0
  21. .venv/lib/python3.11/site-packages/numpy/__init__.pxd +1014 -0
  22. .venv/lib/python3.11/site-packages/numpy/_pytesttester.py +207 -0
  23. .venv/lib/python3.11/site-packages/numpy/ctypeslib.pyi +251 -0
  24. .venv/lib/python3.11/site-packages/numpy/linalg/__init__.py +80 -0
  25. .venv/lib/python3.11/site-packages/numpy/matlib.py +378 -0
  26. .venv/lib/python3.11/site-packages/retrying.py +346 -0
  27. .venv/lib/python3.11/site-packages/six.py +1003 -0
  28. .venv/lib/python3.11/site-packages/threadpoolctl.py +1292 -0
  29. .venv/lib/python3.11/site-packages/typing_extensions.py +0 -0
  30. .venv/pyvenv.cfg +5 -0
  31. .venv/share/jupyter/nbextensions/jupyter-js-widgets/extension.js +0 -0
  32. .venv/share/jupyter/nbextensions/jupyter-js-widgets/extension.js.LICENSE.txt +17 -0
  33. .venv/share/jupyter/nbextensions/jupyter-js-widgets/extension.js.map +0 -0
  34. data/spatial codes/42899461.json +0 -0
  35. encoder/adapters.py +6 -25
  36. encoder/config.py +0 -7
  37. encoder/run.py +3 -13
  38. inference/__init__.py +1 -0
  39. inference/adapters.py +215 -0
  40. inference/launch.py +160 -0
  41. inference/run.py +57 -0
  42. setup.sh +70 -73
  43. tests/encoder_tests/test_adapters.py +39 -1
  44. tests/encoder_tests/test_geometry_primitives.py +70 -0
  45. tests/encoder_tests/test_launch.py +23 -0
  46. tests/inference_tests/__init__.py +0 -0
  47. tests/inference_tests/conftest.py +9 -0
  48. tests/inference_tests/test_adapter_runtime.py +84 -0
  49. tests/inference_tests/test_gpu_integration.py +37 -0
  50. tests/inference_tests/test_launch_runtime.py +128 -0
.ipynb_checkpoints/setup-checkpoint.sh ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -Eeuo pipefail
3
+
4
+ trap 'echo "ERROR: setup failed at line $LINENO: $BASH_COMMAND" >&2' ERR
5
+
6
+ echo "=== RunPod local-disk setup ==="
7
+
8
+ DATA_ROOT="/root/data"
9
+ MODELS_ROOT="/root/models"
10
+ HF_CACHE="/root/hf-cache"
11
+ HF_TMP="/root/hf-tmp"
12
+ SEGVGGT_DIR="$MODELS_ROOT/SegVGGT"
13
+ REQUIREMENTS="$SEGVGGT_DIR/requirements.txt"
14
+
15
+ mkdir -p "$DATA_ROOT" "$MODELS_ROOT" "$HF_CACHE" "$HF_TMP"
16
+ mkdir -p /workspace/data/spatial_codes /workspace/data/caches
17
+
18
+ echo "Installing system packages..."
19
+ apt-get update
20
+ apt-get install -y git git-lfs ffmpeg rsync python3-pip
21
+
22
+ git lfs install
23
+ python -m pip install --upgrade pip setuptools wheel huggingface_hub
24
+
25
+ if [ ! -d "$DATA_ROOT/thinking-in-space/.git" ]; then
26
+ echo "Cloning thinking-in-space..."
27
+ git clone https://github.com/vision-x-nyu/thinking-in-space.git \
28
+ "$DATA_ROOT/thinking-in-space"
29
+ else
30
+ echo "Updating thinking-in-space..."
31
+ git -C "$DATA_ROOT/thinking-in-space" pull --ff-only
32
+
33
+ if [ ! -d "$DATA_ROOT/VSI-Bench" ] || [ -z "$(ls -A "$DATA_ROOT/VSI-Bench" 2>/dev/null)" ]; then
34
+ echo "Downloading VSI-Bench..."
35
+ mkdir -p "$DATA_ROOT/VSI-Bench"
36
+ HF_HOME="$HF_CACHE" \
37
+ TMPDIR="$HF_TMP" \
38
+ HF_HUB_DISABLE_XET=1 \
39
+ hf download nyu-visionx/VSI-Bench \
40
+ --repo-type dataset \
41
+ --local-dir "$DATA_ROOT/VSI-Bench"
42
+ else
43
+ echo "VSI-Bench already exists; skipping download."
44
+
45
+ if [ ! -d "$SEGVGGT_DIR/.git" ]; then
46
+ echo "Cloning SegVGGT..."
47
+ git clone https://github.com/IDEA-Research/SegVGGT.git "$SEGVGGT_DIR"
48
+ else
49
+ echo "Updating existing SegVGGT checkout..."
50
+ git -C "$SEGVGGT_DIR" fetch origin
51
+ git -C "$SEGVGGT_DIR" pull --ff-only
52
+
53
+ if [ ! -f "$REQUIREMENTS" ]; then
54
+ exit 1
55
+
56
+ echo "----- requirements.txt -----"
57
+ cat "$REQUIREMENTS"
58
+ echo "----------------------------"
59
+
60
+ echo "Recreating isolated Python environment..."
61
+ VENV="/workspace/.venv"
62
+ rm -rf "$VENV"
63
+ /usr/bin/python3 -m venv --system-site-packages "$VENV"
64
+ "$VENV/bin/python" -m pip install --upgrade pip setuptools wheel
65
+ echo "Installing every SegVGGT requirement..."
66
+ "$VENV/bin/python" -m pip install --no-cache-dir --ignore-installed -r "$REQUIREMENTS"
67
+
68
+ CHECKPOINT="$SEGVGGT_DIR/checkpoint/segvggt_scannet200.pt"
69
+
70
+ if [ ! -f "$CHECKPOINT" ]; then
71
+ echo "Downloading SegVGGT ScanNet200 checkpoint..."
72
+ HF_HOME="$HF_CACHE" \
73
+ TMPDIR="$HF_TMP" \
74
+ HF_HUB_DISABLE_XET=1 \
75
+ hf download JinyuanQu/SegVGGT \
76
+ checkpoint/segvggt_scannet200.pt \
77
+ --repo-type model \
78
+ --local-dir "$SEGVGGT_DIR"
79
+ else
80
+ echo "SegVGGT checkpoint already exists; skipping download."
81
+
82
+ echo "Creating compatibility symlinks..."
83
+ ln -sfn "$DATA_ROOT/thinking-in-space" /workspace/data/thinking-in-space
84
+ ln -sfn "$DATA_ROOT/VSI-Bench" /workspace/data/VSI-Bench
85
+
86
+ else
87
+
88
+ echo
89
+ echo "=== Setup complete ==="
90
+ echo "thinking-in-space: $DATA_ROOT/thinking-in-space"
91
+ echo "VSI-Bench: $DATA_ROOT/VSI-Bench"
92
+ echo "SegVGGT: $SEGVGGT_DIR"
93
+ echo "Requirements: $REQUIREMENTS"
94
+ echo "Checkpoint: $CHECKPOINT"
95
+ echo
96
+ df -h /
.venv/bin/Activate.ps1 ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <#
2
+ .Synopsis
3
+ Activate a Python virtual environment for the current PowerShell session.
4
+
5
+ .Description
6
+ Pushes the python executable for a virtual environment to the front of the
7
+ $Env:PATH environment variable and sets the prompt to signify that you are
8
+ in a Python virtual environment. Makes use of the command line switches as
9
+ well as the `pyvenv.cfg` file values present in the virtual environment.
10
+
11
+ .Parameter VenvDir
12
+ Path to the directory that contains the virtual environment to activate. The
13
+ default value for this is the parent of the directory that the Activate.ps1
14
+ script is located within.
15
+
16
+ .Parameter Prompt
17
+ The prompt prefix to display when this virtual environment is activated. By
18
+ default, this prompt is the name of the virtual environment folder (VenvDir)
19
+ surrounded by parentheses and followed by a single space (ie. '(.venv) ').
20
+
21
+ .Example
22
+ Activate.ps1
23
+ Activates the Python virtual environment that contains the Activate.ps1 script.
24
+
25
+ .Example
26
+ Activate.ps1 -Verbose
27
+ Activates the Python virtual environment that contains the Activate.ps1 script,
28
+ and shows extra information about the activation as it executes.
29
+
30
+ .Example
31
+ Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv
32
+ Activates the Python virtual environment located in the specified location.
33
+
34
+ .Example
35
+ Activate.ps1 -Prompt "MyPython"
36
+ Activates the Python virtual environment that contains the Activate.ps1 script,
37
+ and prefixes the current prompt with the specified string (surrounded in
38
+ parentheses) while the virtual environment is active.
39
+
40
+ .Notes
41
+ On Windows, it may be required to enable this Activate.ps1 script by setting the
42
+ execution policy for the user. You can do this by issuing the following PowerShell
43
+ command:
44
+
45
+ PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
46
+
47
+ For more information on Execution Policies:
48
+ https://go.microsoft.com/fwlink/?LinkID=135170
49
+
50
+ #>
51
+ Param(
52
+ [Parameter(Mandatory = $false)]
53
+ [String]
54
+ $VenvDir,
55
+ [Parameter(Mandatory = $false)]
56
+ [String]
57
+ $Prompt
58
+ )
59
+
60
+ <# Function declarations --------------------------------------------------- #>
61
+
62
+ <#
63
+ .Synopsis
64
+ Remove all shell session elements added by the Activate script, including the
65
+ addition of the virtual environment's Python executable from the beginning of
66
+ the PATH variable.
67
+
68
+ .Parameter NonDestructive
69
+ If present, do not remove this function from the global namespace for the
70
+ session.
71
+
72
+ #>
73
+ function global:deactivate ([switch]$NonDestructive) {
74
+ # Revert to original values
75
+
76
+ # The prior prompt:
77
+ if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) {
78
+ Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt
79
+ Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT
80
+ }
81
+
82
+ # The prior PYTHONHOME:
83
+ if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) {
84
+ Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME
85
+ Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME
86
+ }
87
+
88
+ # The prior PATH:
89
+ if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) {
90
+ Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH
91
+ Remove-Item -Path Env:_OLD_VIRTUAL_PATH
92
+ }
93
+
94
+ # Just remove the VIRTUAL_ENV altogether:
95
+ if (Test-Path -Path Env:VIRTUAL_ENV) {
96
+ Remove-Item -Path env:VIRTUAL_ENV
97
+ }
98
+
99
+ # Just remove VIRTUAL_ENV_PROMPT altogether.
100
+ if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) {
101
+ Remove-Item -Path env:VIRTUAL_ENV_PROMPT
102
+ }
103
+
104
+ # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether:
105
+ if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) {
106
+ Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force
107
+ }
108
+
109
+ # Leave deactivate function in the global namespace if requested:
110
+ if (-not $NonDestructive) {
111
+ Remove-Item -Path function:deactivate
112
+ }
113
+ }
114
+
115
+ <#
116
+ .Description
117
+ Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the
118
+ given folder, and returns them in a map.
119
+
120
+ For each line in the pyvenv.cfg file, if that line can be parsed into exactly
121
+ two strings separated by `=` (with any amount of whitespace surrounding the =)
122
+ then it is considered a `key = value` line. The left hand string is the key,
123
+ the right hand is the value.
124
+
125
+ If the value starts with a `'` or a `"` then the first and last character is
126
+ stripped from the value before being captured.
127
+
128
+ .Parameter ConfigDir
129
+ Path to the directory that contains the `pyvenv.cfg` file.
130
+ #>
131
+ function Get-PyVenvConfig(
132
+ [String]
133
+ $ConfigDir
134
+ ) {
135
+ Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg"
136
+
137
+ # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue).
138
+ $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue
139
+
140
+ # An empty map will be returned if no config file is found.
141
+ $pyvenvConfig = @{ }
142
+
143
+ if ($pyvenvConfigPath) {
144
+
145
+ Write-Verbose "File exists, parse `key = value` lines"
146
+ $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath
147
+
148
+ $pyvenvConfigContent | ForEach-Object {
149
+ $keyval = $PSItem -split "\s*=\s*", 2
150
+ if ($keyval[0] -and $keyval[1]) {
151
+ $val = $keyval[1]
152
+
153
+ # Remove extraneous quotations around a string value.
154
+ if ("'""".Contains($val.Substring(0, 1))) {
155
+ $val = $val.Substring(1, $val.Length - 2)
156
+ }
157
+
158
+ $pyvenvConfig[$keyval[0]] = $val
159
+ Write-Verbose "Adding Key: '$($keyval[0])'='$val'"
160
+ }
161
+ }
162
+ }
163
+ return $pyvenvConfig
164
+ }
165
+
166
+
167
+ <# Begin Activate script --------------------------------------------------- #>
168
+
169
+ # Determine the containing directory of this script
170
+ $VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
171
+ $VenvExecDir = Get-Item -Path $VenvExecPath
172
+
173
+ Write-Verbose "Activation script is located in path: '$VenvExecPath'"
174
+ Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)"
175
+ Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)"
176
+
177
+ # Set values required in priority: CmdLine, ConfigFile, Default
178
+ # First, get the location of the virtual environment, it might not be
179
+ # VenvExecDir if specified on the command line.
180
+ if ($VenvDir) {
181
+ Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values"
182
+ }
183
+ else {
184
+ Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir."
185
+ $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/")
186
+ Write-Verbose "VenvDir=$VenvDir"
187
+ }
188
+
189
+ # Next, read the `pyvenv.cfg` file to determine any required value such
190
+ # as `prompt`.
191
+ $pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir
192
+
193
+ # Next, set the prompt from the command line, or the config file, or
194
+ # just use the name of the virtual environment folder.
195
+ if ($Prompt) {
196
+ Write-Verbose "Prompt specified as argument, using '$Prompt'"
197
+ }
198
+ else {
199
+ Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value"
200
+ if ($pyvenvCfg -and $pyvenvCfg['prompt']) {
201
+ Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'"
202
+ $Prompt = $pyvenvCfg['prompt'];
203
+ }
204
+ else {
205
+ Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)"
206
+ Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'"
207
+ $Prompt = Split-Path -Path $venvDir -Leaf
208
+ }
209
+ }
210
+
211
+ Write-Verbose "Prompt = '$Prompt'"
212
+ Write-Verbose "VenvDir='$VenvDir'"
213
+
214
+ # Deactivate any currently active virtual environment, but leave the
215
+ # deactivate function in place.
216
+ deactivate -nondestructive
217
+
218
+ # Now set the environment variable VIRTUAL_ENV, used by many tools to determine
219
+ # that there is an activated venv.
220
+ $env:VIRTUAL_ENV = $VenvDir
221
+
222
+ if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) {
223
+
224
+ Write-Verbose "Setting prompt to '$Prompt'"
225
+
226
+ # Set the prompt to include the env name
227
+ # Make sure _OLD_VIRTUAL_PROMPT is global
228
+ function global:_OLD_VIRTUAL_PROMPT { "" }
229
+ Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT
230
+ New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt
231
+
232
+ function global:prompt {
233
+ Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) "
234
+ _OLD_VIRTUAL_PROMPT
235
+ }
236
+ $env:VIRTUAL_ENV_PROMPT = $Prompt
237
+ }
238
+
239
+ # Clear PYTHONHOME
240
+ if (Test-Path -Path Env:PYTHONHOME) {
241
+ Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME
242
+ Remove-Item -Path Env:PYTHONHOME
243
+ }
244
+
245
+ # Add the venv to the PATH
246
+ Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH
247
+ $Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH"
.venv/bin/activate ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file must be used with "source bin/activate" *from bash*
2
+ # you cannot run it directly
3
+
4
+ deactivate () {
5
+ # reset old environment variables
6
+ if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
7
+ PATH="${_OLD_VIRTUAL_PATH:-}"
8
+ export PATH
9
+ unset _OLD_VIRTUAL_PATH
10
+ fi
11
+ if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
12
+ PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
13
+ export PYTHONHOME
14
+ unset _OLD_VIRTUAL_PYTHONHOME
15
+ fi
16
+
17
+ # Call hash to forget past commands. Without forgetting
18
+ # past commands the $PATH changes we made may not be respected
19
+ hash -r 2> /dev/null
20
+
21
+ if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
22
+ PS1="${_OLD_VIRTUAL_PS1:-}"
23
+ export PS1
24
+ unset _OLD_VIRTUAL_PS1
25
+ fi
26
+
27
+ unset VIRTUAL_ENV
28
+ unset VIRTUAL_ENV_PROMPT
29
+ if [ ! "${1:-}" = "nondestructive" ] ; then
30
+ # Self destruct!
31
+ unset -f deactivate
32
+ fi
33
+ }
34
+
35
+ # unset irrelevant variables
36
+ deactivate nondestructive
37
+
38
+ VIRTUAL_ENV="/workspace/.venv"
39
+ export VIRTUAL_ENV
40
+
41
+ _OLD_VIRTUAL_PATH="$PATH"
42
+ PATH="$VIRTUAL_ENV/bin:$PATH"
43
+ export PATH
44
+
45
+ # unset PYTHONHOME if set
46
+ # this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
47
+ # could use `if (set -u; : $PYTHONHOME) ;` in bash
48
+ if [ -n "${PYTHONHOME:-}" ] ; then
49
+ _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
50
+ unset PYTHONHOME
51
+ fi
52
+
53
+ if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
54
+ _OLD_VIRTUAL_PS1="${PS1:-}"
55
+ PS1="(.venv) ${PS1:-}"
56
+ export PS1
57
+ VIRTUAL_ENV_PROMPT="(.venv) "
58
+ export VIRTUAL_ENV_PROMPT
59
+ fi
60
+
61
+ # Call hash to forget past commands. Without forgetting
62
+ # past commands the $PATH changes we made may not be respected
63
+ hash -r 2> /dev/null
.venv/bin/activate.csh ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file must be used with "source bin/activate.csh" *from csh*.
2
+ # You cannot run it directly.
3
+ # Created by Davide Di Blasi <davidedb@gmail.com>.
4
+ # Ported to Python 3.3 venv by Andrew Svetlov <andrew.svetlov@gmail.com>
5
+
6
+ alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate'
7
+
8
+ # Unset irrelevant variables.
9
+ deactivate nondestructive
10
+
11
+ setenv VIRTUAL_ENV "/workspace/.venv"
12
+
13
+ set _OLD_VIRTUAL_PATH="$PATH"
14
+ setenv PATH "$VIRTUAL_ENV/bin:$PATH"
15
+
16
+
17
+ set _OLD_VIRTUAL_PROMPT="$prompt"
18
+
19
+ if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
20
+ set prompt = "(.venv) $prompt"
21
+ setenv VIRTUAL_ENV_PROMPT "(.venv) "
22
+ endif
23
+
24
+ alias pydoc python -m pydoc
25
+
26
+ rehash
.venv/bin/activate.fish ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file must be used with "source <venv>/bin/activate.fish" *from fish*
2
+ # (https://fishshell.com/); you cannot run it directly.
3
+
4
+ function deactivate -d "Exit virtual environment and return to normal shell environment"
5
+ # reset old environment variables
6
+ if test -n "$_OLD_VIRTUAL_PATH"
7
+ set -gx PATH $_OLD_VIRTUAL_PATH
8
+ set -e _OLD_VIRTUAL_PATH
9
+ end
10
+ if test -n "$_OLD_VIRTUAL_PYTHONHOME"
11
+ set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME
12
+ set -e _OLD_VIRTUAL_PYTHONHOME
13
+ end
14
+
15
+ if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
16
+ set -e _OLD_FISH_PROMPT_OVERRIDE
17
+ # prevents error when using nested fish instances (Issue #93858)
18
+ if functions -q _old_fish_prompt
19
+ functions -e fish_prompt
20
+ functions -c _old_fish_prompt fish_prompt
21
+ functions -e _old_fish_prompt
22
+ end
23
+ end
24
+
25
+ set -e VIRTUAL_ENV
26
+ set -e VIRTUAL_ENV_PROMPT
27
+ if test "$argv[1]" != "nondestructive"
28
+ # Self-destruct!
29
+ functions -e deactivate
30
+ end
31
+ end
32
+
33
+ # Unset irrelevant variables.
34
+ deactivate nondestructive
35
+
36
+ set -gx VIRTUAL_ENV "/workspace/.venv"
37
+
38
+ set -gx _OLD_VIRTUAL_PATH $PATH
39
+ set -gx PATH "$VIRTUAL_ENV/bin" $PATH
40
+
41
+ # Unset PYTHONHOME if set.
42
+ if set -q PYTHONHOME
43
+ set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME
44
+ set -e PYTHONHOME
45
+ end
46
+
47
+ if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
48
+ # fish uses a function instead of an env var to generate the prompt.
49
+
50
+ # Save the current fish_prompt function as the function _old_fish_prompt.
51
+ functions -c fish_prompt _old_fish_prompt
52
+
53
+ # With the original prompt function renamed, we can override with our own.
54
+ function fish_prompt
55
+ # Save the return status of the last command.
56
+ set -l old_status $status
57
+
58
+ # Output the venv prompt; color taken from the blue of the Python logo.
59
+ printf "%s%s%s" (set_color 4B8BBE) "(.venv) " (set_color normal)
60
+
61
+ # Restore the return status of the previous command.
62
+ echo "exit $old_status" | .
63
+ # Output the original/"old" prompt.
64
+ _old_fish_prompt
65
+ end
66
+
67
+ set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
68
+ set -gx VIRTUAL_ENV_PROMPT "(.venv) "
69
+ end
.venv/bin/pip ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/workspace/.venv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from pip._internal.cli.main import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
.venv/bin/pip3 ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/workspace/.venv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from pip._internal.cli.main import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
.venv/bin/pip3.11 ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/workspace/.venv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from pip._internal.cli.main import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
.venv/bin/pygmentize ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/workspace/.venv/bin/python
2
+ import sys
3
+ from pygments.cmdline import main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(main())
.venv/bin/pygrun ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/workspace/.venv/bin/python
2
+ __author__ = 'jszheng'
3
+ import optparse
4
+ import sys
5
+ import os
6
+ import importlib
7
+ from antlr4 import *
8
+
9
+
10
+ # this is a python version of TestRig
11
+ def beautify_lisp_string(in_string):
12
+ indent_size = 3
13
+ add_indent = ' '*indent_size
14
+ out_string = in_string[0] # no indent for 1st (
15
+ indent = ''
16
+ for i in range(1, len(in_string)):
17
+ if in_string[i] == '(' and in_string[i+1] != ' ':
18
+ indent += add_indent
19
+ out_string += "\n" + indent + '('
20
+ elif in_string[i] == ')':
21
+ out_string += ')'
22
+ if len(indent) > 0:
23
+ indent = indent.replace(add_indent, '', 1)
24
+ else:
25
+ out_string += in_string[i]
26
+ return out_string
27
+
28
+
29
+ if __name__ == '__main__':
30
+
31
+ #############################################################
32
+ # parse options
33
+ # not support -gui -encoding -ps
34
+ #############################################################
35
+ usage = "Usage: %prog [options] Grammar_Name Start_Rule"
36
+ parser = optparse.OptionParser(usage=usage)
37
+ # parser.add_option('-t', '--tree',
38
+ # dest="out_file",
39
+ # default="default.out",
40
+ # help='set output file name',
41
+ # )
42
+ parser.add_option('-t', '--tree',
43
+ default=False,
44
+ action='store_true',
45
+ help='Print AST tree'
46
+ )
47
+ parser.add_option('-k', '--tokens',
48
+ dest="token",
49
+ default=False,
50
+ action='store_true',
51
+ help='Show Tokens'
52
+ )
53
+ parser.add_option('-s', '--sll',
54
+ dest="sll",
55
+ default=False,
56
+ action='store_true',
57
+ help='Show SLL'
58
+ )
59
+ parser.add_option('-d', '--diagnostics',
60
+ dest="diagnostics",
61
+ default=False,
62
+ action='store_true',
63
+ help='Enable diagnostics error listener'
64
+ )
65
+ parser.add_option('-a', '--trace',
66
+ dest="trace",
67
+ default=False,
68
+ action='store_true',
69
+ help='Enable Trace'
70
+ )
71
+
72
+ options, remainder = parser.parse_args()
73
+ if len(remainder) < 2:
74
+ print('ERROR: You have to provide at least 2 arguments!')
75
+ parser.print_help()
76
+ exit(1)
77
+ else:
78
+ grammar = remainder.pop(0)
79
+ start_rule = remainder.pop(0)
80
+ file_list = remainder
81
+
82
+ #############################################################
83
+ # check and load antlr generated files
84
+ #############################################################
85
+ # dynamic load the module and class
86
+ lexerName = grammar + 'Lexer'
87
+ parserName = grammar + 'Parser'
88
+ # check if the generate file exist
89
+ lexer_file = lexerName + '.py'
90
+ parser_file = parserName + '.py'
91
+ if not os.path.exists(lexer_file):
92
+ print("[ERROR] Can't find lexer file {}!".format(lexer_file))
93
+ print(os.path.realpath('.'))
94
+ exit(1)
95
+ if not os.path.exists(parser_file):
96
+ print("[ERROR] Can't find parser file {}!".format(lexer_file))
97
+ print(os.path.realpath('.'))
98
+ exit(1)
99
+
100
+ # current directory is where the generated file loaded
101
+ # the script might be in different place.
102
+ sys.path.append('.')
103
+ # print(sys.path)
104
+
105
+ # print("Load Lexer {}".format(lexerName))
106
+ module_lexer = __import__(lexerName, globals(), locals(), lexerName)
107
+ class_lexer = getattr(module_lexer, lexerName)
108
+ # print(class_lexer)
109
+
110
+ # print("Load Parser {}".format(parserName))
111
+ module_parser = __import__(parserName, globals(), locals(), parserName)
112
+ class_parser = getattr(module_parser, parserName)
113
+ # print(class_parser)
114
+
115
+ #############################################################
116
+ # main process steps.
117
+ #############################################################
118
+ def process(input_stream, class_lexer, class_parser):
119
+ lexer = class_lexer(input_stream)
120
+ token_stream = CommonTokenStream(lexer)
121
+ token_stream.fill()
122
+ if options.token: # need to show token
123
+ for tok in token_stream.tokens:
124
+ print(tok)
125
+ if start_rule == 'tokens':
126
+ return
127
+
128
+ parser = class_parser(token_stream)
129
+
130
+ if options.diagnostics:
131
+ parser.addErrorListener(DiagnosticErrorListener())
132
+ parser._interp.predictionMode = PredictionMode.LL_EXACT_AMBIG_DETECTION
133
+ if options.tree:
134
+ parser.buildParseTrees = True
135
+ if options.sll:
136
+ parser._interp.predictionMode = PredictionMode.SLL
137
+ #parser.setTokenStream(token_stream)
138
+ parser.setTrace(options.trace)
139
+ if hasattr(parser, start_rule):
140
+ func_start_rule = getattr(parser, start_rule)
141
+ parser_ret = func_start_rule()
142
+ if options.tree:
143
+ lisp_tree_str = parser_ret.toStringTree(recog=parser)
144
+ print(beautify_lisp_string(lisp_tree_str))
145
+ else:
146
+ print("[ERROR] Can't find start rule '{}' in parser '{}'".format(start_rule, parserName))
147
+
148
+ #############################################################
149
+ # use stdin if not provide file as input stream
150
+ #############################################################
151
+ if len(file_list) == 0:
152
+ input_stream = InputStream(sys.stdin.read())
153
+ process(input_stream, class_lexer, class_parser)
154
+ exit(0)
155
+
156
+ #############################################################
157
+ # iterate all input file
158
+ #############################################################
159
+ for file_name in file_list:
160
+ if os.path.exists(file_name) and os.path.isfile(file_name):
161
+ input_stream = FileStream(file_name)
162
+ process(input_stream, class_lexer, class_parser)
163
+ else:
164
+ print("[ERROR] file {} not exist".format(os.path.normpath(file_name)))
.venv/bin/tabulate ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/workspace/.venv/bin/python
2
+ import sys
3
+ from tabulate import _main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(_main())
.venv/bin/tqdm ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/workspace/.venv/bin/python
2
+ import sys
3
+ from tqdm.cli import main
4
+ if __name__ == '__main__':
5
+ sys.argv[0] = sys.argv[0].removesuffix('.exe')
6
+ sys.exit(main())
.venv/etc/jupyter/nbconfig/notebook.d/widgetsnbextension.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "load_extensions": {
3
+ "jupyter-js-widgets/extension": true
4
+ }
5
+ }
.venv/lib/python3.11/site-packages/numpy-1.26.1.dist-info/LICENSE.txt ADDED
@@ -0,0 +1,973 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2005-2023, NumPy Developers.
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are
6
+ met:
7
+
8
+ * Redistributions of source code must retain the above copyright
9
+ notice, this list of conditions and the following disclaimer.
10
+
11
+ * Redistributions in binary form must reproduce the above
12
+ copyright notice, this list of conditions and the following
13
+ disclaimer in the documentation and/or other materials provided
14
+ with the distribution.
15
+
16
+ * Neither the name of the NumPy Developers nor the names of any
17
+ contributors may be used to endorse or promote products derived
18
+ from this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ The NumPy repository and source distributions bundle several libraries that are
32
+ compatibly licensed. We list these here.
33
+
34
+ Name: lapack-lite
35
+ Files: numpy/linalg/lapack_lite/*
36
+ License: BSD-3-Clause
37
+ For details, see numpy/linalg/lapack_lite/LICENSE.txt
38
+
39
+ Name: tempita
40
+ Files: tools/npy_tempita/*
41
+ License: MIT
42
+ For details, see tools/npy_tempita/license.txt
43
+
44
+ Name: dragon4
45
+ Files: numpy/core/src/multiarray/dragon4.c
46
+ License: MIT
47
+ For license text, see numpy/core/src/multiarray/dragon4.c
48
+
49
+ Name: libdivide
50
+ Files: numpy/core/include/numpy/libdivide/*
51
+ License: Zlib
52
+ For license text, see numpy/core/include/numpy/libdivide/LICENSE.txt
53
+
54
+
55
+ Note that the following files are vendored in the repository and sdist but not
56
+ installed in built numpy packages:
57
+
58
+ Name: Meson
59
+ Files: vendored-meson/meson/*
60
+ License: Apache 2.0
61
+ For license text, see vendored-meson/meson/COPYING
62
+
63
+ Name: meson-python
64
+ Files: vendored-meson/meson-python/*
65
+ License: MIT
66
+ For license text, see vendored-meson/meson-python/LICENSE
67
+
68
+ Name: spin
69
+ Files: .spin/cmds.py
70
+ License: BSD-3
71
+ For license text, see .spin/LICENSE
72
+
73
+ ----
74
+
75
+ This binary distribution of NumPy also bundles the following software:
76
+
77
+
78
+ Name: OpenBLAS
79
+ Files: numpy.libs/libopenblas*.so
80
+ Description: bundled as a dynamically linked library
81
+ Availability: https://github.com/OpenMathLib/OpenBLAS/
82
+ License: BSD-3-Clause-Attribution
83
+ Copyright (c) 2011-2014, The OpenBLAS Project
84
+ All rights reserved.
85
+
86
+ Redistribution and use in source and binary forms, with or without
87
+ modification, are permitted provided that the following conditions are
88
+ met:
89
+
90
+ 1. Redistributions of source code must retain the above copyright
91
+ notice, this list of conditions and the following disclaimer.
92
+
93
+ 2. Redistributions in binary form must reproduce the above copyright
94
+ notice, this list of conditions and the following disclaimer in
95
+ the documentation and/or other materials provided with the
96
+ distribution.
97
+ 3. Neither the name of the OpenBLAS project nor the names of
98
+ its contributors may be used to endorse or promote products
99
+ derived from this software without specific prior written
100
+ permission.
101
+
102
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
103
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
104
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
105
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
106
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
107
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
108
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
109
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
110
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
111
+ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
112
+
113
+
114
+ Name: LAPACK
115
+ Files: numpy.libs/libopenblas*.so
116
+ Description: bundled in OpenBLAS
117
+ Availability: https://github.com/OpenMathLib/OpenBLAS/
118
+ License: BSD-3-Clause-Attribution
119
+ Copyright (c) 1992-2013 The University of Tennessee and The University
120
+ of Tennessee Research Foundation. All rights
121
+ reserved.
122
+ Copyright (c) 2000-2013 The University of California Berkeley. All
123
+ rights reserved.
124
+ Copyright (c) 2006-2013 The University of Colorado Denver. All rights
125
+ reserved.
126
+
127
+ $COPYRIGHT$
128
+
129
+ Additional copyrights may follow
130
+
131
+ $HEADER$
132
+
133
+ Redistribution and use in source and binary forms, with or without
134
+ modification, are permitted provided that the following conditions are
135
+ met:
136
+
137
+ - Redistributions of source code must retain the above copyright
138
+ notice, this list of conditions and the following disclaimer.
139
+
140
+ - Redistributions in binary form must reproduce the above copyright
141
+ notice, this list of conditions and the following disclaimer listed
142
+ in this license in the documentation and/or other materials
143
+ provided with the distribution.
144
+
145
+ - Neither the name of the copyright holders nor the names of its
146
+ contributors may be used to endorse or promote products derived from
147
+ this software without specific prior written permission.
148
+
149
+ The copyright holders provide no reassurances that the source code
150
+ provided does not infringe any patent, copyright, or any other
151
+ intellectual property rights of third parties. The copyright holders
152
+ disclaim any liability to any recipient for claims brought against
153
+ recipient by any third party for infringement of that parties
154
+ intellectual property rights.
155
+
156
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
157
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
158
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
159
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
160
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
161
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
162
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
163
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
164
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
165
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
166
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
167
+
168
+
169
+ Name: GCC runtime library
170
+ Files: numpy.libs/libgfortran*.so
171
+ Description: dynamically linked to files compiled with gcc
172
+ Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libgfortran
173
+ License: GPL-3.0-with-GCC-exception
174
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
175
+
176
+ Libgfortran is free software; you can redistribute it and/or modify
177
+ it under the terms of the GNU General Public License as published by
178
+ the Free Software Foundation; either version 3, or (at your option)
179
+ any later version.
180
+
181
+ Libgfortran is distributed in the hope that it will be useful,
182
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
183
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
184
+ GNU General Public License for more details.
185
+
186
+ Under Section 7 of GPL version 3, you are granted additional
187
+ permissions described in the GCC Runtime Library Exception, version
188
+ 3.1, as published by the Free Software Foundation.
189
+
190
+ You should have received a copy of the GNU General Public License and
191
+ a copy of the GCC Runtime Library Exception along with this program;
192
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
193
+ <http://www.gnu.org/licenses/>.
194
+
195
+ ----
196
+
197
+ Full text of license texts referred to above follows (that they are
198
+ listed below does not necessarily imply the conditions apply to the
199
+ present binary release):
200
+
201
+ ----
202
+
203
+ GCC RUNTIME LIBRARY EXCEPTION
204
+
205
+ Version 3.1, 31 March 2009
206
+
207
+ Copyright (C) 2009 Free Software Foundation, Inc. <http://fsf.org/>
208
+
209
+ Everyone is permitted to copy and distribute verbatim copies of this
210
+ license document, but changing it is not allowed.
211
+
212
+ This GCC Runtime Library Exception ("Exception") is an additional
213
+ permission under section 7 of the GNU General Public License, version
214
+ 3 ("GPLv3"). It applies to a given file (the "Runtime Library") that
215
+ bears a notice placed by the copyright holder of the file stating that
216
+ the file is governed by GPLv3 along with this Exception.
217
+
218
+ When you use GCC to compile a program, GCC may combine portions of
219
+ certain GCC header files and runtime libraries with the compiled
220
+ program. The purpose of this Exception is to allow compilation of
221
+ non-GPL (including proprietary) programs to use, in this way, the
222
+ header files and runtime libraries covered by this Exception.
223
+
224
+ 0. Definitions.
225
+
226
+ A file is an "Independent Module" if it either requires the Runtime
227
+ Library for execution after a Compilation Process, or makes use of an
228
+ interface provided by the Runtime Library, but is not otherwise based
229
+ on the Runtime Library.
230
+
231
+ "GCC" means a version of the GNU Compiler Collection, with or without
232
+ modifications, governed by version 3 (or a specified later version) of
233
+ the GNU General Public License (GPL) with the option of using any
234
+ subsequent versions published by the FSF.
235
+
236
+ "GPL-compatible Software" is software whose conditions of propagation,
237
+ modification and use would permit combination with GCC in accord with
238
+ the license of GCC.
239
+
240
+ "Target Code" refers to output from any compiler for a real or virtual
241
+ target processor architecture, in executable form or suitable for
242
+ input to an assembler, loader, linker and/or execution
243
+ phase. Notwithstanding that, Target Code does not include data in any
244
+ format that is used as a compiler intermediate representation, or used
245
+ for producing a compiler intermediate representation.
246
+
247
+ The "Compilation Process" transforms code entirely represented in
248
+ non-intermediate languages designed for human-written code, and/or in
249
+ Java Virtual Machine byte code, into Target Code. Thus, for example,
250
+ use of source code generators and preprocessors need not be considered
251
+ part of the Compilation Process, since the Compilation Process can be
252
+ understood as starting with the output of the generators or
253
+ preprocessors.
254
+
255
+ A Compilation Process is "Eligible" if it is done using GCC, alone or
256
+ with other GPL-compatible software, or if it is done without using any
257
+ work based on GCC. For example, using non-GPL-compatible Software to
258
+ optimize any GCC intermediate representations would not qualify as an
259
+ Eligible Compilation Process.
260
+
261
+ 1. Grant of Additional Permission.
262
+
263
+ You have permission to propagate a work of Target Code formed by
264
+ combining the Runtime Library with Independent Modules, even if such
265
+ propagation would otherwise violate the terms of GPLv3, provided that
266
+ all Target Code was generated by Eligible Compilation Processes. You
267
+ may then convey such a combination under terms of your choice,
268
+ consistent with the licensing of the Independent Modules.
269
+
270
+ 2. No Weakening of GCC Copyleft.
271
+
272
+ The availability of this Exception does not imply any general
273
+ presumption that third-party software is unaffected by the copyleft
274
+ requirements of the license of GCC.
275
+
276
+ ----
277
+
278
+ GNU GENERAL PUBLIC LICENSE
279
+ Version 3, 29 June 2007
280
+
281
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
282
+ Everyone is permitted to copy and distribute verbatim copies
283
+ of this license document, but changing it is not allowed.
284
+
285
+ Preamble
286
+
287
+ The GNU General Public License is a free, copyleft license for
288
+ software and other kinds of works.
289
+
290
+ The licenses for most software and other practical works are designed
291
+ to take away your freedom to share and change the works. By contrast,
292
+ the GNU General Public License is intended to guarantee your freedom to
293
+ share and change all versions of a program--to make sure it remains free
294
+ software for all its users. We, the Free Software Foundation, use the
295
+ GNU General Public License for most of our software; it applies also to
296
+ any other work released this way by its authors. You can apply it to
297
+ your programs, too.
298
+
299
+ When we speak of free software, we are referring to freedom, not
300
+ price. Our General Public Licenses are designed to make sure that you
301
+ have the freedom to distribute copies of free software (and charge for
302
+ them if you wish), that you receive source code or can get it if you
303
+ want it, that you can change the software or use pieces of it in new
304
+ free programs, and that you know you can do these things.
305
+
306
+ To protect your rights, we need to prevent others from denying you
307
+ these rights or asking you to surrender the rights. Therefore, you have
308
+ certain responsibilities if you distribute copies of the software, or if
309
+ you modify it: responsibilities to respect the freedom of others.
310
+
311
+ For example, if you distribute copies of such a program, whether
312
+ gratis or for a fee, you must pass on to the recipients the same
313
+ freedoms that you received. You must make sure that they, too, receive
314
+ or can get the source code. And you must show them these terms so they
315
+ know their rights.
316
+
317
+ Developers that use the GNU GPL protect your rights with two steps:
318
+ (1) assert copyright on the software, and (2) offer you this License
319
+ giving you legal permission to copy, distribute and/or modify it.
320
+
321
+ For the developers' and authors' protection, the GPL clearly explains
322
+ that there is no warranty for this free software. For both users' and
323
+ authors' sake, the GPL requires that modified versions be marked as
324
+ changed, so that their problems will not be attributed erroneously to
325
+ authors of previous versions.
326
+
327
+ Some devices are designed to deny users access to install or run
328
+ modified versions of the software inside them, although the manufacturer
329
+ can do so. This is fundamentally incompatible with the aim of
330
+ protecting users' freedom to change the software. The systematic
331
+ pattern of such abuse occurs in the area of products for individuals to
332
+ use, which is precisely where it is most unacceptable. Therefore, we
333
+ have designed this version of the GPL to prohibit the practice for those
334
+ products. If such problems arise substantially in other domains, we
335
+ stand ready to extend this provision to those domains in future versions
336
+ of the GPL, as needed to protect the freedom of users.
337
+
338
+ Finally, every program is threatened constantly by software patents.
339
+ States should not allow patents to restrict development and use of
340
+ software on general-purpose computers, but in those that do, we wish to
341
+ avoid the special danger that patents applied to a free program could
342
+ make it effectively proprietary. To prevent this, the GPL assures that
343
+ patents cannot be used to render the program non-free.
344
+
345
+ The precise terms and conditions for copying, distribution and
346
+ modification follow.
347
+
348
+ TERMS AND CONDITIONS
349
+
350
+ 0. Definitions.
351
+
352
+ "This License" refers to version 3 of the GNU General Public License.
353
+
354
+ "Copyright" also means copyright-like laws that apply to other kinds of
355
+ works, such as semiconductor masks.
356
+
357
+ "The Program" refers to any copyrightable work licensed under this
358
+ License. Each licensee is addressed as "you". "Licensees" and
359
+ "recipients" may be individuals or organizations.
360
+
361
+ To "modify" a work means to copy from or adapt all or part of the work
362
+ in a fashion requiring copyright permission, other than the making of an
363
+ exact copy. The resulting work is called a "modified version" of the
364
+ earlier work or a work "based on" the earlier work.
365
+
366
+ A "covered work" means either the unmodified Program or a work based
367
+ on the Program.
368
+
369
+ To "propagate" a work means to do anything with it that, without
370
+ permission, would make you directly or secondarily liable for
371
+ infringement under applicable copyright law, except executing it on a
372
+ computer or modifying a private copy. Propagation includes copying,
373
+ distribution (with or without modification), making available to the
374
+ public, and in some countries other activities as well.
375
+
376
+ To "convey" a work means any kind of propagation that enables other
377
+ parties to make or receive copies. Mere interaction with a user through
378
+ a computer network, with no transfer of a copy, is not conveying.
379
+
380
+ An interactive user interface displays "Appropriate Legal Notices"
381
+ to the extent that it includes a convenient and prominently visible
382
+ feature that (1) displays an appropriate copyright notice, and (2)
383
+ tells the user that there is no warranty for the work (except to the
384
+ extent that warranties are provided), that licensees may convey the
385
+ work under this License, and how to view a copy of this License. If
386
+ the interface presents a list of user commands or options, such as a
387
+ menu, a prominent item in the list meets this criterion.
388
+
389
+ 1. Source Code.
390
+
391
+ The "source code" for a work means the preferred form of the work
392
+ for making modifications to it. "Object code" means any non-source
393
+ form of a work.
394
+
395
+ A "Standard Interface" means an interface that either is an official
396
+ standard defined by a recognized standards body, or, in the case of
397
+ interfaces specified for a particular programming language, one that
398
+ is widely used among developers working in that language.
399
+
400
+ The "System Libraries" of an executable work include anything, other
401
+ than the work as a whole, that (a) is included in the normal form of
402
+ packaging a Major Component, but which is not part of that Major
403
+ Component, and (b) serves only to enable use of the work with that
404
+ Major Component, or to implement a Standard Interface for which an
405
+ implementation is available to the public in source code form. A
406
+ "Major Component", in this context, means a major essential component
407
+ (kernel, window system, and so on) of the specific operating system
408
+ (if any) on which the executable work runs, or a compiler used to
409
+ produce the work, or an object code interpreter used to run it.
410
+
411
+ The "Corresponding Source" for a work in object code form means all
412
+ the source code needed to generate, install, and (for an executable
413
+ work) run the object code and to modify the work, including scripts to
414
+ control those activities. However, it does not include the work's
415
+ System Libraries, or general-purpose tools or generally available free
416
+ programs which are used unmodified in performing those activities but
417
+ which are not part of the work. For example, Corresponding Source
418
+ includes interface definition files associated with source files for
419
+ the work, and the source code for shared libraries and dynamically
420
+ linked subprograms that the work is specifically designed to require,
421
+ such as by intimate data communication or control flow between those
422
+ subprograms and other parts of the work.
423
+
424
+ The Corresponding Source need not include anything that users
425
+ can regenerate automatically from other parts of the Corresponding
426
+ Source.
427
+
428
+ The Corresponding Source for a work in source code form is that
429
+ same work.
430
+
431
+ 2. Basic Permissions.
432
+
433
+ All rights granted under this License are granted for the term of
434
+ copyright on the Program, and are irrevocable provided the stated
435
+ conditions are met. This License explicitly affirms your unlimited
436
+ permission to run the unmodified Program. The output from running a
437
+ covered work is covered by this License only if the output, given its
438
+ content, constitutes a covered work. This License acknowledges your
439
+ rights of fair use or other equivalent, as provided by copyright law.
440
+
441
+ You may make, run and propagate covered works that you do not
442
+ convey, without conditions so long as your license otherwise remains
443
+ in force. You may convey covered works to others for the sole purpose
444
+ of having them make modifications exclusively for you, or provide you
445
+ with facilities for running those works, provided that you comply with
446
+ the terms of this License in conveying all material for which you do
447
+ not control copyright. Those thus making or running the covered works
448
+ for you must do so exclusively on your behalf, under your direction
449
+ and control, on terms that prohibit them from making any copies of
450
+ your copyrighted material outside their relationship with you.
451
+
452
+ Conveying under any other circumstances is permitted solely under
453
+ the conditions stated below. Sublicensing is not allowed; section 10
454
+ makes it unnecessary.
455
+
456
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
457
+
458
+ No covered work shall be deemed part of an effective technological
459
+ measure under any applicable law fulfilling obligations under article
460
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
461
+ similar laws prohibiting or restricting circumvention of such
462
+ measures.
463
+
464
+ When you convey a covered work, you waive any legal power to forbid
465
+ circumvention of technological measures to the extent such circumvention
466
+ is effected by exercising rights under this License with respect to
467
+ the covered work, and you disclaim any intention to limit operation or
468
+ modification of the work as a means of enforcing, against the work's
469
+ users, your or third parties' legal rights to forbid circumvention of
470
+ technological measures.
471
+
472
+ 4. Conveying Verbatim Copies.
473
+
474
+ You may convey verbatim copies of the Program's source code as you
475
+ receive it, in any medium, provided that you conspicuously and
476
+ appropriately publish on each copy an appropriate copyright notice;
477
+ keep intact all notices stating that this License and any
478
+ non-permissive terms added in accord with section 7 apply to the code;
479
+ keep intact all notices of the absence of any warranty; and give all
480
+ recipients a copy of this License along with the Program.
481
+
482
+ You may charge any price or no price for each copy that you convey,
483
+ and you may offer support or warranty protection for a fee.
484
+
485
+ 5. Conveying Modified Source Versions.
486
+
487
+ You may convey a work based on the Program, or the modifications to
488
+ produce it from the Program, in the form of source code under the
489
+ terms of section 4, provided that you also meet all of these conditions:
490
+
491
+ a) The work must carry prominent notices stating that you modified
492
+ it, and giving a relevant date.
493
+
494
+ b) The work must carry prominent notices stating that it is
495
+ released under this License and any conditions added under section
496
+ 7. This requirement modifies the requirement in section 4 to
497
+ "keep intact all notices".
498
+
499
+ c) You must license the entire work, as a whole, under this
500
+ License to anyone who comes into possession of a copy. This
501
+ License will therefore apply, along with any applicable section 7
502
+ additional terms, to the whole of the work, and all its parts,
503
+ regardless of how they are packaged. This License gives no
504
+ permission to license the work in any other way, but it does not
505
+ invalidate such permission if you have separately received it.
506
+
507
+ d) If the work has interactive user interfaces, each must display
508
+ Appropriate Legal Notices; however, if the Program has interactive
509
+ interfaces that do not display Appropriate Legal Notices, your
510
+ work need not make them do so.
511
+
512
+ A compilation of a covered work with other separate and independent
513
+ works, which are not by their nature extensions of the covered work,
514
+ and which are not combined with it such as to form a larger program,
515
+ in or on a volume of a storage or distribution medium, is called an
516
+ "aggregate" if the compilation and its resulting copyright are not
517
+ used to limit the access or legal rights of the compilation's users
518
+ beyond what the individual works permit. Inclusion of a covered work
519
+ in an aggregate does not cause this License to apply to the other
520
+ parts of the aggregate.
521
+
522
+ 6. Conveying Non-Source Forms.
523
+
524
+ You may convey a covered work in object code form under the terms
525
+ of sections 4 and 5, provided that you also convey the
526
+ machine-readable Corresponding Source under the terms of this License,
527
+ in one of these ways:
528
+
529
+ a) Convey the object code in, or embodied in, a physical product
530
+ (including a physical distribution medium), accompanied by the
531
+ Corresponding Source fixed on a durable physical medium
532
+ customarily used for software interchange.
533
+
534
+ b) Convey the object code in, or embodied in, a physical product
535
+ (including a physical distribution medium), accompanied by a
536
+ written offer, valid for at least three years and valid for as
537
+ long as you offer spare parts or customer support for that product
538
+ model, to give anyone who possesses the object code either (1) a
539
+ copy of the Corresponding Source for all the software in the
540
+ product that is covered by this License, on a durable physical
541
+ medium customarily used for software interchange, for a price no
542
+ more than your reasonable cost of physically performing this
543
+ conveying of source, or (2) access to copy the
544
+ Corresponding Source from a network server at no charge.
545
+
546
+ c) Convey individual copies of the object code with a copy of the
547
+ written offer to provide the Corresponding Source. This
548
+ alternative is allowed only occasionally and noncommercially, and
549
+ only if you received the object code with such an offer, in accord
550
+ with subsection 6b.
551
+
552
+ d) Convey the object code by offering access from a designated
553
+ place (gratis or for a charge), and offer equivalent access to the
554
+ Corresponding Source in the same way through the same place at no
555
+ further charge. You need not require recipients to copy the
556
+ Corresponding Source along with the object code. If the place to
557
+ copy the object code is a network server, the Corresponding Source
558
+ may be on a different server (operated by you or a third party)
559
+ that supports equivalent copying facilities, provided you maintain
560
+ clear directions next to the object code saying where to find the
561
+ Corresponding Source. Regardless of what server hosts the
562
+ Corresponding Source, you remain obligated to ensure that it is
563
+ available for as long as needed to satisfy these requirements.
564
+
565
+ e) Convey the object code using peer-to-peer transmission, provided
566
+ you inform other peers where the object code and Corresponding
567
+ Source of the work are being offered to the general public at no
568
+ charge under subsection 6d.
569
+
570
+ A separable portion of the object code, whose source code is excluded
571
+ from the Corresponding Source as a System Library, need not be
572
+ included in conveying the object code work.
573
+
574
+ A "User Product" is either (1) a "consumer product", which means any
575
+ tangible personal property which is normally used for personal, family,
576
+ or household purposes, or (2) anything designed or sold for incorporation
577
+ into a dwelling. In determining whether a product is a consumer product,
578
+ doubtful cases shall be resolved in favor of coverage. For a particular
579
+ product received by a particular user, "normally used" refers to a
580
+ typical or common use of that class of product, regardless of the status
581
+ of the particular user or of the way in which the particular user
582
+ actually uses, or expects or is expected to use, the product. A product
583
+ is a consumer product regardless of whether the product has substantial
584
+ commercial, industrial or non-consumer uses, unless such uses represent
585
+ the only significant mode of use of the product.
586
+
587
+ "Installation Information" for a User Product means any methods,
588
+ procedures, authorization keys, or other information required to install
589
+ and execute modified versions of a covered work in that User Product from
590
+ a modified version of its Corresponding Source. The information must
591
+ suffice to ensure that the continued functioning of the modified object
592
+ code is in no case prevented or interfered with solely because
593
+ modification has been made.
594
+
595
+ If you convey an object code work under this section in, or with, or
596
+ specifically for use in, a User Product, and the conveying occurs as
597
+ part of a transaction in which the right of possession and use of the
598
+ User Product is transferred to the recipient in perpetuity or for a
599
+ fixed term (regardless of how the transaction is characterized), the
600
+ Corresponding Source conveyed under this section must be accompanied
601
+ by the Installation Information. But this requirement does not apply
602
+ if neither you nor any third party retains the ability to install
603
+ modified object code on the User Product (for example, the work has
604
+ been installed in ROM).
605
+
606
+ The requirement to provide Installation Information does not include a
607
+ requirement to continue to provide support service, warranty, or updates
608
+ for a work that has been modified or installed by the recipient, or for
609
+ the User Product in which it has been modified or installed. Access to a
610
+ network may be denied when the modification itself materially and
611
+ adversely affects the operation of the network or violates the rules and
612
+ protocols for communication across the network.
613
+
614
+ Corresponding Source conveyed, and Installation Information provided,
615
+ in accord with this section must be in a format that is publicly
616
+ documented (and with an implementation available to the public in
617
+ source code form), and must require no special password or key for
618
+ unpacking, reading or copying.
619
+
620
+ 7. Additional Terms.
621
+
622
+ "Additional permissions" are terms that supplement the terms of this
623
+ License by making exceptions from one or more of its conditions.
624
+ Additional permissions that are applicable to the entire Program shall
625
+ be treated as though they were included in this License, to the extent
626
+ that they are valid under applicable law. If additional permissions
627
+ apply only to part of the Program, that part may be used separately
628
+ under those permissions, but the entire Program remains governed by
629
+ this License without regard to the additional permissions.
630
+
631
+ When you convey a copy of a covered work, you may at your option
632
+ remove any additional permissions from that copy, or from any part of
633
+ it. (Additional permissions may be written to require their own
634
+ removal in certain cases when you modify the work.) You may place
635
+ additional permissions on material, added by you to a covered work,
636
+ for which you have or can give appropriate copyright permission.
637
+
638
+ Notwithstanding any other provision of this License, for material you
639
+ add to a covered work, you may (if authorized by the copyright holders of
640
+ that material) supplement the terms of this License with terms:
641
+
642
+ a) Disclaiming warranty or limiting liability differently from the
643
+ terms of sections 15 and 16 of this License; or
644
+
645
+ b) Requiring preservation of specified reasonable legal notices or
646
+ author attributions in that material or in the Appropriate Legal
647
+ Notices displayed by works containing it; or
648
+
649
+ c) Prohibiting misrepresentation of the origin of that material, or
650
+ requiring that modified versions of such material be marked in
651
+ reasonable ways as different from the original version; or
652
+
653
+ d) Limiting the use for publicity purposes of names of licensors or
654
+ authors of the material; or
655
+
656
+ e) Declining to grant rights under trademark law for use of some
657
+ trade names, trademarks, or service marks; or
658
+
659
+ f) Requiring indemnification of licensors and authors of that
660
+ material by anyone who conveys the material (or modified versions of
661
+ it) with contractual assumptions of liability to the recipient, for
662
+ any liability that these contractual assumptions directly impose on
663
+ those licensors and authors.
664
+
665
+ All other non-permissive additional terms are considered "further
666
+ restrictions" within the meaning of section 10. If the Program as you
667
+ received it, or any part of it, contains a notice stating that it is
668
+ governed by this License along with a term that is a further
669
+ restriction, you may remove that term. If a license document contains
670
+ a further restriction but permits relicensing or conveying under this
671
+ License, you may add to a covered work material governed by the terms
672
+ of that license document, provided that the further restriction does
673
+ not survive such relicensing or conveying.
674
+
675
+ If you add terms to a covered work in accord with this section, you
676
+ must place, in the relevant source files, a statement of the
677
+ additional terms that apply to those files, or a notice indicating
678
+ where to find the applicable terms.
679
+
680
+ Additional terms, permissive or non-permissive, may be stated in the
681
+ form of a separately written license, or stated as exceptions;
682
+ the above requirements apply either way.
683
+
684
+ 8. Termination.
685
+
686
+ You may not propagate or modify a covered work except as expressly
687
+ provided under this License. Any attempt otherwise to propagate or
688
+ modify it is void, and will automatically terminate your rights under
689
+ this License (including any patent licenses granted under the third
690
+ paragraph of section 11).
691
+
692
+ However, if you cease all violation of this License, then your
693
+ license from a particular copyright holder is reinstated (a)
694
+ provisionally, unless and until the copyright holder explicitly and
695
+ finally terminates your license, and (b) permanently, if the copyright
696
+ holder fails to notify you of the violation by some reasonable means
697
+ prior to 60 days after the cessation.
698
+
699
+ Moreover, your license from a particular copyright holder is
700
+ reinstated permanently if the copyright holder notifies you of the
701
+ violation by some reasonable means, this is the first time you have
702
+ received notice of violation of this License (for any work) from that
703
+ copyright holder, and you cure the violation prior to 30 days after
704
+ your receipt of the notice.
705
+
706
+ Termination of your rights under this section does not terminate the
707
+ licenses of parties who have received copies or rights from you under
708
+ this License. If your rights have been terminated and not permanently
709
+ reinstated, you do not qualify to receive new licenses for the same
710
+ material under section 10.
711
+
712
+ 9. Acceptance Not Required for Having Copies.
713
+
714
+ You are not required to accept this License in order to receive or
715
+ run a copy of the Program. Ancillary propagation of a covered work
716
+ occurring solely as a consequence of using peer-to-peer transmission
717
+ to receive a copy likewise does not require acceptance. However,
718
+ nothing other than this License grants you permission to propagate or
719
+ modify any covered work. These actions infringe copyright if you do
720
+ not accept this License. Therefore, by modifying or propagating a
721
+ covered work, you indicate your acceptance of this License to do so.
722
+
723
+ 10. Automatic Licensing of Downstream Recipients.
724
+
725
+ Each time you convey a covered work, the recipient automatically
726
+ receives a license from the original licensors, to run, modify and
727
+ propagate that work, subject to this License. You are not responsible
728
+ for enforcing compliance by third parties with this License.
729
+
730
+ An "entity transaction" is a transaction transferring control of an
731
+ organization, or substantially all assets of one, or subdividing an
732
+ organization, or merging organizations. If propagation of a covered
733
+ work results from an entity transaction, each party to that
734
+ transaction who receives a copy of the work also receives whatever
735
+ licenses to the work the party's predecessor in interest had or could
736
+ give under the previous paragraph, plus a right to possession of the
737
+ Corresponding Source of the work from the predecessor in interest, if
738
+ the predecessor has it or can get it with reasonable efforts.
739
+
740
+ You may not impose any further restrictions on the exercise of the
741
+ rights granted or affirmed under this License. For example, you may
742
+ not impose a license fee, royalty, or other charge for exercise of
743
+ rights granted under this License, and you may not initiate litigation
744
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
745
+ any patent claim is infringed by making, using, selling, offering for
746
+ sale, or importing the Program or any portion of it.
747
+
748
+ 11. Patents.
749
+
750
+ A "contributor" is a copyright holder who authorizes use under this
751
+ License of the Program or a work on which the Program is based. The
752
+ work thus licensed is called the contributor's "contributor version".
753
+
754
+ A contributor's "essential patent claims" are all patent claims
755
+ owned or controlled by the contributor, whether already acquired or
756
+ hereafter acquired, that would be infringed by some manner, permitted
757
+ by this License, of making, using, or selling its contributor version,
758
+ but do not include claims that would be infringed only as a
759
+ consequence of further modification of the contributor version. For
760
+ purposes of this definition, "control" includes the right to grant
761
+ patent sublicenses in a manner consistent with the requirements of
762
+ this License.
763
+
764
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
765
+ patent license under the contributor's essential patent claims, to
766
+ make, use, sell, offer for sale, import and otherwise run, modify and
767
+ propagate the contents of its contributor version.
768
+
769
+ In the following three paragraphs, a "patent license" is any express
770
+ agreement or commitment, however denominated, not to enforce a patent
771
+ (such as an express permission to practice a patent or covenant not to
772
+ sue for patent infringement). To "grant" such a patent license to a
773
+ party means to make such an agreement or commitment not to enforce a
774
+ patent against the party.
775
+
776
+ If you convey a covered work, knowingly relying on a patent license,
777
+ and the Corresponding Source of the work is not available for anyone
778
+ to copy, free of charge and under the terms of this License, through a
779
+ publicly available network server or other readily accessible means,
780
+ then you must either (1) cause the Corresponding Source to be so
781
+ available, or (2) arrange to deprive yourself of the benefit of the
782
+ patent license for this particular work, or (3) arrange, in a manner
783
+ consistent with the requirements of this License, to extend the patent
784
+ license to downstream recipients. "Knowingly relying" means you have
785
+ actual knowledge that, but for the patent license, your conveying the
786
+ covered work in a country, or your recipient's use of the covered work
787
+ in a country, would infringe one or more identifiable patents in that
788
+ country that you have reason to believe are valid.
789
+
790
+ If, pursuant to or in connection with a single transaction or
791
+ arrangement, you convey, or propagate by procuring conveyance of, a
792
+ covered work, and grant a patent license to some of the parties
793
+ receiving the covered work authorizing them to use, propagate, modify
794
+ or convey a specific copy of the covered work, then the patent license
795
+ you grant is automatically extended to all recipients of the covered
796
+ work and works based on it.
797
+
798
+ A patent license is "discriminatory" if it does not include within
799
+ the scope of its coverage, prohibits the exercise of, or is
800
+ conditioned on the non-exercise of one or more of the rights that are
801
+ specifically granted under this License. You may not convey a covered
802
+ work if you are a party to an arrangement with a third party that is
803
+ in the business of distributing software, under which you make payment
804
+ to the third party based on the extent of your activity of conveying
805
+ the work, and under which the third party grants, to any of the
806
+ parties who would receive the covered work from you, a discriminatory
807
+ patent license (a) in connection with copies of the covered work
808
+ conveyed by you (or copies made from those copies), or (b) primarily
809
+ for and in connection with specific products or compilations that
810
+ contain the covered work, unless you entered into that arrangement,
811
+ or that patent license was granted, prior to 28 March 2007.
812
+
813
+ Nothing in this License shall be construed as excluding or limiting
814
+ any implied license or other defenses to infringement that may
815
+ otherwise be available to you under applicable patent law.
816
+
817
+ 12. No Surrender of Others' Freedom.
818
+
819
+ If conditions are imposed on you (whether by court order, agreement or
820
+ otherwise) that contradict the conditions of this License, they do not
821
+ excuse you from the conditions of this License. If you cannot convey a
822
+ covered work so as to satisfy simultaneously your obligations under this
823
+ License and any other pertinent obligations, then as a consequence you may
824
+ not convey it at all. For example, if you agree to terms that obligate you
825
+ to collect a royalty for further conveying from those to whom you convey
826
+ the Program, the only way you could satisfy both those terms and this
827
+ License would be to refrain entirely from conveying the Program.
828
+
829
+ 13. Use with the GNU Affero General Public License.
830
+
831
+ Notwithstanding any other provision of this License, you have
832
+ permission to link or combine any covered work with a work licensed
833
+ under version 3 of the GNU Affero General Public License into a single
834
+ combined work, and to convey the resulting work. The terms of this
835
+ License will continue to apply to the part which is the covered work,
836
+ but the special requirements of the GNU Affero General Public License,
837
+ section 13, concerning interaction through a network will apply to the
838
+ combination as such.
839
+
840
+ 14. Revised Versions of this License.
841
+
842
+ The Free Software Foundation may publish revised and/or new versions of
843
+ the GNU General Public License from time to time. Such new versions will
844
+ be similar in spirit to the present version, but may differ in detail to
845
+ address new problems or concerns.
846
+
847
+ Each version is given a distinguishing version number. If the
848
+ Program specifies that a certain numbered version of the GNU General
849
+ Public License "or any later version" applies to it, you have the
850
+ option of following the terms and conditions either of that numbered
851
+ version or of any later version published by the Free Software
852
+ Foundation. If the Program does not specify a version number of the
853
+ GNU General Public License, you may choose any version ever published
854
+ by the Free Software Foundation.
855
+
856
+ If the Program specifies that a proxy can decide which future
857
+ versions of the GNU General Public License can be used, that proxy's
858
+ public statement of acceptance of a version permanently authorizes you
859
+ to choose that version for the Program.
860
+
861
+ Later license versions may give you additional or different
862
+ permissions. However, no additional obligations are imposed on any
863
+ author or copyright holder as a result of your choosing to follow a
864
+ later version.
865
+
866
+ 15. Disclaimer of Warranty.
867
+
868
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
869
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
870
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
871
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
872
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
873
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
874
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
875
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
876
+
877
+ 16. Limitation of Liability.
878
+
879
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
880
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
881
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
882
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
883
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
884
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
885
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
886
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
887
+ SUCH DAMAGES.
888
+
889
+ 17. Interpretation of Sections 15 and 16.
890
+
891
+ If the disclaimer of warranty and limitation of liability provided
892
+ above cannot be given local legal effect according to their terms,
893
+ reviewing courts shall apply local law that most closely approximates
894
+ an absolute waiver of all civil liability in connection with the
895
+ Program, unless a warranty or assumption of liability accompanies a
896
+ copy of the Program in return for a fee.
897
+
898
+ END OF TERMS AND CONDITIONS
899
+
900
+ How to Apply These Terms to Your New Programs
901
+
902
+ If you develop a new program, and you want it to be of the greatest
903
+ possible use to the public, the best way to achieve this is to make it
904
+ free software which everyone can redistribute and change under these terms.
905
+
906
+ To do so, attach the following notices to the program. It is safest
907
+ to attach them to the start of each source file to most effectively
908
+ state the exclusion of warranty; and each file should have at least
909
+ the "copyright" line and a pointer to where the full notice is found.
910
+
911
+ <one line to give the program's name and a brief idea of what it does.>
912
+ Copyright (C) <year> <name of author>
913
+
914
+ This program is free software: you can redistribute it and/or modify
915
+ it under the terms of the GNU General Public License as published by
916
+ the Free Software Foundation, either version 3 of the License, or
917
+ (at your option) any later version.
918
+
919
+ This program is distributed in the hope that it will be useful,
920
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
921
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
922
+ GNU General Public License for more details.
923
+
924
+ You should have received a copy of the GNU General Public License
925
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
926
+
927
+ Also add information on how to contact you by electronic and paper mail.
928
+
929
+ If the program does terminal interaction, make it output a short
930
+ notice like this when it starts in an interactive mode:
931
+
932
+ <program> Copyright (C) <year> <name of author>
933
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
934
+ This is free software, and you are welcome to redistribute it
935
+ under certain conditions; type `show c' for details.
936
+
937
+ The hypothetical commands `show w' and `show c' should show the appropriate
938
+ parts of the General Public License. Of course, your program's commands
939
+ might be different; for a GUI interface, you would use an "about box".
940
+
941
+ You should also get your employer (if you work as a programmer) or school,
942
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
943
+ For more information on this, and how to apply and follow the GNU GPL, see
944
+ <http://www.gnu.org/licenses/>.
945
+
946
+ The GNU General Public License does not permit incorporating your program
947
+ into proprietary programs. If your program is a subroutine library, you
948
+ may consider it more useful to permit linking proprietary applications with
949
+ the library. If this is what you want to do, use the GNU Lesser General
950
+ Public License instead of this License. But first, please read
951
+ <http://www.gnu.org/philosophy/why-not-lgpl.html>.
952
+
953
+ Name: libquadmath
954
+ Files: numpy.libs/libquadmath*.so
955
+ Description: dynamically linked to files compiled with gcc
956
+ Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libquadmath
957
+ License: LGPL-2.1-or-later
958
+
959
+ GCC Quad-Precision Math Library
960
+ Copyright (C) 2010-2019 Free Software Foundation, Inc.
961
+ Written by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
962
+
963
+ This file is part of the libquadmath library.
964
+ Libquadmath is free software; you can redistribute it and/or
965
+ modify it under the terms of the GNU Library General Public
966
+ License as published by the Free Software Foundation; either
967
+ version 2.1 of the License, or (at your option) any later version.
968
+
969
+ Libquadmath is distributed in the hope that it will be useful,
970
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
971
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
972
+ Lesser General Public License for more details.
973
+ https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
.venv/lib/python3.11/site-packages/numpy-1.26.1.dist-info/METADATA ADDED
@@ -0,0 +1,1094 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.1
2
+ Name: numpy
3
+ Version: 1.26.1
4
+ Summary: Fundamental package for array computing in Python
5
+ Home-page: https://numpy.org
6
+ Author: Travis E. Oliphant et al.
7
+ Maintainer-Email: NumPy Developers <numpy-discussion@python.org>
8
+ License: Copyright (c) 2005-2023, NumPy Developers.
9
+ All rights reserved.
10
+
11
+ Redistribution and use in source and binary forms, with or without
12
+ modification, are permitted provided that the following conditions are
13
+ met:
14
+
15
+ * Redistributions of source code must retain the above copyright
16
+ notice, this list of conditions and the following disclaimer.
17
+
18
+ * Redistributions in binary form must reproduce the above
19
+ copyright notice, this list of conditions and the following
20
+ disclaimer in the documentation and/or other materials provided
21
+ with the distribution.
22
+
23
+ * Neither the name of the NumPy Developers nor the names of any
24
+ contributors may be used to endorse or promote products derived
25
+ from this software without specific prior written permission.
26
+
27
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
30
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38
+ The NumPy repository and source distributions bundle several libraries that are
39
+ compatibly licensed. We list these here.
40
+
41
+ Name: lapack-lite
42
+ Files: numpy/linalg/lapack_lite/*
43
+ License: BSD-3-Clause
44
+ For details, see numpy/linalg/lapack_lite/LICENSE.txt
45
+
46
+ Name: tempita
47
+ Files: tools/npy_tempita/*
48
+ License: MIT
49
+ For details, see tools/npy_tempita/license.txt
50
+
51
+ Name: dragon4
52
+ Files: numpy/core/src/multiarray/dragon4.c
53
+ License: MIT
54
+ For license text, see numpy/core/src/multiarray/dragon4.c
55
+
56
+ Name: libdivide
57
+ Files: numpy/core/include/numpy/libdivide/*
58
+ License: Zlib
59
+ For license text, see numpy/core/include/numpy/libdivide/LICENSE.txt
60
+
61
+
62
+ Note that the following files are vendored in the repository and sdist but not
63
+ installed in built numpy packages:
64
+
65
+ Name: Meson
66
+ Files: vendored-meson/meson/*
67
+ License: Apache 2.0
68
+ For license text, see vendored-meson/meson/COPYING
69
+
70
+ Name: meson-python
71
+ Files: vendored-meson/meson-python/*
72
+ License: MIT
73
+ For license text, see vendored-meson/meson-python/LICENSE
74
+
75
+ Name: spin
76
+ Files: .spin/cmds.py
77
+ License: BSD-3
78
+ For license text, see .spin/LICENSE
79
+
80
+ ----
81
+
82
+ This binary distribution of NumPy also bundles the following software:
83
+
84
+
85
+ Name: OpenBLAS
86
+ Files: numpy.libs/libopenblas*.so
87
+ Description: bundled as a dynamically linked library
88
+ Availability: https://github.com/OpenMathLib/OpenBLAS/
89
+ License: BSD-3-Clause-Attribution
90
+ Copyright (c) 2011-2014, The OpenBLAS Project
91
+ All rights reserved.
92
+
93
+ Redistribution and use in source and binary forms, with or without
94
+ modification, are permitted provided that the following conditions are
95
+ met:
96
+
97
+ 1. Redistributions of source code must retain the above copyright
98
+ notice, this list of conditions and the following disclaimer.
99
+
100
+ 2. Redistributions in binary form must reproduce the above copyright
101
+ notice, this list of conditions and the following disclaimer in
102
+ the documentation and/or other materials provided with the
103
+ distribution.
104
+ 3. Neither the name of the OpenBLAS project nor the names of
105
+ its contributors may be used to endorse or promote products
106
+ derived from this software without specific prior written
107
+ permission.
108
+
109
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
110
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
111
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
112
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
113
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
114
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
115
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
116
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
117
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
118
+ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
119
+
120
+
121
+ Name: LAPACK
122
+ Files: numpy.libs/libopenblas*.so
123
+ Description: bundled in OpenBLAS
124
+ Availability: https://github.com/OpenMathLib/OpenBLAS/
125
+ License: BSD-3-Clause-Attribution
126
+ Copyright (c) 1992-2013 The University of Tennessee and The University
127
+ of Tennessee Research Foundation. All rights
128
+ reserved.
129
+ Copyright (c) 2000-2013 The University of California Berkeley. All
130
+ rights reserved.
131
+ Copyright (c) 2006-2013 The University of Colorado Denver. All rights
132
+ reserved.
133
+
134
+ $COPYRIGHT$
135
+
136
+ Additional copyrights may follow
137
+
138
+ $HEADER$
139
+
140
+ Redistribution and use in source and binary forms, with or without
141
+ modification, are permitted provided that the following conditions are
142
+ met:
143
+
144
+ - Redistributions of source code must retain the above copyright
145
+ notice, this list of conditions and the following disclaimer.
146
+
147
+ - Redistributions in binary form must reproduce the above copyright
148
+ notice, this list of conditions and the following disclaimer listed
149
+ in this license in the documentation and/or other materials
150
+ provided with the distribution.
151
+
152
+ - Neither the name of the copyright holders nor the names of its
153
+ contributors may be used to endorse or promote products derived from
154
+ this software without specific prior written permission.
155
+
156
+ The copyright holders provide no reassurances that the source code
157
+ provided does not infringe any patent, copyright, or any other
158
+ intellectual property rights of third parties. The copyright holders
159
+ disclaim any liability to any recipient for claims brought against
160
+ recipient by any third party for infringement of that parties
161
+ intellectual property rights.
162
+
163
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
164
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
165
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
166
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
167
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
168
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
169
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
170
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
171
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
172
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
173
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
174
+
175
+
176
+ Name: GCC runtime library
177
+ Files: numpy.libs/libgfortran*.so
178
+ Description: dynamically linked to files compiled with gcc
179
+ Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libgfortran
180
+ License: GPL-3.0-with-GCC-exception
181
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
182
+
183
+ Libgfortran is free software; you can redistribute it and/or modify
184
+ it under the terms of the GNU General Public License as published by
185
+ the Free Software Foundation; either version 3, or (at your option)
186
+ any later version.
187
+
188
+ Libgfortran is distributed in the hope that it will be useful,
189
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
190
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
191
+ GNU General Public License for more details.
192
+
193
+ Under Section 7 of GPL version 3, you are granted additional
194
+ permissions described in the GCC Runtime Library Exception, version
195
+ 3.1, as published by the Free Software Foundation.
196
+
197
+ You should have received a copy of the GNU General Public License and
198
+ a copy of the GCC Runtime Library Exception along with this program;
199
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
200
+ <http://www.gnu.org/licenses/>.
201
+
202
+ ----
203
+
204
+ Full text of license texts referred to above follows (that they are
205
+ listed below does not necessarily imply the conditions apply to the
206
+ present binary release):
207
+
208
+ ----
209
+
210
+ GCC RUNTIME LIBRARY EXCEPTION
211
+
212
+ Version 3.1, 31 March 2009
213
+
214
+ Copyright (C) 2009 Free Software Foundation, Inc. <http://fsf.org/>
215
+
216
+ Everyone is permitted to copy and distribute verbatim copies of this
217
+ license document, but changing it is not allowed.
218
+
219
+ This GCC Runtime Library Exception ("Exception") is an additional
220
+ permission under section 7 of the GNU General Public License, version
221
+ 3 ("GPLv3"). It applies to a given file (the "Runtime Library") that
222
+ bears a notice placed by the copyright holder of the file stating that
223
+ the file is governed by GPLv3 along with this Exception.
224
+
225
+ When you use GCC to compile a program, GCC may combine portions of
226
+ certain GCC header files and runtime libraries with the compiled
227
+ program. The purpose of this Exception is to allow compilation of
228
+ non-GPL (including proprietary) programs to use, in this way, the
229
+ header files and runtime libraries covered by this Exception.
230
+
231
+ 0. Definitions.
232
+
233
+ A file is an "Independent Module" if it either requires the Runtime
234
+ Library for execution after a Compilation Process, or makes use of an
235
+ interface provided by the Runtime Library, but is not otherwise based
236
+ on the Runtime Library.
237
+
238
+ "GCC" means a version of the GNU Compiler Collection, with or without
239
+ modifications, governed by version 3 (or a specified later version) of
240
+ the GNU General Public License (GPL) with the option of using any
241
+ subsequent versions published by the FSF.
242
+
243
+ "GPL-compatible Software" is software whose conditions of propagation,
244
+ modification and use would permit combination with GCC in accord with
245
+ the license of GCC.
246
+
247
+ "Target Code" refers to output from any compiler for a real or virtual
248
+ target processor architecture, in executable form or suitable for
249
+ input to an assembler, loader, linker and/or execution
250
+ phase. Notwithstanding that, Target Code does not include data in any
251
+ format that is used as a compiler intermediate representation, or used
252
+ for producing a compiler intermediate representation.
253
+
254
+ The "Compilation Process" transforms code entirely represented in
255
+ non-intermediate languages designed for human-written code, and/or in
256
+ Java Virtual Machine byte code, into Target Code. Thus, for example,
257
+ use of source code generators and preprocessors need not be considered
258
+ part of the Compilation Process, since the Compilation Process can be
259
+ understood as starting with the output of the generators or
260
+ preprocessors.
261
+
262
+ A Compilation Process is "Eligible" if it is done using GCC, alone or
263
+ with other GPL-compatible software, or if it is done without using any
264
+ work based on GCC. For example, using non-GPL-compatible Software to
265
+ optimize any GCC intermediate representations would not qualify as an
266
+ Eligible Compilation Process.
267
+
268
+ 1. Grant of Additional Permission.
269
+
270
+ You have permission to propagate a work of Target Code formed by
271
+ combining the Runtime Library with Independent Modules, even if such
272
+ propagation would otherwise violate the terms of GPLv3, provided that
273
+ all Target Code was generated by Eligible Compilation Processes. You
274
+ may then convey such a combination under terms of your choice,
275
+ consistent with the licensing of the Independent Modules.
276
+
277
+ 2. No Weakening of GCC Copyleft.
278
+
279
+ The availability of this Exception does not imply any general
280
+ presumption that third-party software is unaffected by the copyleft
281
+ requirements of the license of GCC.
282
+
283
+ ----
284
+
285
+ GNU GENERAL PUBLIC LICENSE
286
+ Version 3, 29 June 2007
287
+
288
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
289
+ Everyone is permitted to copy and distribute verbatim copies
290
+ of this license document, but changing it is not allowed.
291
+
292
+ Preamble
293
+
294
+ The GNU General Public License is a free, copyleft license for
295
+ software and other kinds of works.
296
+
297
+ The licenses for most software and other practical works are designed
298
+ to take away your freedom to share and change the works. By contrast,
299
+ the GNU General Public License is intended to guarantee your freedom to
300
+ share and change all versions of a program--to make sure it remains free
301
+ software for all its users. We, the Free Software Foundation, use the
302
+ GNU General Public License for most of our software; it applies also to
303
+ any other work released this way by its authors. You can apply it to
304
+ your programs, too.
305
+
306
+ When we speak of free software, we are referring to freedom, not
307
+ price. Our General Public Licenses are designed to make sure that you
308
+ have the freedom to distribute copies of free software (and charge for
309
+ them if you wish), that you receive source code or can get it if you
310
+ want it, that you can change the software or use pieces of it in new
311
+ free programs, and that you know you can do these things.
312
+
313
+ To protect your rights, we need to prevent others from denying you
314
+ these rights or asking you to surrender the rights. Therefore, you have
315
+ certain responsibilities if you distribute copies of the software, or if
316
+ you modify it: responsibilities to respect the freedom of others.
317
+
318
+ For example, if you distribute copies of such a program, whether
319
+ gratis or for a fee, you must pass on to the recipients the same
320
+ freedoms that you received. You must make sure that they, too, receive
321
+ or can get the source code. And you must show them these terms so they
322
+ know their rights.
323
+
324
+ Developers that use the GNU GPL protect your rights with two steps:
325
+ (1) assert copyright on the software, and (2) offer you this License
326
+ giving you legal permission to copy, distribute and/or modify it.
327
+
328
+ For the developers' and authors' protection, the GPL clearly explains
329
+ that there is no warranty for this free software. For both users' and
330
+ authors' sake, the GPL requires that modified versions be marked as
331
+ changed, so that their problems will not be attributed erroneously to
332
+ authors of previous versions.
333
+
334
+ Some devices are designed to deny users access to install or run
335
+ modified versions of the software inside them, although the manufacturer
336
+ can do so. This is fundamentally incompatible with the aim of
337
+ protecting users' freedom to change the software. The systematic
338
+ pattern of such abuse occurs in the area of products for individuals to
339
+ use, which is precisely where it is most unacceptable. Therefore, we
340
+ have designed this version of the GPL to prohibit the practice for those
341
+ products. If such problems arise substantially in other domains, we
342
+ stand ready to extend this provision to those domains in future versions
343
+ of the GPL, as needed to protect the freedom of users.
344
+
345
+ Finally, every program is threatened constantly by software patents.
346
+ States should not allow patents to restrict development and use of
347
+ software on general-purpose computers, but in those that do, we wish to
348
+ avoid the special danger that patents applied to a free program could
349
+ make it effectively proprietary. To prevent this, the GPL assures that
350
+ patents cannot be used to render the program non-free.
351
+
352
+ The precise terms and conditions for copying, distribution and
353
+ modification follow.
354
+
355
+ TERMS AND CONDITIONS
356
+
357
+ 0. Definitions.
358
+
359
+ "This License" refers to version 3 of the GNU General Public License.
360
+
361
+ "Copyright" also means copyright-like laws that apply to other kinds of
362
+ works, such as semiconductor masks.
363
+
364
+ "The Program" refers to any copyrightable work licensed under this
365
+ License. Each licensee is addressed as "you". "Licensees" and
366
+ "recipients" may be individuals or organizations.
367
+
368
+ To "modify" a work means to copy from or adapt all or part of the work
369
+ in a fashion requiring copyright permission, other than the making of an
370
+ exact copy. The resulting work is called a "modified version" of the
371
+ earlier work or a work "based on" the earlier work.
372
+
373
+ A "covered work" means either the unmodified Program or a work based
374
+ on the Program.
375
+
376
+ To "propagate" a work means to do anything with it that, without
377
+ permission, would make you directly or secondarily liable for
378
+ infringement under applicable copyright law, except executing it on a
379
+ computer or modifying a private copy. Propagation includes copying,
380
+ distribution (with or without modification), making available to the
381
+ public, and in some countries other activities as well.
382
+
383
+ To "convey" a work means any kind of propagation that enables other
384
+ parties to make or receive copies. Mere interaction with a user through
385
+ a computer network, with no transfer of a copy, is not conveying.
386
+
387
+ An interactive user interface displays "Appropriate Legal Notices"
388
+ to the extent that it includes a convenient and prominently visible
389
+ feature that (1) displays an appropriate copyright notice, and (2)
390
+ tells the user that there is no warranty for the work (except to the
391
+ extent that warranties are provided), that licensees may convey the
392
+ work under this License, and how to view a copy of this License. If
393
+ the interface presents a list of user commands or options, such as a
394
+ menu, a prominent item in the list meets this criterion.
395
+
396
+ 1. Source Code.
397
+
398
+ The "source code" for a work means the preferred form of the work
399
+ for making modifications to it. "Object code" means any non-source
400
+ form of a work.
401
+
402
+ A "Standard Interface" means an interface that either is an official
403
+ standard defined by a recognized standards body, or, in the case of
404
+ interfaces specified for a particular programming language, one that
405
+ is widely used among developers working in that language.
406
+
407
+ The "System Libraries" of an executable work include anything, other
408
+ than the work as a whole, that (a) is included in the normal form of
409
+ packaging a Major Component, but which is not part of that Major
410
+ Component, and (b) serves only to enable use of the work with that
411
+ Major Component, or to implement a Standard Interface for which an
412
+ implementation is available to the public in source code form. A
413
+ "Major Component", in this context, means a major essential component
414
+ (kernel, window system, and so on) of the specific operating system
415
+ (if any) on which the executable work runs, or a compiler used to
416
+ produce the work, or an object code interpreter used to run it.
417
+
418
+ The "Corresponding Source" for a work in object code form means all
419
+ the source code needed to generate, install, and (for an executable
420
+ work) run the object code and to modify the work, including scripts to
421
+ control those activities. However, it does not include the work's
422
+ System Libraries, or general-purpose tools or generally available free
423
+ programs which are used unmodified in performing those activities but
424
+ which are not part of the work. For example, Corresponding Source
425
+ includes interface definition files associated with source files for
426
+ the work, and the source code for shared libraries and dynamically
427
+ linked subprograms that the work is specifically designed to require,
428
+ such as by intimate data communication or control flow between those
429
+ subprograms and other parts of the work.
430
+
431
+ The Corresponding Source need not include anything that users
432
+ can regenerate automatically from other parts of the Corresponding
433
+ Source.
434
+
435
+ The Corresponding Source for a work in source code form is that
436
+ same work.
437
+
438
+ 2. Basic Permissions.
439
+
440
+ All rights granted under this License are granted for the term of
441
+ copyright on the Program, and are irrevocable provided the stated
442
+ conditions are met. This License explicitly affirms your unlimited
443
+ permission to run the unmodified Program. The output from running a
444
+ covered work is covered by this License only if the output, given its
445
+ content, constitutes a covered work. This License acknowledges your
446
+ rights of fair use or other equivalent, as provided by copyright law.
447
+
448
+ You may make, run and propagate covered works that you do not
449
+ convey, without conditions so long as your license otherwise remains
450
+ in force. You may convey covered works to others for the sole purpose
451
+ of having them make modifications exclusively for you, or provide you
452
+ with facilities for running those works, provided that you comply with
453
+ the terms of this License in conveying all material for which you do
454
+ not control copyright. Those thus making or running the covered works
455
+ for you must do so exclusively on your behalf, under your direction
456
+ and control, on terms that prohibit them from making any copies of
457
+ your copyrighted material outside their relationship with you.
458
+
459
+ Conveying under any other circumstances is permitted solely under
460
+ the conditions stated below. Sublicensing is not allowed; section 10
461
+ makes it unnecessary.
462
+
463
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
464
+
465
+ No covered work shall be deemed part of an effective technological
466
+ measure under any applicable law fulfilling obligations under article
467
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
468
+ similar laws prohibiting or restricting circumvention of such
469
+ measures.
470
+
471
+ When you convey a covered work, you waive any legal power to forbid
472
+ circumvention of technological measures to the extent such circumvention
473
+ is effected by exercising rights under this License with respect to
474
+ the covered work, and you disclaim any intention to limit operation or
475
+ modification of the work as a means of enforcing, against the work's
476
+ users, your or third parties' legal rights to forbid circumvention of
477
+ technological measures.
478
+
479
+ 4. Conveying Verbatim Copies.
480
+
481
+ You may convey verbatim copies of the Program's source code as you
482
+ receive it, in any medium, provided that you conspicuously and
483
+ appropriately publish on each copy an appropriate copyright notice;
484
+ keep intact all notices stating that this License and any
485
+ non-permissive terms added in accord with section 7 apply to the code;
486
+ keep intact all notices of the absence of any warranty; and give all
487
+ recipients a copy of this License along with the Program.
488
+
489
+ You may charge any price or no price for each copy that you convey,
490
+ and you may offer support or warranty protection for a fee.
491
+
492
+ 5. Conveying Modified Source Versions.
493
+
494
+ You may convey a work based on the Program, or the modifications to
495
+ produce it from the Program, in the form of source code under the
496
+ terms of section 4, provided that you also meet all of these conditions:
497
+
498
+ a) The work must carry prominent notices stating that you modified
499
+ it, and giving a relevant date.
500
+
501
+ b) The work must carry prominent notices stating that it is
502
+ released under this License and any conditions added under section
503
+ 7. This requirement modifies the requirement in section 4 to
504
+ "keep intact all notices".
505
+
506
+ c) You must license the entire work, as a whole, under this
507
+ License to anyone who comes into possession of a copy. This
508
+ License will therefore apply, along with any applicable section 7
509
+ additional terms, to the whole of the work, and all its parts,
510
+ regardless of how they are packaged. This License gives no
511
+ permission to license the work in any other way, but it does not
512
+ invalidate such permission if you have separately received it.
513
+
514
+ d) If the work has interactive user interfaces, each must display
515
+ Appropriate Legal Notices; however, if the Program has interactive
516
+ interfaces that do not display Appropriate Legal Notices, your
517
+ work need not make them do so.
518
+
519
+ A compilation of a covered work with other separate and independent
520
+ works, which are not by their nature extensions of the covered work,
521
+ and which are not combined with it such as to form a larger program,
522
+ in or on a volume of a storage or distribution medium, is called an
523
+ "aggregate" if the compilation and its resulting copyright are not
524
+ used to limit the access or legal rights of the compilation's users
525
+ beyond what the individual works permit. Inclusion of a covered work
526
+ in an aggregate does not cause this License to apply to the other
527
+ parts of the aggregate.
528
+
529
+ 6. Conveying Non-Source Forms.
530
+
531
+ You may convey a covered work in object code form under the terms
532
+ of sections 4 and 5, provided that you also convey the
533
+ machine-readable Corresponding Source under the terms of this License,
534
+ in one of these ways:
535
+
536
+ a) Convey the object code in, or embodied in, a physical product
537
+ (including a physical distribution medium), accompanied by the
538
+ Corresponding Source fixed on a durable physical medium
539
+ customarily used for software interchange.
540
+
541
+ b) Convey the object code in, or embodied in, a physical product
542
+ (including a physical distribution medium), accompanied by a
543
+ written offer, valid for at least three years and valid for as
544
+ long as you offer spare parts or customer support for that product
545
+ model, to give anyone who possesses the object code either (1) a
546
+ copy of the Corresponding Source for all the software in the
547
+ product that is covered by this License, on a durable physical
548
+ medium customarily used for software interchange, for a price no
549
+ more than your reasonable cost of physically performing this
550
+ conveying of source, or (2) access to copy the
551
+ Corresponding Source from a network server at no charge.
552
+
553
+ c) Convey individual copies of the object code with a copy of the
554
+ written offer to provide the Corresponding Source. This
555
+ alternative is allowed only occasionally and noncommercially, and
556
+ only if you received the object code with such an offer, in accord
557
+ with subsection 6b.
558
+
559
+ d) Convey the object code by offering access from a designated
560
+ place (gratis or for a charge), and offer equivalent access to the
561
+ Corresponding Source in the same way through the same place at no
562
+ further charge. You need not require recipients to copy the
563
+ Corresponding Source along with the object code. If the place to
564
+ copy the object code is a network server, the Corresponding Source
565
+ may be on a different server (operated by you or a third party)
566
+ that supports equivalent copying facilities, provided you maintain
567
+ clear directions next to the object code saying where to find the
568
+ Corresponding Source. Regardless of what server hosts the
569
+ Corresponding Source, you remain obligated to ensure that it is
570
+ available for as long as needed to satisfy these requirements.
571
+
572
+ e) Convey the object code using peer-to-peer transmission, provided
573
+ you inform other peers where the object code and Corresponding
574
+ Source of the work are being offered to the general public at no
575
+ charge under subsection 6d.
576
+
577
+ A separable portion of the object code, whose source code is excluded
578
+ from the Corresponding Source as a System Library, need not be
579
+ included in conveying the object code work.
580
+
581
+ A "User Product" is either (1) a "consumer product", which means any
582
+ tangible personal property which is normally used for personal, family,
583
+ or household purposes, or (2) anything designed or sold for incorporation
584
+ into a dwelling. In determining whether a product is a consumer product,
585
+ doubtful cases shall be resolved in favor of coverage. For a particular
586
+ product received by a particular user, "normally used" refers to a
587
+ typical or common use of that class of product, regardless of the status
588
+ of the particular user or of the way in which the particular user
589
+ actually uses, or expects or is expected to use, the product. A product
590
+ is a consumer product regardless of whether the product has substantial
591
+ commercial, industrial or non-consumer uses, unless such uses represent
592
+ the only significant mode of use of the product.
593
+
594
+ "Installation Information" for a User Product means any methods,
595
+ procedures, authorization keys, or other information required to install
596
+ and execute modified versions of a covered work in that User Product from
597
+ a modified version of its Corresponding Source. The information must
598
+ suffice to ensure that the continued functioning of the modified object
599
+ code is in no case prevented or interfered with solely because
600
+ modification has been made.
601
+
602
+ If you convey an object code work under this section in, or with, or
603
+ specifically for use in, a User Product, and the conveying occurs as
604
+ part of a transaction in which the right of possession and use of the
605
+ User Product is transferred to the recipient in perpetuity or for a
606
+ fixed term (regardless of how the transaction is characterized), the
607
+ Corresponding Source conveyed under this section must be accompanied
608
+ by the Installation Information. But this requirement does not apply
609
+ if neither you nor any third party retains the ability to install
610
+ modified object code on the User Product (for example, the work has
611
+ been installed in ROM).
612
+
613
+ The requirement to provide Installation Information does not include a
614
+ requirement to continue to provide support service, warranty, or updates
615
+ for a work that has been modified or installed by the recipient, or for
616
+ the User Product in which it has been modified or installed. Access to a
617
+ network may be denied when the modification itself materially and
618
+ adversely affects the operation of the network or violates the rules and
619
+ protocols for communication across the network.
620
+
621
+ Corresponding Source conveyed, and Installation Information provided,
622
+ in accord with this section must be in a format that is publicly
623
+ documented (and with an implementation available to the public in
624
+ source code form), and must require no special password or key for
625
+ unpacking, reading or copying.
626
+
627
+ 7. Additional Terms.
628
+
629
+ "Additional permissions" are terms that supplement the terms of this
630
+ License by making exceptions from one or more of its conditions.
631
+ Additional permissions that are applicable to the entire Program shall
632
+ be treated as though they were included in this License, to the extent
633
+ that they are valid under applicable law. If additional permissions
634
+ apply only to part of the Program, that part may be used separately
635
+ under those permissions, but the entire Program remains governed by
636
+ this License without regard to the additional permissions.
637
+
638
+ When you convey a copy of a covered work, you may at your option
639
+ remove any additional permissions from that copy, or from any part of
640
+ it. (Additional permissions may be written to require their own
641
+ removal in certain cases when you modify the work.) You may place
642
+ additional permissions on material, added by you to a covered work,
643
+ for which you have or can give appropriate copyright permission.
644
+
645
+ Notwithstanding any other provision of this License, for material you
646
+ add to a covered work, you may (if authorized by the copyright holders of
647
+ that material) supplement the terms of this License with terms:
648
+
649
+ a) Disclaiming warranty or limiting liability differently from the
650
+ terms of sections 15 and 16 of this License; or
651
+
652
+ b) Requiring preservation of specified reasonable legal notices or
653
+ author attributions in that material or in the Appropriate Legal
654
+ Notices displayed by works containing it; or
655
+
656
+ c) Prohibiting misrepresentation of the origin of that material, or
657
+ requiring that modified versions of such material be marked in
658
+ reasonable ways as different from the original version; or
659
+
660
+ d) Limiting the use for publicity purposes of names of licensors or
661
+ authors of the material; or
662
+
663
+ e) Declining to grant rights under trademark law for use of some
664
+ trade names, trademarks, or service marks; or
665
+
666
+ f) Requiring indemnification of licensors and authors of that
667
+ material by anyone who conveys the material (or modified versions of
668
+ it) with contractual assumptions of liability to the recipient, for
669
+ any liability that these contractual assumptions directly impose on
670
+ those licensors and authors.
671
+
672
+ All other non-permissive additional terms are considered "further
673
+ restrictions" within the meaning of section 10. If the Program as you
674
+ received it, or any part of it, contains a notice stating that it is
675
+ governed by this License along with a term that is a further
676
+ restriction, you may remove that term. If a license document contains
677
+ a further restriction but permits relicensing or conveying under this
678
+ License, you may add to a covered work material governed by the terms
679
+ of that license document, provided that the further restriction does
680
+ not survive such relicensing or conveying.
681
+
682
+ If you add terms to a covered work in accord with this section, you
683
+ must place, in the relevant source files, a statement of the
684
+ additional terms that apply to those files, or a notice indicating
685
+ where to find the applicable terms.
686
+
687
+ Additional terms, permissive or non-permissive, may be stated in the
688
+ form of a separately written license, or stated as exceptions;
689
+ the above requirements apply either way.
690
+
691
+ 8. Termination.
692
+
693
+ You may not propagate or modify a covered work except as expressly
694
+ provided under this License. Any attempt otherwise to propagate or
695
+ modify it is void, and will automatically terminate your rights under
696
+ this License (including any patent licenses granted under the third
697
+ paragraph of section 11).
698
+
699
+ However, if you cease all violation of this License, then your
700
+ license from a particular copyright holder is reinstated (a)
701
+ provisionally, unless and until the copyright holder explicitly and
702
+ finally terminates your license, and (b) permanently, if the copyright
703
+ holder fails to notify you of the violation by some reasonable means
704
+ prior to 60 days after the cessation.
705
+
706
+ Moreover, your license from a particular copyright holder is
707
+ reinstated permanently if the copyright holder notifies you of the
708
+ violation by some reasonable means, this is the first time you have
709
+ received notice of violation of this License (for any work) from that
710
+ copyright holder, and you cure the violation prior to 30 days after
711
+ your receipt of the notice.
712
+
713
+ Termination of your rights under this section does not terminate the
714
+ licenses of parties who have received copies or rights from you under
715
+ this License. If your rights have been terminated and not permanently
716
+ reinstated, you do not qualify to receive new licenses for the same
717
+ material under section 10.
718
+
719
+ 9. Acceptance Not Required for Having Copies.
720
+
721
+ You are not required to accept this License in order to receive or
722
+ run a copy of the Program. Ancillary propagation of a covered work
723
+ occurring solely as a consequence of using peer-to-peer transmission
724
+ to receive a copy likewise does not require acceptance. However,
725
+ nothing other than this License grants you permission to propagate or
726
+ modify any covered work. These actions infringe copyright if you do
727
+ not accept this License. Therefore, by modifying or propagating a
728
+ covered work, you indicate your acceptance of this License to do so.
729
+
730
+ 10. Automatic Licensing of Downstream Recipients.
731
+
732
+ Each time you convey a covered work, the recipient automatically
733
+ receives a license from the original licensors, to run, modify and
734
+ propagate that work, subject to this License. You are not responsible
735
+ for enforcing compliance by third parties with this License.
736
+
737
+ An "entity transaction" is a transaction transferring control of an
738
+ organization, or substantially all assets of one, or subdividing an
739
+ organization, or merging organizations. If propagation of a covered
740
+ work results from an entity transaction, each party to that
741
+ transaction who receives a copy of the work also receives whatever
742
+ licenses to the work the party's predecessor in interest had or could
743
+ give under the previous paragraph, plus a right to possession of the
744
+ Corresponding Source of the work from the predecessor in interest, if
745
+ the predecessor has it or can get it with reasonable efforts.
746
+
747
+ You may not impose any further restrictions on the exercise of the
748
+ rights granted or affirmed under this License. For example, you may
749
+ not impose a license fee, royalty, or other charge for exercise of
750
+ rights granted under this License, and you may not initiate litigation
751
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
752
+ any patent claim is infringed by making, using, selling, offering for
753
+ sale, or importing the Program or any portion of it.
754
+
755
+ 11. Patents.
756
+
757
+ A "contributor" is a copyright holder who authorizes use under this
758
+ License of the Program or a work on which the Program is based. The
759
+ work thus licensed is called the contributor's "contributor version".
760
+
761
+ A contributor's "essential patent claims" are all patent claims
762
+ owned or controlled by the contributor, whether already acquired or
763
+ hereafter acquired, that would be infringed by some manner, permitted
764
+ by this License, of making, using, or selling its contributor version,
765
+ but do not include claims that would be infringed only as a
766
+ consequence of further modification of the contributor version. For
767
+ purposes of this definition, "control" includes the right to grant
768
+ patent sublicenses in a manner consistent with the requirements of
769
+ this License.
770
+
771
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
772
+ patent license under the contributor's essential patent claims, to
773
+ make, use, sell, offer for sale, import and otherwise run, modify and
774
+ propagate the contents of its contributor version.
775
+
776
+ In the following three paragraphs, a "patent license" is any express
777
+ agreement or commitment, however denominated, not to enforce a patent
778
+ (such as an express permission to practice a patent or covenant not to
779
+ sue for patent infringement). To "grant" such a patent license to a
780
+ party means to make such an agreement or commitment not to enforce a
781
+ patent against the party.
782
+
783
+ If you convey a covered work, knowingly relying on a patent license,
784
+ and the Corresponding Source of the work is not available for anyone
785
+ to copy, free of charge and under the terms of this License, through a
786
+ publicly available network server or other readily accessible means,
787
+ then you must either (1) cause the Corresponding Source to be so
788
+ available, or (2) arrange to deprive yourself of the benefit of the
789
+ patent license for this particular work, or (3) arrange, in a manner
790
+ consistent with the requirements of this License, to extend the patent
791
+ license to downstream recipients. "Knowingly relying" means you have
792
+ actual knowledge that, but for the patent license, your conveying the
793
+ covered work in a country, or your recipient's use of the covered work
794
+ in a country, would infringe one or more identifiable patents in that
795
+ country that you have reason to believe are valid.
796
+
797
+ If, pursuant to or in connection with a single transaction or
798
+ arrangement, you convey, or propagate by procuring conveyance of, a
799
+ covered work, and grant a patent license to some of the parties
800
+ receiving the covered work authorizing them to use, propagate, modify
801
+ or convey a specific copy of the covered work, then the patent license
802
+ you grant is automatically extended to all recipients of the covered
803
+ work and works based on it.
804
+
805
+ A patent license is "discriminatory" if it does not include within
806
+ the scope of its coverage, prohibits the exercise of, or is
807
+ conditioned on the non-exercise of one or more of the rights that are
808
+ specifically granted under this License. You may not convey a covered
809
+ work if you are a party to an arrangement with a third party that is
810
+ in the business of distributing software, under which you make payment
811
+ to the third party based on the extent of your activity of conveying
812
+ the work, and under which the third party grants, to any of the
813
+ parties who would receive the covered work from you, a discriminatory
814
+ patent license (a) in connection with copies of the covered work
815
+ conveyed by you (or copies made from those copies), or (b) primarily
816
+ for and in connection with specific products or compilations that
817
+ contain the covered work, unless you entered into that arrangement,
818
+ or that patent license was granted, prior to 28 March 2007.
819
+
820
+ Nothing in this License shall be construed as excluding or limiting
821
+ any implied license or other defenses to infringement that may
822
+ otherwise be available to you under applicable patent law.
823
+
824
+ 12. No Surrender of Others' Freedom.
825
+
826
+ If conditions are imposed on you (whether by court order, agreement or
827
+ otherwise) that contradict the conditions of this License, they do not
828
+ excuse you from the conditions of this License. If you cannot convey a
829
+ covered work so as to satisfy simultaneously your obligations under this
830
+ License and any other pertinent obligations, then as a consequence you may
831
+ not convey it at all. For example, if you agree to terms that obligate you
832
+ to collect a royalty for further conveying from those to whom you convey
833
+ the Program, the only way you could satisfy both those terms and this
834
+ License would be to refrain entirely from conveying the Program.
835
+
836
+ 13. Use with the GNU Affero General Public License.
837
+
838
+ Notwithstanding any other provision of this License, you have
839
+ permission to link or combine any covered work with a work licensed
840
+ under version 3 of the GNU Affero General Public License into a single
841
+ combined work, and to convey the resulting work. The terms of this
842
+ License will continue to apply to the part which is the covered work,
843
+ but the special requirements of the GNU Affero General Public License,
844
+ section 13, concerning interaction through a network will apply to the
845
+ combination as such.
846
+
847
+ 14. Revised Versions of this License.
848
+
849
+ The Free Software Foundation may publish revised and/or new versions of
850
+ the GNU General Public License from time to time. Such new versions will
851
+ be similar in spirit to the present version, but may differ in detail to
852
+ address new problems or concerns.
853
+
854
+ Each version is given a distinguishing version number. If the
855
+ Program specifies that a certain numbered version of the GNU General
856
+ Public License "or any later version" applies to it, you have the
857
+ option of following the terms and conditions either of that numbered
858
+ version or of any later version published by the Free Software
859
+ Foundation. If the Program does not specify a version number of the
860
+ GNU General Public License, you may choose any version ever published
861
+ by the Free Software Foundation.
862
+
863
+ If the Program specifies that a proxy can decide which future
864
+ versions of the GNU General Public License can be used, that proxy's
865
+ public statement of acceptance of a version permanently authorizes you
866
+ to choose that version for the Program.
867
+
868
+ Later license versions may give you additional or different
869
+ permissions. However, no additional obligations are imposed on any
870
+ author or copyright holder as a result of your choosing to follow a
871
+ later version.
872
+
873
+ 15. Disclaimer of Warranty.
874
+
875
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
876
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
877
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
878
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
879
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
880
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
881
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
882
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
883
+
884
+ 16. Limitation of Liability.
885
+
886
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
887
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
888
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
889
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
890
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
891
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
892
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
893
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
894
+ SUCH DAMAGES.
895
+
896
+ 17. Interpretation of Sections 15 and 16.
897
+
898
+ If the disclaimer of warranty and limitation of liability provided
899
+ above cannot be given local legal effect according to their terms,
900
+ reviewing courts shall apply local law that most closely approximates
901
+ an absolute waiver of all civil liability in connection with the
902
+ Program, unless a warranty or assumption of liability accompanies a
903
+ copy of the Program in return for a fee.
904
+
905
+ END OF TERMS AND CONDITIONS
906
+
907
+ How to Apply These Terms to Your New Programs
908
+
909
+ If you develop a new program, and you want it to be of the greatest
910
+ possible use to the public, the best way to achieve this is to make it
911
+ free software which everyone can redistribute and change under these terms.
912
+
913
+ To do so, attach the following notices to the program. It is safest
914
+ to attach them to the start of each source file to most effectively
915
+ state the exclusion of warranty; and each file should have at least
916
+ the "copyright" line and a pointer to where the full notice is found.
917
+
918
+ <one line to give the program's name and a brief idea of what it does.>
919
+ Copyright (C) <year> <name of author>
920
+
921
+ This program is free software: you can redistribute it and/or modify
922
+ it under the terms of the GNU General Public License as published by
923
+ the Free Software Foundation, either version 3 of the License, or
924
+ (at your option) any later version.
925
+
926
+ This program is distributed in the hope that it will be useful,
927
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
928
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
929
+ GNU General Public License for more details.
930
+
931
+ You should have received a copy of the GNU General Public License
932
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
933
+
934
+ Also add information on how to contact you by electronic and paper mail.
935
+
936
+ If the program does terminal interaction, make it output a short
937
+ notice like this when it starts in an interactive mode:
938
+
939
+ <program> Copyright (C) <year> <name of author>
940
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
941
+ This is free software, and you are welcome to redistribute it
942
+ under certain conditions; type `show c' for details.
943
+
944
+ The hypothetical commands `show w' and `show c' should show the appropriate
945
+ parts of the General Public License. Of course, your program's commands
946
+ might be different; for a GUI interface, you would use an "about box".
947
+
948
+ You should also get your employer (if you work as a programmer) or school,
949
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
950
+ For more information on this, and how to apply and follow the GNU GPL, see
951
+ <http://www.gnu.org/licenses/>.
952
+
953
+ The GNU General Public License does not permit incorporating your program
954
+ into proprietary programs. If your program is a subroutine library, you
955
+ may consider it more useful to permit linking proprietary applications with
956
+ the library. If this is what you want to do, use the GNU Lesser General
957
+ Public License instead of this License. But first, please read
958
+ <http://www.gnu.org/philosophy/why-not-lgpl.html>.
959
+
960
+ Name: libquadmath
961
+ Files: numpy.libs/libquadmath*.so
962
+ Description: dynamically linked to files compiled with gcc
963
+ Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libquadmath
964
+ License: LGPL-2.1-or-later
965
+
966
+ GCC Quad-Precision Math Library
967
+ Copyright (C) 2010-2019 Free Software Foundation, Inc.
968
+ Written by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
969
+
970
+ This file is part of the libquadmath library.
971
+ Libquadmath is free software; you can redistribute it and/or
972
+ modify it under the terms of the GNU Library General Public
973
+ License as published by the Free Software Foundation; either
974
+ version 2.1 of the License, or (at your option) any later version.
975
+
976
+ Libquadmath is distributed in the hope that it will be useful,
977
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
978
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
979
+ Lesser General Public License for more details.
980
+ https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
981
+ Classifier: Development Status :: 5 - Production/Stable
982
+ Classifier: Intended Audience :: Science/Research
983
+ Classifier: Intended Audience :: Developers
984
+ Classifier: License :: OSI Approved :: BSD License
985
+ Classifier: Programming Language :: C
986
+ Classifier: Programming Language :: Python
987
+ Classifier: Programming Language :: Python :: 3
988
+ Classifier: Programming Language :: Python :: 3.9
989
+ Classifier: Programming Language :: Python :: 3.10
990
+ Classifier: Programming Language :: Python :: 3.11
991
+ Classifier: Programming Language :: Python :: 3.12
992
+ Classifier: Programming Language :: Python :: 3 :: Only
993
+ Classifier: Programming Language :: Python :: Implementation :: CPython
994
+ Classifier: Topic :: Software Development
995
+ Classifier: Topic :: Scientific/Engineering
996
+ Classifier: Typing :: Typed
997
+ Classifier: Operating System :: Microsoft :: Windows
998
+ Classifier: Operating System :: POSIX
999
+ Classifier: Operating System :: Unix
1000
+ Classifier: Operating System :: MacOS
1001
+ Project-URL: Homepage, https://numpy.org
1002
+ Project-URL: Documentation, https://numpy.org/doc/
1003
+ Project-URL: Source, https://github.com/numpy/numpy
1004
+ Project-URL: Download, https://pypi.org/project/numpy/#files
1005
+ Project-URL: Tracker, https://github.com/numpy/numpy/issues
1006
+ Project-URL: Release notes, https://numpy.org/doc/stable/release
1007
+ Requires-Python: <3.13,>=3.9
1008
+ Description-Content-Type: text/markdown
1009
+
1010
+ <h1 align="center">
1011
+ <img src="https://raw.githubusercontent.com/numpy/numpy/main/branding/logo/primary/numpylogo.svg" width="300">
1012
+ </h1><br>
1013
+
1014
+
1015
+ [![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](
1016
+ https://numfocus.org)
1017
+ [![PyPI Downloads](https://img.shields.io/pypi/dm/numpy.svg?label=PyPI%20downloads)](
1018
+ https://pypi.org/project/numpy/)
1019
+ [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/numpy.svg?label=Conda%20downloads)](
1020
+ https://anaconda.org/conda-forge/numpy)
1021
+ [![Stack Overflow](https://img.shields.io/badge/stackoverflow-Ask%20questions-blue.svg)](
1022
+ https://stackoverflow.com/questions/tagged/numpy)
1023
+ [![Nature Paper](https://img.shields.io/badge/DOI-10.1038%2Fs41592--019--0686--2-blue)](
1024
+ https://doi.org/10.1038/s41586-020-2649-2)
1025
+ [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/numpy/numpy/badge)](https://api.securityscorecards.dev/projects/github.com/numpy/numpy)
1026
+
1027
+
1028
+ NumPy is the fundamental package for scientific computing with Python.
1029
+
1030
+ - **Website:** https://www.numpy.org
1031
+ - **Documentation:** https://numpy.org/doc
1032
+ - **Mailing list:** https://mail.python.org/mailman/listinfo/numpy-discussion
1033
+ - **Source code:** https://github.com/numpy/numpy
1034
+ - **Contributing:** https://www.numpy.org/devdocs/dev/index.html
1035
+ - **Bug reports:** https://github.com/numpy/numpy/issues
1036
+ - **Report a security vulnerability:** https://tidelift.com/docs/security
1037
+
1038
+ It provides:
1039
+
1040
+ - a powerful N-dimensional array object
1041
+ - sophisticated (broadcasting) functions
1042
+ - tools for integrating C/C++ and Fortran code
1043
+ - useful linear algebra, Fourier transform, and random number capabilities
1044
+
1045
+ Testing:
1046
+
1047
+ NumPy requires `pytest` and `hypothesis`. Tests can then be run after installation with:
1048
+
1049
+ python -c "import numpy, sys; sys.exit(numpy.test() is False)"
1050
+
1051
+ Code of Conduct
1052
+ ----------------------
1053
+
1054
+ NumPy is a community-driven open source project developed by a diverse group of
1055
+ [contributors](https://numpy.org/teams/). The NumPy leadership has made a strong
1056
+ commitment to creating an open, inclusive, and positive community. Please read the
1057
+ [NumPy Code of Conduct](https://numpy.org/code-of-conduct/) for guidance on how to interact
1058
+ with others in a way that makes our community thrive.
1059
+
1060
+ Call for Contributions
1061
+ ----------------------
1062
+
1063
+ The NumPy project welcomes your expertise and enthusiasm!
1064
+
1065
+ Small improvements or fixes are always appreciated. If you are considering larger contributions
1066
+ to the source code, please contact us through the [mailing
1067
+ list](https://mail.python.org/mailman/listinfo/numpy-discussion) first.
1068
+
1069
+ Writing code isn’t the only way to contribute to NumPy. You can also:
1070
+ - review pull requests
1071
+ - help us stay on top of new and old issues
1072
+ - develop tutorials, presentations, and other educational materials
1073
+ - maintain and improve [our website](https://github.com/numpy/numpy.org)
1074
+ - develop graphic design for our brand assets and promotional materials
1075
+ - translate website content
1076
+ - help with outreach and onboard new contributors
1077
+ - write grant proposals and help with other fundraising efforts
1078
+
1079
+ For more information about the ways you can contribute to NumPy, visit [our website](https://numpy.org/contribute/).
1080
+ If you’re unsure where to start or how your skills fit in, reach out! You can
1081
+ ask on the mailing list or here, on GitHub, by opening a new issue or leaving a
1082
+ comment on a relevant issue that is already open.
1083
+
1084
+ Our preferred channels of communication are all public, but if you’d like to
1085
+ speak to us in private first, contact our community coordinators at
1086
+ numpy-team@googlegroups.com or on Slack (write numpy-team@googlegroups.com for
1087
+ an invitation).
1088
+
1089
+ We also have a biweekly community call, details of which are announced on the
1090
+ mailing list. You are very welcome to join.
1091
+
1092
+ If you are new to contributing to open source, [this
1093
+ guide](https://opensource.guide/how-to-contribute/) helps explain why, what,
1094
+ and how to successfully get involved.
.venv/lib/python3.11/site-packages/numpy-1.26.1.dist-info/RECORD ADDED
@@ -0,0 +1,902 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ numpy.libs/libopenblas64_p-r0-0cf96a72.3.23.dev.so,sha256=klTQhU3XYV4R3ijXca5AiHjKgSOnrCBPIeTMejdswuU,35123345
2
+ numpy.libs/libquadmath-96973f99.so.0.0.0,sha256=k0wi3tDn0WnE1GeIdslgUa3z2UVF2pYvYLQWWbB12js,247609
3
+ numpy.libs/libgfortran-040039e1.so.5.0.0,sha256=FK-zEpsai1C8QKOwggx_EVLqm8EBIaqxUpQ_cFdHKIY,2686065
4
+ numpy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ numpy/_pytesttester.pyi,sha256=OtyXSiuSy8o_78w3QNQRjMLpvvNyEdC0aMsx6T-vRxU,489
6
+ numpy/exceptions.py,sha256=7j7tv8cwXGZYgldyMisGmnAxAl2s4YU0vexME81yYlA,7339
7
+ numpy/_globals.py,sha256=neEdcfLZoHLwber_1Xyrn26LcXy0MrSta03Ze7aKa6g,3094
8
+ numpy/__init__.pyi,sha256=9kK465XL9oS_X3fJLv0Na29NEYnWvtdMhXPtrnF_cG8,154080
9
+ numpy/dtypes.py,sha256=BuBztrPQRasUmVZhXr2_NgJujdUTNhNwd59pZZHk3lA,2229
10
+ numpy/exceptions.pyi,sha256=KsZqWNvyPUEXUGR9EhZCUQF2f9EVSpBRlJUlGqRT02k,600
11
+ numpy/dtypes.pyi,sha256=tIHniAYP7ALg2iT7NgSXO67jvE-zRlDod3MazEmD4M8,1315
12
+ numpy/ctypeslib.py,sha256=Po4XCWfxhwFQ1Q8x8DeayGiMCJLxREaCDkVyeladxBU,17247
13
+ numpy/__init__.pxd,sha256=oIzJihkScls0oyPYF_IUw5Ez8O4VPTZBkjzehCdW-XQ,35043
14
+ numpy/_pytesttester.py,sha256=lQUTvKVz6kT8b4yiMV-uW-vG9KSv9UzqAmxaEMezTd8,6731
15
+ numpy/_distributor_init.py,sha256=IKy2THwmu5UgBjtVbwbD9H-Ap8uaUJoPJ2btQ4Jatdo,407
16
+ numpy/matlib.py,sha256=-54vTuGIgeTMg9ZUmElRPZ4Hr-XZ-om9xLzAsSoTvnc,10465
17
+ numpy/__init__.cython-30.pxd,sha256=J-MgkiaacdhG9Raxxr1YMltN0vk4N0fHHLuTBgMMZlg,36674
18
+ numpy/conftest.py,sha256=HZyWo_wJyrbgnyXxI8t05WOg_IrzNAMnEV7O8koHous,4623
19
+ numpy/__init__.py,sha256=EalFXrQpfkU1Flf1pg8ZjCGDHHo5X4xZpzYfsu33heU,16754
20
+ numpy/__config__.py,sha256=MVO9knB4SHjCHrXrxa_cf4yi49iK-U4sE-f1TqhvO58,4623
21
+ numpy/version.py,sha256=J_Lq8YnYpxcXpUCNNh-FwIQpf3pd0si5bJQ7wUB-J-I,216
22
+ numpy/ctypeslib.pyi,sha256=A9te473aRO920iDVuyKypeVIQp-ueZK6EiI-qLSwJNg,7972
23
+ numpy/polynomial/polyutils.py,sha256=Xy5qjdrjnRaqSlClG1ROmwWccLkAPC7IcHaNJLvhCf4,23237
24
+ numpy/polynomial/__init__.pyi,sha256=W8szYtVUy0RUi83jmFLK58BN8CKVSoHA2CW7IcdUl1c,701
25
+ numpy/polynomial/polyutils.pyi,sha256=cFAyZ9Xzuw8Huhn9FEz4bhyD00m2Dp-2DiUSyogJwSo,264
26
+ numpy/polynomial/_polybase.pyi,sha256=J7yU9PPZW4W8mkqAltDfnL4ZNwljuM-bDEj4DPTJZpY,2321
27
+ numpy/polynomial/_polybase.py,sha256=YEnnQwlTgbn3dyD89ueraUx5nxx3x_pH6K6mmyEmhi8,39271
28
+ numpy/polynomial/hermite.pyi,sha256=hdsvTULow8bIjnATudf0i6brpLHV7vbOoHzaMvbjMy0,1217
29
+ numpy/polynomial/hermite_e.py,sha256=jRR3f8Oth8poV2Ix8c0eLEQR3UZary-2RupOrEAEUMY,52642
30
+ numpy/polynomial/hermite_e.pyi,sha256=zV7msb9v9rV0iv_rnD3SjP-TGyc6pd3maCqiPCj3PbA,1238
31
+ numpy/polynomial/legendre.py,sha256=wjtgFajmKEbYkSUk3vWSCveMHDP6UymK28bNUk4Ov0s,51550
32
+ numpy/polynomial/laguerre.py,sha256=mcVw0ckWVX-kzJ1QIhdcuuxzPjuFmA3plQLkloQMOYM,50858
33
+ numpy/polynomial/laguerre.pyi,sha256=Gxc9SLISNKMWrKdsVJ9fKFFFwfxxZzfF-Yc-2r__z5M,1178
34
+ numpy/polynomial/polynomial.pyi,sha256=bOPRnub4xXxsUwNGeiQLTT4PCfN1ysSrf6LBZIcAN2Y,1132
35
+ numpy/polynomial/setup.py,sha256=dXQfzVUMP9OcB6iKv5yo1GLEwFB3gJ48phIgo4N-eM0,373
36
+ numpy/polynomial/polynomial.py,sha256=XsaZPHmLGJFqpJs7rPvO5E0loWQ1L3YHLIUybVu4dU8,49112
37
+ numpy/polynomial/chebyshev.py,sha256=NZCKjIblcX99foqZyp51i0_r8p0r1VKVGZFmQ1__kEk,62796
38
+ numpy/polynomial/legendre.pyi,sha256=9dmANwkxf7EbOHV3XQBPoaDtc56cCkf75Wo7FG9Zfj4,1178
39
+ numpy/polynomial/__init__.py,sha256=braLh6zP2QwuNKRKAaZGdC_qKWZ-tJlc3BN83LeuE_0,6781
40
+ numpy/polynomial/chebyshev.pyi,sha256=035CNdOas4dnb6lFLzRiBrYT_VnWh2T1-A3ibm_HYkI,1387
41
+ numpy/polynomial/hermite.py,sha256=t5CFM-qE4tszYJiQZ301VcMn7IM67y2rUZPFPtnVRAc,52514
42
+ numpy/polynomial/tests/test_laguerre.py,sha256=BZOgs49VBXOFBepHopxuEDkIROHEvFBfWe4X73UZhn8,17511
43
+ numpy/polynomial/tests/test_hermite_e.py,sha256=_A3ohAWS4HXrQG06S8L47dImdZGTwYosCXnoyw7L45o,18911
44
+ numpy/polynomial/tests/test_hermite.py,sha256=N9b2dx2UWPyja5v02dSoWYPnKvb6H-Ozgtrx-xjWz2k,18577
45
+ numpy/polynomial/tests/test_polyutils.py,sha256=IxkbVfpcBqe5lOZluHFUPbLATLu1rwVg7ghLASpfYrY,3579
46
+ numpy/polynomial/tests/test_symbol.py,sha256=msTPv7B1niaKujU33kuZmdxJvLYvOjfl1oykmlL0dXo,5371
47
+ numpy/polynomial/tests/test_legendre.py,sha256=b_bblHs0F_BWw9ESuSq52ZsLKcQKFR5eqPf_SppWFqo,18673
48
+ numpy/polynomial/tests/test_polynomial.py,sha256=4cuO8-5wdIxcz5CrucB5Ix7ySuMROokUF12F7ogQ_hc,20529
49
+ numpy/polynomial/tests/test_classes.py,sha256=DFyY2IQBj3r2GZkvbRIeZO2EEY466xbuwc4PShAl4Sw,18331
50
+ numpy/polynomial/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
+ numpy/polynomial/tests/test_chebyshev.py,sha256=6tMsFP1h7K8Zf72mNOta6Tv52_fVTlXknseuffj080c,20522
52
+ numpy/polynomial/tests/test_printing.py,sha256=rfP4MaQbjGcO52faHmYrgsaarkm3Ndi3onwr6DDuapE,20525
53
+ numpy/random/_bounded_integers.pxd,sha256=hcoucPH5hkFEM2nm12zYO-5O_Rt8RujEXT5YWuAzl1Q,1669
54
+ numpy/random/_sfc64.cpython-311-x86_64-linux-gnu.so,sha256=AKP8PjpclNd8OCovH0Ng03S-w82dhAENQURVgggasIY,76760
55
+ numpy/random/_philox.cpython-311-x86_64-linux-gnu.so,sha256=4xJMcT4CHquR-SS9_ckJ0s_OyLjkdckyux-gqJHwJTg,107480
56
+ numpy/random/_common.pxd,sha256=s2_IdIQ0MhNbogamulvXe-b93wbx882onmYkxqswwpo,4939
57
+ numpy/random/bit_generator.pyi,sha256=aXv7a_hwa0nkjY8P2YENslwWp89UcFRn09woXh7Uoc0,3510
58
+ numpy/random/LICENSE.md,sha256=EDFmtiuARDr7nrNIjgUuoGvgz_VmuQjxmeVh_eSa8Z8,3511
59
+ numpy/random/__init__.pyi,sha256=RfW8mco48UaWDL1UC5ROv9vXiFZ9EGho62avhgEAHPc,2143
60
+ numpy/random/_pcg64.cpython-311-x86_64-linux-gnu.so,sha256=ONJ2HoU-Lvq7x1vCzbE3gWhUc_CQFGDQwxlMgfgrHAM,126448
61
+ numpy/random/_pcg64.pyi,sha256=uxr5CbEJetN6lv9vBG21jlRhuzOK8SQnXrwqAQBxj_c,1091
62
+ numpy/random/bit_generator.cpython-311-x86_64-linux-gnu.so,sha256=Pa575CgIHVJZslXx8MRVi_be51alTF8XC_aDRn2TN7A,242584
63
+ numpy/random/c_distributions.pxd,sha256=7DE-mV3H_Dihk4OK4gMHHkyD4tPX1cAi4570zi5CI30,6344
64
+ numpy/random/_bounded_integers.cpython-311-x86_64-linux-gnu.so,sha256=vkMFl0B9ItsuSGdlRUBGFNIIOk0gVgZY54QBMR0gE04,379288
65
+ numpy/random/_mt19937.cpython-311-x86_64-linux-gnu.so,sha256=a9p86jlR4wvo36WY8_sqYxjT6GoG21tvdlodkt57vFY,120416
66
+ numpy/random/_sfc64.pyi,sha256=09afHTedVW-519493ZXtGcl-H-_zluj-B_yfEJG8MMs,709
67
+ numpy/random/_philox.pyi,sha256=OKlaiIU-hj72Bp04zjNifwusOD_3-mYxIfvyuys8c_o,978
68
+ numpy/random/__init__.pxd,sha256=9JbnX540aJNSothGs-7e23ozhilG6U8tINOUEp08M_k,431
69
+ numpy/random/_pickle.py,sha256=4NhdT-yk7C0m3tyZWmouYAs3ZGNPdPVNGfUIyuh8HDY,2318
70
+ numpy/random/_generator.cpython-311-x86_64-linux-gnu.so,sha256=68w7BZAshXJ6LOR9GVHl_IjmQ5elueYIp2ZgSsWCpU8,984688
71
+ numpy/random/_common.cpython-311-x86_64-linux-gnu.so,sha256=5O0uuntIvgF8gfKseNRBHdQwS0h4rFSf7nBfoua-BB0,272312
72
+ numpy/random/mtrand.cpython-311-x86_64-linux-gnu.so,sha256=TSF5rZSQR0_xnIFnxA-AofwsMwoCruv55ti0lOMXR40,783848
73
+ numpy/random/__init__.py,sha256=81Thnexg5umN5WZwD5TRyzNc2Yp-d14B6UC7NBgVKh8,7506
74
+ numpy/random/_mt19937.pyi,sha256=_iZKaAmuKBQ4itSggfQvYYj_KjktcN4rt-YpE6bqFAM,724
75
+ numpy/random/mtrand.pyi,sha256=3vAGOXsvyFFv0yZl34pVVPP7Dgt22COyfn4tUoi_hEQ,19753
76
+ numpy/random/bit_generator.pxd,sha256=lArpIXSgTwVnJMYc4XX0NGxegXq3h_QsUDK6qeZKbNc,1007
77
+ numpy/random/_generator.pyi,sha256=zRvo_y6g0pWkE4fO1M9jLYUkxDfGdA6Enreb3U2AADM,22442
78
+ numpy/random/_examples/cffi/parse.py,sha256=Bnb7t_6S_c5-3dZrQ-XX9EazOKhftUfcCejXXWyd1EU,1771
79
+ numpy/random/_examples/cffi/extending.py,sha256=xSla3zWqxi6Hj48EvnYfD3WHfE189VvC4XsKu4_T_Iw,880
80
+ numpy/random/_examples/numba/extending_distributions.py,sha256=Jnr9aWkHyIWygNbdae32GVURK-5T9BTGhuExRpvve98,2034
81
+ numpy/random/_examples/numba/extending.py,sha256=Ipyzel_h5iU_DMJ_vnXUgQC38uMDMn7adUpWSeEQLFE,1957
82
+ numpy/random/_examples/cython/extending.pyx,sha256=4IE692pq1V53UhPZqQiQGcIHXDoNyqTx62x5a36puVg,2290
83
+ numpy/random/_examples/cython/extending_distributions.pyx,sha256=oazFVWeemfE0eDzax7r7MMHNL1_Yofws2m-c_KT2Hbo,3870
84
+ numpy/random/_examples/cython/meson.build,sha256=rXtugURMEo-ef4bPE1QIv4mzvWbeGjmcTdKCBvjxjtw,1443
85
+ numpy/random/lib/libnpyrandom.a,sha256=xUcvOvieju5PThPQ8q0-uGJ5fjsCd5umnjIerIc85Sg,71926
86
+ numpy/random/tests/test_random.py,sha256=_H2huqON_M0L906tFVIMivzVp-6IeCzVHFBDCpwgoP0,69953
87
+ numpy/random/tests/test_generator_mt19937_regressions.py,sha256=xGkdz76BMX1EK0QPfabVxpNx9qQ9OC-1ZStWOs6N_M8,6387
88
+ numpy/random/tests/test_smoke.py,sha256=jjNz0aEGD1_oQl9a9UWt6Mz_298alG7KryLT1pgHljw,28183
89
+ numpy/random/tests/test_generator_mt19937.py,sha256=35LBwV6TtWPnxhefutxTQmhLzAQ5Ee4YiY8ziDXM-eQ,115477
90
+ numpy/random/tests/test_seed_sequence.py,sha256=GNRJ4jyzrtfolOND3gUWamnbvK6-b_p1bBK_RIG0sfU,3311
91
+ numpy/random/tests/test_randomstate.py,sha256=IneeUEuiMFVdzPdi8CtnFfqdx1stzSVyaGW-qlM-7CI,84877
92
+ numpy/random/tests/test_direct.py,sha256=6vLpCyeKnAWFEZei7l2YihVLQ0rSewO1hJBWt7A5fyQ,17779
93
+ numpy/random/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
94
+ numpy/random/tests/test_randomstate_regression.py,sha256=VucYWIjA7sAquWsalvZMnfkmYLM1O6ysyWnLl931-lA,7917
95
+ numpy/random/tests/test_regression.py,sha256=trntK51UvajOVELiluEO85l64CKSw5nvBSc5SqYyr9w,5439
96
+ numpy/random/tests/test_extending.py,sha256=S3Wrzu3di4uBhr-Pxnx5dOPvlBY0FRdZqVX6CC1IN6s,4038
97
+ numpy/random/tests/data/pcg64dxsm-testset-2.csv,sha256=uylS8PU2AIKZ185OC04RBr_OePweGRtvn-dE4YN0yYA,23839
98
+ numpy/random/tests/data/philox-testset-1.csv,sha256=SedRaIy5zFadmk71nKrGxCFZ6BwKz8g1A9-OZp3IkkY,23852
99
+ numpy/random/tests/data/sfc64-testset-1.csv,sha256=iHs6iX6KR8bxGwKk-3tedAdMPz6ZW8slDSUECkAqC8Q,23840
100
+ numpy/random/tests/data/pcg64dxsm-testset-1.csv,sha256=vNSUT-gXS_oEw_awR3O30ziVO4seNPUv1UIZ01SfVnI,23833
101
+ numpy/random/tests/data/pcg64-testset-2.csv,sha256=NTdzTKvG2U7_WyU_IoQUtMzU3kEvDH39CgnR6VzhTkw,23845
102
+ numpy/random/tests/data/mt19937-testset-2.csv,sha256=nsBEQNnff-aFjHYK4thjvUK4xSXDSfv5aTbcE59pOkE,15825
103
+ numpy/random/tests/data/philox-testset-2.csv,sha256=dWECt-sbfvaSiK8-Ygp5AqyjoN5i26VEOrXqg01rk3g,23838
104
+ numpy/random/tests/data/pcg64-testset-1.csv,sha256=xB00DpknGUTTCxDr9L6aNo9Hs-sfzEMbUSS4t11TTfE,23839
105
+ numpy/random/tests/data/mt19937-testset-1.csv,sha256=Xkef402AVB-eZgYQkVtoxERHkxffCA9Jyt_oMbtJGwY,15844
106
+ numpy/random/tests/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
107
+ numpy/random/tests/data/sfc64-testset-2.csv,sha256=FIDIDFCaPZfWUSxsJMAe58hPNmMrU27kCd9FhCEYt_k,23833
108
+ numpy/core/_ufunc_config.py,sha256=-Twpe8dnd45ccXH-w-B9nvU8yCOd1E0e3Wpsts3g_bQ,13944
109
+ numpy/core/einsumfunc.pyi,sha256=IJZNdHHG_soig8XvCbXZl43gMr3MMKl9dckTYWecqLs,4860
110
+ numpy/core/shape_base.py,sha256=RPMKxA7_FCAgg_CruExl0LehnczSTFaxA6hrcfrUzns,29743
111
+ numpy/core/fromnumeric.pyi,sha256=KATMFeFxUJ8YNRaC-jd_dTOt3opz2ng6lHgke5u5COk,23726
112
+ numpy/core/_internal.pyi,sha256=_mCTOX6Su8D4R9fV4HNeohPJx7515B-WOlv4uq6mry8,1032
113
+ numpy/core/function_base.pyi,sha256=3ZYad3cdaGwNEyP8VwK97IYMqk2PDoVjpjQzhIYHjk0,4725
114
+ numpy/core/getlimits.pyi,sha256=qeIXUEtognTHr_T-tv-VcZI7n8Z2VzAyIpIgKXzsLkc,82
115
+ numpy/core/shape_base.pyi,sha256=Ilb4joJmbjkIZLzKww7NJeaxg2FP3AfFib3HtfOsrC0,2774
116
+ numpy/core/_type_aliases.pyi,sha256=lguMSqMwvqAFHuRtm8YZSdKbikVz985BdKo_lo7GQCg,404
117
+ numpy/core/_simd.cpython-311-x86_64-linux-gnu.so,sha256=q_9ih9WkB5d9ydsFAU5lSOH1SnxPId7jGYGcSbtrxTI,3527040
118
+ numpy/core/arrayprint.py,sha256=ySZj4TZFFVCa5yhMmJKFYQYhuQTabZTRBb1YoiCD-ac,63608
119
+ numpy/core/_multiarray_tests.cpython-311-x86_64-linux-gnu.so,sha256=PlX6lwLG1Z-gy_dW7RvDBps-ZtogHwRtrDQMtJUHgxI,151400
120
+ numpy/core/_add_newdocs_scalars.py,sha256=PF9v8POcSNH6ELYltkx9e07DWgMmft6NJy9zER3Jk44,12106
121
+ numpy/core/arrayprint.pyi,sha256=21pOWjTSfJOBaKgOOPzRox1ERb3c9ydufqL0b11_P_Q,4428
122
+ numpy/core/cversions.py,sha256=H_iNIpx9-hY1cQNxqjT2d_5SXZhJbMo_caq4_q6LB7I,347
123
+ numpy/core/numeric.pyi,sha256=oVQkI4ABayFl_ZzCiGH4DxfYASL-3aETi-3B93THnEQ,14315
124
+ numpy/core/memmap.pyi,sha256=sxIQ7T5hPLG-RBNndAc8JPvrsKEX1amBSH2HGg48Obo,55
125
+ numpy/core/__init__.pyi,sha256=xtd9OFYza-ZG3jyEJrlzRPT-SkVoB_qYmVCe6FxRks0,126
126
+ numpy/core/fromnumeric.py,sha256=YMtxOBg51VMem39AHXFs-4_vOb1p48ei7njXdYTRJ_Q,128821
127
+ numpy/core/_type_aliases.py,sha256=qV6AZlsUWHMWTydmZya73xuBkKXiUKq_WXLj7q2CbZ0,7534
128
+ numpy/core/defchararray.py,sha256=G1LExk-dMeVTYRhtYgcCZEsHk5tkawk7giXcK4Q5KVM,73617
129
+ numpy/core/_struct_ufunc_tests.cpython-311-x86_64-linux-gnu.so,sha256=z72LnkcmdVBbvjnvdDYUnny5Vs73tZDMaJB7-Jok4Vk,16960
130
+ numpy/core/multiarray.py,sha256=zXaWf_DSkFEWjUQqVRCGeevwsI6kjQ3x6_MUwA1Y8fk,56097
131
+ numpy/core/_umath_tests.cpython-311-x86_64-linux-gnu.so,sha256=m_2bHJEg1wpvlRbuCeEqmbaBWJ96eiEc9GPnolJu4fg,42272
132
+ numpy/core/umath.py,sha256=JbT_SxnZ_3MEmjOI9UtX3CcAzX5Q-4RDlnnhDAEJ5Vo,2040
133
+ numpy/core/_multiarray_umath.cpython-311-x86_64-linux-gnu.so,sha256=jD7VujzkIajCmB_AxvOWvfzSKNA_-pq83M7O5YcL_pI,7402393
134
+ numpy/core/_asarray.pyi,sha256=gNNxUVhToNU_F1QpgeEvUYddpUFN-AKP0QWa4gqcTGw,1086
135
+ numpy/core/multiarray.pyi,sha256=_0X4W90U5ZiKt2n-9OscK-pcQyV6oGK-8jwGy5k1qxA,24768
136
+ numpy/core/getlimits.py,sha256=AopcTZDCUXMPcEKIZE1botc3mEhmLb2p1_ejlq1CLqY,25865
137
+ numpy/core/records.pyi,sha256=uYwE6cAoGKgN6U4ryfGZx_3m-3sY006jytjWLrDRRy0,5692
138
+ numpy/core/_dtype_ctypes.py,sha256=Vug4i7xKhznK2tdIjmn4ebclClpaCJwSZUlvEoYl0Eg,3673
139
+ numpy/core/_internal.py,sha256=f9kNDuT-FGxF1EtVOVIxXWnH9gM9n-J5V2zwHMv4HEk,28348
140
+ numpy/core/_asarray.py,sha256=P2ddlZAsg1iGleRRfoQv_aKs2N7AGwpo5K4ZQv4Ujlk,3884
141
+ numpy/core/_string_helpers.py,sha256=-fQM8z5s8_yX440PmgNEH3SUjEoXMPpPSysZwWZNbuo,2852
142
+ numpy/core/memmap.py,sha256=yWBJLeVClHsD8BYusnf9bdqypOMPrj3_zoO_lQ2zVMc,11771
143
+ numpy/core/_operand_flag_tests.cpython-311-x86_64-linux-gnu.so,sha256=d-EIE1Mwg1P0MhabKoSjTw8F4bLWoJb15tE_nvK6430,16856
144
+ numpy/core/defchararray.pyi,sha256=ib3aWFcM7F4KooU57mWUNi4GlosNjdfgrLKBVSIKDvU,9216
145
+ numpy/core/records.py,sha256=4mpIjUp2XtZxY5cD2S8mgfn8GCzQGGrrkqLBqAJwM-Q,37533
146
+ numpy/core/einsumfunc.py,sha256=TrL6t79F0H0AQH0y5Cj7Tq0_pzk4fVFi-4q4jJmujYQ,51868
147
+ numpy/core/function_base.py,sha256=tHg1qSHTz1eO_wHXNFRt3Q40uqVtPT2eyQdrWbIi4wQ,19836
148
+ numpy/core/_machar.py,sha256=G3a3TXu8VDW_1EMxKKLnGMbvUShEIUEve3ealBlJJ3E,11565
149
+ numpy/core/overrides.py,sha256=YUZFS8RCBvOJ27sH-jDRcyMjOCn9VigMyuQY4J21JBI,7093
150
+ numpy/core/__init__.py,sha256=CNsO-Ab4ywM2Wz3AbqWOH3ig1q5Bno9PsUMrCv-HNS4,5780
151
+ numpy/core/numerictypes.py,sha256=qIf9v1OpNjjVQzXnKpD-3V01y5Bj9huw5F-U5Wa4glc,18098
152
+ numpy/core/_rational_tests.cpython-311-x86_64-linux-gnu.so,sha256=c2JFRr4331C-2ta2AZL3Sfyiyuj2COzckpm9eGlb5CQ,59768
153
+ numpy/core/numeric.py,sha256=DgajaCDXiiQR-zuW_rrx_QhApSsa5k5FONK3Uk9mfTs,77014
154
+ numpy/core/_exceptions.py,sha256=dZWKqfdLRvJvbAEG_fof_8ikEKxjakADMty1kLC_l_M,5379
155
+ numpy/core/_add_newdocs.py,sha256=39JFaeDPN2OQlSwfpY6_Jq9fO5vML8ZMF8J4ZTx_nrs,208972
156
+ numpy/core/numerictypes.pyi,sha256=dEqtq9MLrGaqqeAF1sdXBgnEwDWOzlK02A6MTg1PS5g,3267
157
+ numpy/core/_dtype.py,sha256=SihUz41pHRB3Q2LiYYkug6LgMBKh6VV89MOpLxnXQdo,10606
158
+ numpy/core/_ufunc_config.pyi,sha256=-615enOVQMBhVx7Pln7DY_s4H6JjSgSnBy89YkpvuLg,1066
159
+ numpy/core/_methods.py,sha256=m31p0WjcFUGckbJiHnCpSaIQGqv-Lq5niIYkdd33YMo,8613
160
+ numpy/core/umath_tests.py,sha256=TIzaDfrEHHgSc2J5kxFEibq8MOPhwSuyOZOUBsZNVSM,389
161
+ numpy/core/lib/libnpymath.a,sha256=iaQOmupPD_06HD_VWTaCEPLJ92d9TZ9YrRr3AI58m6Y,51448
162
+ numpy/core/lib/npy-pkg-config/npymath.ini,sha256=kamUNrYKAmXqQa8BcNv7D5sLqHh6bnChM0_5rZCsTfY,360
163
+ numpy/core/lib/npy-pkg-config/mlib.ini,sha256=_LsWV1eStNqwhdiYPa2538GL46dnfVwT4MrI1zbsoFw,147
164
+ numpy/core/tests/test_arraymethod.py,sha256=VpjDYTmoMDTZcY7CsGzinBh0R_OICuwOykWCbmCRQZU,3244
165
+ numpy/core/tests/test_machar.py,sha256=_5_TDUVtAJvJI5jBfEFKpCZtAfKCsCFt7tXlWSkWzzc,1067
166
+ numpy/core/tests/test_records.py,sha256=pluit5x6jkWoPEIrHXM13L3xZuuSSiaxoXFsOdkakCU,20269
167
+ numpy/core/tests/test_numeric.py,sha256=Cnsb-ZqYtmm9V-AogDuzvDkxlpGZ5uCMP-pw6LZfRn0,136806
168
+ numpy/core/tests/test_longdouble.py,sha256=jO8YMm_Hsz-XPKbmv6iMcOdHgTlIFkKTwAtxpy3Q1pE,13905
169
+ numpy/core/tests/test_indexerrors.py,sha256=kN9xLl6FVTzmI7fumn_cuZ3k0omXnTetgtCnPY44cvw,5130
170
+ numpy/core/tests/test_einsum.py,sha256=QzQAPIC-IjTV3Dxz97hBnvLBCmF8kpsBTBckThhgRjQ,53712
171
+ numpy/core/tests/test_multiarray.py,sha256=GPv4IJR9dijNG-icUsQsX2tBD2RdP3EhUehY4cxvVQU,380106
172
+ numpy/core/tests/test_simd.py,sha256=-L1UhIn9Eu_euLwaSU7bPRfYpWWOTb43qovoJS7Ws7w,48696
173
+ numpy/core/tests/test_dtype.py,sha256=_BXqqe7m7TwzfKj-YKqVVEwWEpB4w0eUCmAjnGaCTwM,75451
174
+ numpy/core/tests/test_scalarbuffer.py,sha256=FSL94hriWX1_uV6Z33wB3ZXUrpmmX2-x87kNjIxUeBk,5580
175
+ numpy/core/tests/test__exceptions.py,sha256=QqxQSLXboPXEVwHz-TyE2JeIl_TC-rPugzfo25nbcns,2846
176
+ numpy/core/tests/test_cpu_features.py,sha256=6wGRaLXaRXSy5a6VW5GYWljFOIM62vz9wIwUc6fQ2xY,14858
177
+ numpy/core/tests/test_extint128.py,sha256=gCZfAwPOb-F1TLsEEeDI0amQYwHk-60-OXi0ccZrrZ8,5643
178
+ numpy/core/tests/test_defchararray.py,sha256=F88HUkByEP4H6cJ_ITvIe0a_T1BH2JOdRysMCu1XIn0,24997
179
+ numpy/core/tests/test_indexing.py,sha256=x0ojWuhOwWD5MZuiJ9Ncim3CgkwI-GldWxrSCmjmFJM,54314
180
+ numpy/core/tests/test_deprecations.py,sha256=w2lhHb-W8hh7RoE_0Ftg8thpG86jvbFAJgior22DY2Q,31076
181
+ numpy/core/tests/test_getlimits.py,sha256=apdxr0zKkxaVHIUpLrqAvO39q54JKN14sV4xSbK2Ifs,6718
182
+ numpy/core/tests/test_unicode.py,sha256=hUXIwMmoq89y_KXWzuXVyQaXvRwGjfY4TvKJsCbygEI,12775
183
+ numpy/core/tests/test_umath_accuracy.py,sha256=mFcVdzXhhD9mqhzLDJVZsWfCHbjbFQ6XeEl5G8l-PTc,3897
184
+ numpy/core/tests/test_array_interface.py,sha256=8tGgj1Nzi76H_WF5GULkxqWL7Yu_Xf0lvTJZOwOBKsI,7774
185
+ numpy/core/tests/test_custom_dtypes.py,sha256=JogRmttDLwfQ3PTbewEnGLKco9zV2Nu3yIfrMeCsx_I,9401
186
+ numpy/core/tests/test_cython.py,sha256=oisA2oy2waeLWXS7HBYTs-XHHBofEflEbflm7AFcMV0,3444
187
+ numpy/core/tests/test_numpy_2_0_compat.py,sha256=kVCTAXska7Xi5w_TYduWhid0nlCqI6Nvmt-gDnYsuKI,1630
188
+ numpy/core/tests/test_arrayprint.py,sha256=cKaIoD9ZvsjJH0PHwZyOxmcRcBt1kN1WfFneqVqs0b8,40462
189
+ numpy/core/tests/test_simd_module.py,sha256=OSpYhH_3QDxItyQcaW6SjXW57k2m-weRwpYOnJjCqN0,3902
190
+ numpy/core/tests/test_item_selection.py,sha256=kI30kiX8mIrZYPn0jw3lGGw1ruZF4PpE9zw-aai9EPA,6458
191
+ numpy/core/tests/test_nep50_promotions.py,sha256=2TwtFvj1LBpYTtdR6NFe1RAAGXIJltLqwpA1vhQCVY4,8840
192
+ numpy/core/tests/test_limited_api.py,sha256=5yO0nGmCKZ9b3S66QP7vY-HIgAoyOtHZmp8mvzKuOHI,1172
193
+ numpy/core/tests/test_datetime.py,sha256=2vAGbrCQmsrWNXCVXOMZqUGZn2c-cQT-eZ1wTprYbcM,116211
194
+ numpy/core/tests/test_nditer.py,sha256=nVQ00aNxPHqf4ZcFs3e9AVDK64TCqlO0TzfocTAACZQ,130818
195
+ numpy/core/tests/test_array_coercion.py,sha256=zY4Pjlt4QZ0w71WxWGLHcrPnnhEF51yXYVLg5HMIy5c,34379
196
+ numpy/core/tests/test_scalarprint.py,sha256=1599W5X0tjGhBnSQjalXkg6AY8eHXnr6PMqs4vYZQqs,18771
197
+ numpy/core/tests/test_abc.py,sha256=FfgYA_HjYAi8XWGK_oOh6Zw86chB_KG_XoW_7ZlFp4c,2220
198
+ numpy/core/tests/test_umath.py,sha256=cgEk2PTIOMHlnwM8elNZMk4_JC6dhtQ5WENcsgtNLv4,185721
199
+ numpy/core/tests/test_protocols.py,sha256=fEXE9K9s22oiVWkX92BY-g00-uXCK-HxjZhZxxYAKFc,1168
200
+ numpy/core/tests/test_scalarmath.py,sha256=XZj_m2I2TLktJdFD1SWj2XtV8hT26VIxasDz3cAFvgA,43247
201
+ numpy/core/tests/test_hashtable.py,sha256=ZV8HL8NkDnoQZfnje7BP0fyIp4fSFqjKsQc40PaTggc,1011
202
+ numpy/core/tests/test_print.py,sha256=ErZAWd88b0ygSEoYpd0BL2tFjkerMtn1vZ7dWvaNqTc,6837
203
+ numpy/core/tests/test_api.py,sha256=UMc7SvczAQ5ngHxE-NoXVvNpVzYRrn8oMwFNta1yMS0,22995
204
+ numpy/core/tests/test_argparse.py,sha256=C0zBbwQ9xzzymXe_hHpWnnWQPwOi2ZdQB78gBAgJHvU,1969
205
+ numpy/core/tests/test_umath_complex.py,sha256=WvZZZWeijo52RiOfx-G83bxzQOp_IJ3i9fEnUDVukLQ,23247
206
+ numpy/core/tests/test_memmap.py,sha256=tZ5lJs_4ZFsJmg392ZQ33fX0m8tdfZ8ZtY9Lq41LNtk,7477
207
+ numpy/core/tests/test_ufunc.py,sha256=dDqj3CgzfJI8aLw91ij7L-LsPk5xYnJ9pYjN48MqQMM,124800
208
+ numpy/core/tests/test_shape_base.py,sha256=D9haeuUVx3x3pOLmFQ9vUz7iU4T2bFTsPoI8HgSncFU,29723
209
+ numpy/core/tests/test_mem_policy.py,sha256=rzySeyxeGDy3ucytbKAwd2gEwoArLmOlsJFFJaSa_lQ,16780
210
+ numpy/core/tests/test_dlpack.py,sha256=cDlwFmTombb2rDeB8RHEAJ4eVMUiDbw8Oz5Jo1NQwk0,3522
211
+ numpy/core/tests/test_half.py,sha256=k3p2NL9i84Z9i0Nd5nSwUUKrmwzR4KjPQFJv5nu0K8Y,24226
212
+ numpy/core/tests/test_overrides.py,sha256=t0gOZOzu7pevE58HA-npFYJqnInHR-LLBklnzKJWHqo,26080
213
+ numpy/core/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
214
+ numpy/core/tests/test_casting_floatingpoint_errors.py,sha256=W3Fgk0oKtXFv684fEZ7POwj6DHTYK0Jj_oGRLZ8UdyA,5063
215
+ numpy/core/tests/_locales.py,sha256=S4x5soqF0oxpBYOE8J9Iky72O9J25IiZ8349m93pWC4,2206
216
+ numpy/core/tests/test_mem_overlap.py,sha256=QJ0unWD_LOoAGAo4ra0IvYenj56IYUtiz1fEJEmTY9Q,29086
217
+ numpy/core/tests/test_numerictypes.py,sha256=f_xMjZJnyDwlc6XCrd71b6x1_6dAWOv-kZ3-NEq37hU,21687
218
+ numpy/core/tests/test_function_base.py,sha256=Ibs6-WXZE5hsRx4VCnX-cZOWYKU-5PFXjouwAQzgnqQ,15595
219
+ numpy/core/tests/test_casting_unittests.py,sha256=9-vkR0oXczQz8ED8DxGVPmalC8IZXe2jKgOCMGr8hIg,34298
220
+ numpy/core/tests/test_scalar_ctors.py,sha256=qDIZV-tBukwAxNDhUmGtH3CemDXlS3xd_q3L52touuA,6115
221
+ numpy/core/tests/test_regression.py,sha256=SJo9cPTVr2SNjhgtW7boUMyNQlXxygsZ5g0oyqC8Eks,91595
222
+ numpy/core/tests/test_scalarinherit.py,sha256=fMInDGKsiH3IS_2ejZtIcmJZ0Ry8c7kVsHx7wp5XDoM,2368
223
+ numpy/core/tests/test_cpu_dispatcher.py,sha256=JmYHyBedXNu8pPgGCegP4it6UXY0sifW4EjdM9C0f8M,1521
224
+ numpy/core/tests/test_strings.py,sha256=A9t1B65lFrYRLXgDJSg3mMDAe_hypIPcTMVOdAYIbU0,3835
225
+ numpy/core/tests/test_errstate.py,sha256=U3GT9I058jkF725mx4GdWUr9RoceCkGDV7Go79VA4wY,2219
226
+ numpy/core/tests/test_conversion_utils.py,sha256=jNhbNNI-T8qtQnsIMEax7KFN30kjh0ICntLMwTyxJ5Q,6559
227
+ numpy/core/tests/test_scalar_methods.py,sha256=Uj-zU0zzzKAjMBdpkzsWZ3nSFj5gJkUlqi_euhOYdnU,7541
228
+ numpy/core/tests/examples/limited_api/limited_api.c,sha256=mncE8TjjXmYpkwli433G0jB2zGQO_5NqWmGKdzRJZug,344
229
+ numpy/core/tests/examples/limited_api/setup.py,sha256=p2w7F1ardi_GRXSrnNIR8W1oeH_pgmw_1P2wS0A2I6M,435
230
+ numpy/core/tests/examples/cython/setup.py,sha256=aAR-TvQabUabnCzuB6UdWdmRXaaPfIG7MzTIfMF-0tk,496
231
+ numpy/core/tests/examples/cython/checks.pyx,sha256=plK9y11kHceBfR6puFLDwU8H5RBGS6ZEmqSFVq-rzOE,615
232
+ numpy/core/tests/examples/cython/meson.build,sha256=gsdQSy1D5cO-Y8i5ADnV8rrFPbL-eBkWKb113gxpYbI,740
233
+ numpy/core/tests/data/umath-validation-set-log2.csv,sha256=HL2rOCsrEi378rNrbsXHPqlWlEGkXQq8R4e63YeTksU,68917
234
+ numpy/core/tests/data/umath-validation-set-cosh.csv,sha256=FGCNeUSUTAeASsb_j18iRSsCxXLxmzF-_C7tq1elVrQ,60869
235
+ numpy/core/tests/data/astype_copy.pkl,sha256=lWSzCcvzRB_wpuRGj92spGIw-rNPFcd9hwJaRVvfWdk,716
236
+ numpy/core/tests/data/umath-validation-set-tan.csv,sha256=Oq7gxMvblRVBrQ23kMxc8iT0bHnCWKg9EE4ZqzbJbOA,60299
237
+ numpy/core/tests/data/umath-validation-set-sin.csv,sha256=8PUjnQ_YfmxFb42XJrvpvmkeSpEOlEXSmNvIK4VgfAM,58611
238
+ numpy/core/tests/data/umath-validation-set-exp2.csv,sha256=f1b05MRXPOXihC9M-yi52udKBzVXalhbTuIcqoDAk-g,58624
239
+ numpy/core/tests/data/umath-validation-set-cos.csv,sha256=0PNnDqKkokZ7ERVDgbes8KNZc-ISJrZUlVZc5LkW18E,59122
240
+ numpy/core/tests/data/umath-validation-set-README.txt,sha256=pxWwOaGGahaRd-AlAidDfocLyrAiDp0whf5hC7hYwqM,967
241
+ numpy/core/tests/data/umath-validation-set-log10.csv,sha256=RJgpruL16FVPgUT3-3xW4eppS_tn6o5yEW79KnITn48,68922
242
+ numpy/core/tests/data/umath-validation-set-arccos.csv,sha256=W_aL99bjzVjlVyd5omfDUORag8jHzx6uctedPVZgOHQ,61365
243
+ numpy/core/tests/data/umath-validation-set-exp.csv,sha256=BKg1_cyrKD2GXYMX_EB0DnXua8DI2O1KWODXf_BRhrk,17491
244
+ numpy/core/tests/data/umath-validation-set-arccosh.csv,sha256=Uko_d0kDXr1YlN-6Ii-fQQxUvbXAhRfC7Un4gJ23GJk,61365
245
+ numpy/core/tests/data/umath-validation-set-arcsinh.csv,sha256=uDwx4PStpfV21IaPF8pmzQpul6i72g7zDwlfcynWaVQ,60289
246
+ numpy/core/tests/data/generate_umath_validation_data.cpp,sha256=fyhQPNhIX9hzjeXujn6mhi1MVc133zELSV_hlSQ7BQU,5842
247
+ numpy/core/tests/data/umath-validation-set-tanh.csv,sha256=iolZF_MOyWRgYSa-SsD4df5mnyFK18zrICI740SWoTc,60299
248
+ numpy/core/tests/data/umath-validation-set-sinh.csv,sha256=CYiibE8aX7MQnBatl__5k_PWc_9vHUifwS-sFZzzKk0,60293
249
+ numpy/core/tests/data/umath-validation-set-cbrt.csv,sha256=v855MTZih-fZp_GuEDst2qaIsxU4a7vlAbeIJy2xKpc,60846
250
+ numpy/core/tests/data/umath-validation-set-arcsin.csv,sha256=15Aenze4WD2a2dF2aOBXpv9B7u3wwAeUVJdEm4TjOkQ,61339
251
+ numpy/core/tests/data/numpy_2_0_array.pkl,sha256=Vh02tdyCypa8Nb4QzdVhnDAiXEO2WQrcwcvOdDDFF5w,718
252
+ numpy/core/tests/data/umath-validation-set-expm1.csv,sha256=_ghc1xiUECNsBGrKCFUAy2lvu01_lkpeYJN0zDtCYWk,60299
253
+ numpy/core/tests/data/umath-validation-set-arctanh.csv,sha256=95l4Uu5RmZajljabfqlv5U34RVrifCMhhkop6iLeNBo,61339
254
+ numpy/core/tests/data/umath-validation-set-log1p.csv,sha256=IZZI-hi55HGCOvBat3vSBVha_8Nt-5alf2fqz6QeTG0,60303
255
+ numpy/core/tests/data/recarray_from_file.fits,sha256=NA0kliz31FlLnYxv3ppzeruONqNYkuEvts5wzXEeIc4,8640
256
+ numpy/core/tests/data/umath-validation-set-arctan.csv,sha256=mw5tYze_BMs6ugGEZfg5mcXoInGYdn7fvSCYSUi9Bqw,60305
257
+ numpy/core/tests/data/umath-validation-set-log.csv,sha256=z9ej1ykKUoMRqYMUIJENWXbYi_A_x_RKs7K_GuXZJus,11692
258
+ numpy/core/include/numpy/old_defines.h,sha256=xuYQDDlMywu0Zsqm57hkgGwLsOFx6IvxzN2eiNF-gJY,6405
259
+ numpy/core/include/numpy/npy_no_deprecated_api.h,sha256=0yZrJcQEJ6MCHJInQk5TP9_qZ4t7EfBuoLOJ34IlJd4,678
260
+ numpy/core/include/numpy/numpyconfig.h,sha256=Nr59kE3cXmen6y0UymIBaU7F1BSIuPwgKZ4gdV5Q5JU,5308
261
+ numpy/core/include/numpy/arrayobject.h,sha256=-BlWQ7kfVbzCqzHn0qaeMe0_08AbwliuG98XWG57lT8,282
262
+ numpy/core/include/numpy/npy_os.h,sha256=hlQsg_7-RkvS3s8OM8KXy99xxyJbCm-W1AYVcdnO1cw,1256
263
+ numpy/core/include/numpy/__multiarray_api.c,sha256=nPRzTez_Wy3YXy3zZNJNPMspAzxbLOdohqhXwouwMLM,12116
264
+ numpy/core/include/numpy/npy_endian.h,sha256=we7X9fPeWzNpo_YTh09MPGDwdE0Rw_WDM4c9y4nBj5I,2786
265
+ numpy/core/include/numpy/ndarrayobject.h,sha256=PhY4NjRZDoU5Zbc8MW0swPEm81hwgWZ63gAU93bLVVI,10183
266
+ numpy/core/include/numpy/_numpyconfig.h,sha256=o0fV_jb-wgVtRxnVIWvUttiZafyrWYFm2ab9Uixz1Cw,855
267
+ numpy/core/include/numpy/npy_3kcompat.h,sha256=SvN9yRA3i02O4JFMXxZz0Uq_vJ5ZpvC-pC2sfF56A5I,15883
268
+ numpy/core/include/numpy/ufuncobject.h,sha256=Xmnny_ulZo9VwxkfkXF-1HCTKDavIp9PV_H7XWhi0Z8,12070
269
+ numpy/core/include/numpy/npy_common.h,sha256=Joxucz91nwz5ThOy0HeEFCfZT5Kdp_ii-bMokhrlihw,37688
270
+ numpy/core/include/numpy/noprefix.h,sha256=d83l1QpCCVqMV2k29NMkL3Ld1qNjiC6hzOPWZAivEjQ,6830
271
+ numpy/core/include/numpy/utils.h,sha256=wMNomSH3Dfj0q78PrjLVtFtN-FPo7UJ4o0ifCUO-6Es,1185
272
+ numpy/core/include/numpy/__ufunc_api.h,sha256=0MBOl7dgO3ldqdDi-SdciEOuqGv1UNsmk7mp7tEy4AY,12456
273
+ numpy/core/include/numpy/halffloat.h,sha256=TRZfXgipa-dFppX2uNgkrjrPli-1BfJtadWjAembJ4s,1959
274
+ numpy/core/include/numpy/experimental_dtype_api.h,sha256=tlehD5r_pYhHbGzIrUea6vtOgf6IQ8Txblnhx7455h8,15532
275
+ numpy/core/include/numpy/_dtype_api.h,sha256=4veCexGvx9KNWMIUuEUAVOfcsei9GqugohDY5ud16pA,16697
276
+ numpy/core/include/numpy/ndarraytypes.h,sha256=EjWXv-J8C5JET4AlIbJRdctycL7-dyJZcnoWgnlCPc8,68009
277
+ numpy/core/include/numpy/npy_interrupt.h,sha256=DQZIxi6FycLXD8drdHn2SSmLoRhIpo6osvPv13vowUA,1948
278
+ numpy/core/include/numpy/npy_math.h,sha256=SbKRoc7O3gVuDl7HOZjk424O049I0zn-7i9GwBwNmmk,18945
279
+ numpy/core/include/numpy/__multiarray_api.h,sha256=jS7gYw2FRN9MPLYZBxokENWowqTsbaFTl3_zi6vL1j4,61519
280
+ numpy/core/include/numpy/__ufunc_api.c,sha256=670Gcz-vhkF4taBDmktCpFRBrZ9CHJnPRx7ag7Z6HsI,1714
281
+ numpy/core/include/numpy/arrayscalars.h,sha256=C3vDRndZTZRbppiDyV5jp8sV3dRKsrwBIZcNlh9gSTA,3944
282
+ numpy/core/include/numpy/npy_cpu.h,sha256=pcVRtj-Y6120C5kWB1VAiAjZoxkTPDEg0gGm5IAt3jM,4629
283
+ numpy/core/include/numpy/npy_1_7_deprecated_api.h,sha256=y0MJ8Qw7Bkt4H_4VxIzHzpkw5JqAdj5ECgtn08fZFrI,4327
284
+ numpy/core/include/numpy/_neighborhood_iterator_imp.h,sha256=s-Hw_l5WRwKtYvsiIghF0bg-mA_CgWnzFFOYVFJ-q4k,1857
285
+ numpy/core/include/numpy/random/bitgen.h,sha256=49AwKOR552r-NkhuSOF1usb_URiMSRMvD22JF5pKIng,488
286
+ numpy/core/include/numpy/random/libdivide.h,sha256=ew9MNhPQd1LsCZiWiFmj9IZ7yOnA3HKOXffDeR9X1jw,80138
287
+ numpy/core/include/numpy/random/LICENSE.txt,sha256=-8U59H0M-DvGE3gID7hz1cFGMBJsrL_nVANcOSbapew,1018
288
+ numpy/core/include/numpy/random/distributions.h,sha256=W5tOyETd0m1W0GdaZ5dJP8fKlBtsTpG23V2Zlmrlqpg,9861
289
+ numpy/doc/ufuncs.py,sha256=i1alLg19mNyCFZ2LYSOZGm--RsRN1x63U_UYU-N3x60,5357
290
+ numpy/doc/constants.py,sha256=PlXoj7b4A8Aa9nADbg83uzTBRJaX8dvJmEdbn4FDPPo,9155
291
+ numpy/doc/__init__.py,sha256=OYmE-F6x0CD05PCDY2MiW1HLlwB6i9vhDpk-a3r4lHY,508
292
+ numpy/_utils/_pep440.py,sha256=Vr7B3QsijR5p6h8YAz2LjNGUyzHUJ5gZ4v26NpZAKDc,14069
293
+ numpy/_utils/_convertions.py,sha256=0xMxdeLOziDmHsRM_8luEh4S-kQdMoMg6GxNDDas69k,329
294
+ numpy/_utils/_inspect.py,sha256=8Ma7QBRwfSWKeK1ShJpFNc7CDhE6fkIE_wr1FxrG1A8,7447
295
+ numpy/_utils/__init__.py,sha256=Hhetwsi3eTBe8HdWbG51zXmcrX1DiPLxkYSrslMLYcc,723
296
+ numpy/_core/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
297
+ numpy/_core/multiarray.py,sha256=kZxC_7P3Jwz1RApzQU2QGmqSq4MAEvKmaJEYnAsbSOs,138
298
+ numpy/_core/umath.py,sha256=YcV0cdbGcem6D5P3yX7cR9HGYBrT8VMoAgCBzGwPhgg,123
299
+ numpy/_core/_dtype_ctypes.py,sha256=i5EhoWPUhu4kla3Xu4ZvXF1lVLPiI6Zg4h6o8jaiamo,147
300
+ numpy/_core/_internal.py,sha256=g5ugmqDgUhSlie5-onOctcm4p0gcMHSIRLHVYtFTk1M,135
301
+ numpy/_core/__init__.py,sha256=C8_7wbHqUkB35JouY_XKsas1KLpRZ7JHWuZ7VGOPVpU,136
302
+ numpy/_core/_dtype.py,sha256=vE16-yiwUSYsAIbq7FlEY1GbXZAp8wjADDxJg3eBX-U,126
303
+ numpy/_core/_multiarray_umath.py,sha256=VPtoT2uHnyU3rKL0G27CgmNmB1WRHM0mtc7Y9L85C3U,159
304
+ numpy/typing/mypy_plugin.py,sha256=24zVk4Ei3qH4Hc3SSz3v0XtIsycTo8HKoY6ilhB_7AQ,6376
305
+ numpy/typing/setup.py,sha256=Cnz9q53w-vJNyE6vYxqYvQXx0pJbrG9quHyz9sqxfek,374
306
+ numpy/typing/__init__.py,sha256=VoTILNDrUWvZx0LK9_97lBLQFKtSGmDt4QLOH8zYvlo,5234
307
+ numpy/typing/tests/test_typing.py,sha256=eQWKte9QDjT94Uur8MVTW1YTuhJTccEld6h5swTDfGw,8385
308
+ numpy/typing/tests/test_isfile.py,sha256=BhKZs4-LrhFUfKjcG0yelySjE6ZITMxGIBYWGDHMRb8,864
309
+ numpy/typing/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
310
+ numpy/typing/tests/test_runtime.py,sha256=2qu8JEliITnZCBJ_QJpohacj_OQ08o73ixS2w2ooNXI,3275
311
+ numpy/typing/tests/data/mypy.ini,sha256=Ynv1VSx_kXTD2mFC3ZpgEFuCOg1F2VJXxPk0dxUnF2M,108
312
+ numpy/typing/tests/data/pass/lib_version.py,sha256=HnuGOx7tQA_bcxFIJ3dRoMAR0fockxg4lGqQ4g7LGIw,299
313
+ numpy/typing/tests/data/pass/mod.py,sha256=HB9aK4_wGJbc44tomaoroNy0foIL5cI9KIjknvMTbkk,1578
314
+ numpy/typing/tests/data/pass/warnings_and_errors.py,sha256=Pcg-QWfY4PAhTKyehae8q6LhtbUABxa2Ye63-3h1f4w,150
315
+ numpy/typing/tests/data/pass/arrayprint.py,sha256=y_KkuLz1uM7pv53qfq7GQOuud4LoXE3apK1wtARdVyM,766
316
+ numpy/typing/tests/data/pass/simple_py3.py,sha256=HuLrc5aphThQkLjU2_19KgGFaXwKOfSzXe0p2xMm8ZI,96
317
+ numpy/typing/tests/data/pass/modules.py,sha256=t0KJxYWbrWd7HbbgIDFb3LAhJBiNNb6QPjjFDAgC2mU,576
318
+ numpy/typing/tests/data/pass/flatiter.py,sha256=0BnbuLMBC7MQlprNZ0QhNSscfYwPhEhXOhWoyiRACWU,174
319
+ numpy/typing/tests/data/pass/ndarray_conversion.py,sha256=yPgzXG6paY1uF_z-QyHYrcmrZvhX7qtvTUh7ANLseCA,1626
320
+ numpy/typing/tests/data/pass/array_like.py,sha256=ce_IVubBd7J6FkSpJmD7qMlRLuwmiidhOqhYfZb16Wo,916
321
+ numpy/typing/tests/data/pass/dtype.py,sha256=MqDKC6Ywv6jNkWsR8rdLuabzHUco5w1OylDHEdxve_I,1069
322
+ numpy/typing/tests/data/pass/array_constructors.py,sha256=3GrhfBcmWX53pJHD0NvhXjwr2-uNKREbR1I9WCcZ7rI,2419
323
+ numpy/typing/tests/data/pass/fromnumeric.py,sha256=Xd_nJVVDoONdztUX8ddgo7EXJ2FD8AX51MO_Yujnmog,3742
324
+ numpy/typing/tests/data/pass/ndarray_shape_manipulation.py,sha256=37eYwMNqMLwanIW9-63hrokacnSz2K_qtPUlkdpsTjo,640
325
+ numpy/typing/tests/data/pass/arrayterator.py,sha256=FqcpKdUQBQ0FazHFxr9MsLEZG-jnJVGKWZX2owRr4DQ,393
326
+ numpy/typing/tests/data/pass/ufuncs.py,sha256=xGuKuqPetUTS4io5YDHaki5nbYRu-wC29SGU32tzVIg,462
327
+ numpy/typing/tests/data/pass/ufunclike.py,sha256=Gve6cJ2AT3TAwOjUOQQDIUnqsRCGYq70_tv_sgODiiA,1039
328
+ numpy/typing/tests/data/pass/multiarray.py,sha256=MxHax6l94yqlTVZleAqG77ILEbW6wU5osPcHzxJ85ns,1331
329
+ numpy/typing/tests/data/pass/ufunc_config.py,sha256=_M8v-QWAeT1-2MkfSeAbNl_ZwyPvYfPTsLl6c1X8d_w,1204
330
+ numpy/typing/tests/data/pass/ndarray_misc.py,sha256=z3mucbn9fLM1gxmbUhWlp2lcrOv4zFjqZFze0caE2EA,2715
331
+ numpy/typing/tests/data/pass/lib_utils.py,sha256=sDQCjHVGUwct0RQqAtH5_16y241siSY4bXKZRsuJ8xA,434
332
+ numpy/typing/tests/data/pass/bitwise_ops.py,sha256=UnmxVr9HwI8ifdrutGm_u3EZU4iOOPQhrOku7hTaH0c,970
333
+ numpy/typing/tests/data/pass/simple.py,sha256=HmAfCOdZBWQF211YaZFrIGisMgu5FzTELApKny08n3Y,2676
334
+ numpy/typing/tests/data/pass/random.py,sha256=uJCnzlsOn9hr_G1TpHLdsweJI4EdhUSEQ4dxROPjqAs,61881
335
+ numpy/typing/tests/data/pass/comparisons.py,sha256=nTE-fvraLK6xTZcP4uPV02wOShzYKWDaoapx35AeDOY,2992
336
+ numpy/typing/tests/data/pass/einsumfunc.py,sha256=eXj5L5MWPtQHgrHPsJ36qqrmBHqct9UoujjJCvHnF1k,1370
337
+ numpy/typing/tests/data/pass/literal.py,sha256=DLzdWHD6ttW4S0NEvGQbsH_UEJjhZyhvO4OXJjoyvZQ,1331
338
+ numpy/typing/tests/data/pass/arithmetic.py,sha256=2z3dmuysQQmiPz8x0bg8SOOKW62mVJn97uMa9T0L7Vk,7455
339
+ numpy/typing/tests/data/pass/numerictypes.py,sha256=r0_s-a0-H2MdWIn4U4P6W9RQO0V1xrDusgodHNZeIYM,750
340
+ numpy/typing/tests/data/pass/numeric.py,sha256=SdnsD5zv0wm8T2hnIylyS14ig2McSz6rG9YslckbNQ4,1490
341
+ numpy/typing/tests/data/pass/index_tricks.py,sha256=oaFD9vY01_RI5OkrXt-xTk1n_dd-SpuPp-eZ58XR3c8,1492
342
+ numpy/typing/tests/data/pass/scalars.py,sha256=En0adCZAwEigZrzdQ0JQwDEmrS0b-DMd1vvjkFcvwo8,3479
343
+ numpy/typing/tests/data/misc/extended_precision.pyi,sha256=bS8bBeCFqjgtOiy-8_y39wfa7rwhdjLz2Vmo-RXAYD4,884
344
+ numpy/typing/tests/data/fail/einsumfunc.pyi,sha256=RS7GZqUCT_vEFJoyUx4gZlPO8GNFFNFWidxl-wLyRv0,539
345
+ numpy/typing/tests/data/fail/index_tricks.pyi,sha256=moINir9iQoi6Q1ZuVg5BuSB9hSBtbg_uzv-Qm_lLYZk,509
346
+ numpy/typing/tests/data/fail/fromnumeric.pyi,sha256=FH2mjkgtCbA9soqlJRhYN7IIfRRrUL1i9mwqcbYKZSc,5591
347
+ numpy/typing/tests/data/fail/flatiter.pyi,sha256=qLM4qm7gvJtEZ0rTHcyasUzoP5JbX4FREtqV3g1w6Lo,843
348
+ numpy/typing/tests/data/fail/ufunclike.pyi,sha256=lbxjJyfARmt_QK1HxhxFxvwQTqCEZwJ9I53Wp8X3KIY,679
349
+ numpy/typing/tests/data/fail/datasource.pyi,sha256=PRT2hixR-mVxr2UILvHa99Dr54EF2h3snJXE-v3rWcc,395
350
+ numpy/typing/tests/data/fail/bitwise_ops.pyi,sha256=GN9dVqk4_HFXn7zbRrHzJq_UGRFBccoYVUG1UuE7bXs,515
351
+ numpy/typing/tests/data/fail/nditer.pyi,sha256=w7emjnOxnf3NcvLktNLlke6Cuivn2gU3sVmGCfbG6rw,325
352
+ numpy/typing/tests/data/fail/shape_base.pyi,sha256=Y_f4buHtX2Q2ZA4kaDTyR8LErlPXTzCB_-jBoScGh_Q,152
353
+ numpy/typing/tests/data/fail/constants.pyi,sha256=YSqNbXdhbdMmYbs7ntH0FCKbnm8IFeqsDlZBqcU43iw,286
354
+ numpy/typing/tests/data/fail/scalars.pyi,sha256=o91BwSfzPTczYVtbXsirqQUoUoYP1C_msGjc2GYsV04,2952
355
+ numpy/typing/tests/data/fail/rec.pyi,sha256=Ws3TyesnoQjt7Q0wwtpShRDJmZCs2jjP17buFMomVGA,704
356
+ numpy/typing/tests/data/fail/chararray.pyi,sha256=jrNryZFpr8nxG2IHb9e0x3ranpvJpBy_RDex-WpT5rU,2296
357
+ numpy/typing/tests/data/fail/arrayprint.pyi,sha256=-Fs9VnQfxyfak008Hq8kJWfB0snA6jGDXZz8ljQnwGE,549
358
+ numpy/typing/tests/data/fail/array_pad.pyi,sha256=57oK0Yp53rtKjjIrRFYLcxa-IfIGhtI-bEem7ggJKwI,132
359
+ numpy/typing/tests/data/fail/ndarray.pyi,sha256=YnjXy16RHs_esKelMjB07865CQ7gLyQnXhnitq5Kv5c,405
360
+ numpy/typing/tests/data/fail/memmap.pyi,sha256=HSTCQYNuW1Y6X1Woj361pN4rusSPs4oDCXywqk20yUo,159
361
+ numpy/typing/tests/data/fail/ufuncs.pyi,sha256=YaDTL7QLmGSUxE6JVMzpOlZTjHWrgbOo0UIlkX-6ZQk,1347
362
+ numpy/typing/tests/data/fail/dtype.pyi,sha256=OAGABqdXNB8gClJFEGMckoycuZcIasMaAlS2RkiKROI,334
363
+ numpy/typing/tests/data/fail/false_positives.pyi,sha256=Q61qMsSsNCtmO0EMRxHj5Z7RYTyrELVpkzfJY5eK8Z0,366
364
+ numpy/typing/tests/data/fail/lib_utils.pyi,sha256=VFpE6_DisvlDByyp1PiNPJEe5IcZp8cH0FlAJyoZipo,276
365
+ numpy/typing/tests/data/fail/char.pyi,sha256=-vgN6EmfQ8VaA4SOZ5Ol9u4-Z7Q5I7G78LmaxZOuZ90,2615
366
+ numpy/typing/tests/data/fail/ufunc_config.pyi,sha256=ukA0xwfJHLoGfoOIpWIN-91wj-DG8oaIjYbO72ymjg4,733
367
+ numpy/typing/tests/data/fail/multiarray.pyi,sha256=XCdBxufNhR8ZtG8UMzk8nt9_NC5gJTKP9-xTqKO_K9I,1693
368
+ numpy/typing/tests/data/fail/array_constructors.pyi,sha256=X9y_jUYS17WfYmXW5NwkVudyiR6ouUaAwEh0JRte42o,1089
369
+ numpy/typing/tests/data/fail/modules.pyi,sha256=_ek4zKcdP-sIh_f-IDY0tP-RbLORKCSWelM9AOYxsyA,670
370
+ numpy/typing/tests/data/fail/type_check.pyi,sha256=CIyI0j0Buxv0QgCvNG2urjaKpoIZ-ZNawC2m6NzGlbo,379
371
+ numpy/typing/tests/data/fail/random.pyi,sha256=p5WsUGyOL-MGIeALh9Y0dVhYSRQLaUwMdjXc3G6C_7Q,2830
372
+ numpy/typing/tests/data/fail/arrayterator.pyi,sha256=FoU4ahHkJZ67dwWXer5FXLjjjesKKg-w2Jq1X1bHymA,480
373
+ numpy/typing/tests/data/fail/lib_polynomial.pyi,sha256=Ur7Y4iZX6WmoH5SDm0ePi8C8LPsuPs2Yr7g7P5O613g,899
374
+ numpy/typing/tests/data/fail/warnings_and_errors.pyi,sha256=PrbYDFI7IGN3Gf0OPBkVfefzQs4AXHwDQ495pvrX3RY,174
375
+ numpy/typing/tests/data/fail/array_like.pyi,sha256=OVAlEJZ5k8ZRKt0aGpZQwIjlUGpy0PzOOYqfI-IMqBQ,455
376
+ numpy/typing/tests/data/fail/lib_function_base.pyi,sha256=6y9T773CBLX-jUry1sCQGVuKVKM2wMuQ56Ni5V5j4Dw,2081
377
+ numpy/typing/tests/data/fail/twodim_base.pyi,sha256=ZqbRJfy5S_pW3fFLuomy4L5SBNqj6Nklexg9KDTo65c,899
378
+ numpy/typing/tests/data/fail/comparisons.pyi,sha256=U4neWzwwtxG6QXsKlNGJuKXHBtwzYBQOa47_7SKF5Wg,888
379
+ numpy/typing/tests/data/fail/linalg.pyi,sha256=yDd05aK1dI37RPt3pD2eJYo4dZFaT2yB1PEu3K0y9Tg,1322
380
+ numpy/typing/tests/data/fail/stride_tricks.pyi,sha256=IjA0Xrnx0lG3m07d1Hjbhtyo1Te5cXgjgr5fLUo4LYQ,315
381
+ numpy/typing/tests/data/fail/arithmetic.pyi,sha256=4rY_ASCERAl8WCus1RakOe0Aw-8vvjilL29mgdD4lv0,3850
382
+ numpy/typing/tests/data/fail/numerictypes.pyi,sha256=fevH9x80CafYkiyBJ7LMLVl6GyTvQrZ34trBu6O8TtM,276
383
+ numpy/typing/tests/data/fail/histograms.pyi,sha256=yAPVt0rYTwtxnigoGT-u7hhKCE9iYxsXc24x2HGBrmA,367
384
+ numpy/typing/tests/data/fail/npyio.pyi,sha256=56QuHo9SvVR3Uhzl6gQZncCpX575Gy5wugjMICh20m0,620
385
+ numpy/typing/tests/data/fail/testing.pyi,sha256=e7b5GKTWCtKGoB8z2a8edsW0Xjl1rMheALsvzEJjlCw,1370
386
+ numpy/typing/tests/data/fail/lib_version.pyi,sha256=7-ZJDZwDcB-wzpMN8TeYtZAgaqc7xnQ8Dnx2ISiX2Ts,158
387
+ numpy/typing/tests/data/fail/ndarray_misc.pyi,sha256=w-10xTDDWoff9Lq0dBO-jBeiBR-XjCz2qmes0dLx238,1372
388
+ numpy/typing/tests/data/fail/nested_sequence.pyi,sha256=em4GZwLDFE0QSxxg081wVwhh-Dmtkn8f7wThI0DiXVs,427
389
+ numpy/typing/tests/data/reveal/einsumfunc.pyi,sha256=pbtSfzIWUJRkDpe2riHBlvFlNSC3CqVM-SbYtBgX9H0,2044
390
+ numpy/typing/tests/data/reveal/index_tricks.pyi,sha256=HpD7lU7hcyDoLdZbeqskPXnX7KYwPtll7uJKYUzrlE8,3177
391
+ numpy/typing/tests/data/reveal/fromnumeric.pyi,sha256=PNtGQR1VmGk_xNbd0eP7k7B2oNCMBz2XOJ17-_SdE5M,12101
392
+ numpy/typing/tests/data/reveal/arraypad.pyi,sha256=Q1pcU4B3eRsw5jsv-S0MsEfNUbp_4aMdO_o3n0rtA2A,776
393
+ numpy/typing/tests/data/reveal/flatiter.pyi,sha256=e1OQsVxQpgyfqMNw2puUTATl-w3swvdknlctAiWxf_E,882
394
+ numpy/typing/tests/data/reveal/ufunclike.pyi,sha256=V_gLcZVrTXJ21VkUMwA0HyxUgA1r6OzjsdJegaKL2GE,1329
395
+ numpy/typing/tests/data/reveal/datasource.pyi,sha256=e8wjn60tO5EdnkBF34JrZT5XvdyW7kRWD2abtgr6qUg,671
396
+ numpy/typing/tests/data/reveal/bitwise_ops.pyi,sha256=nRkyUGrBB_Es7TKyDxS_s3u2dFgBfzjocInI9Ea-J10,3919
397
+ numpy/typing/tests/data/reveal/nditer.pyi,sha256=VFXnT75BgWSUpb-dD-q5cZkfeOqsk-x9cH626g9FWT4,2021
398
+ numpy/typing/tests/data/reveal/getlimits.pyi,sha256=nUGOMFpWj3pMgqLy6ZbR7A4G2q7iLIl5zEFBGf-Qcfw,1592
399
+ numpy/typing/tests/data/reveal/mod.pyi,sha256=-CNWft2jQGSdrO8dYRgwbl7OhL3a78Zo60JVmiY-gQI,5666
400
+ numpy/typing/tests/data/reveal/shape_base.pyi,sha256=YjiVukrK6OOydvopOaOmeAIIa0YQ2hn9_I_-FyYkHVU,2427
401
+ numpy/typing/tests/data/reveal/constants.pyi,sha256=P9vFEMkPpJ5KeUnzqPOuyHlh3zAFl9lzB4WxyB2od7A,1949
402
+ numpy/typing/tests/data/reveal/scalars.pyi,sha256=Qn3B3rsqSN397Jh25xs4odt2pfCQtWkoJe-e0-oX8d4,4790
403
+ numpy/typing/tests/data/reveal/rec.pyi,sha256=DbRVk6lc7-3qPe-7Q26tUWpdaH9B4UVoQSYrRGJUo1Q,3858
404
+ numpy/typing/tests/data/reveal/nbit_base_example.pyi,sha256=DRUMGatQvQXTuovKEMF4dzazIU6it6FU53LkOEo2vNo,657
405
+ numpy/typing/tests/data/reveal/chararray.pyi,sha256=O0EfwnKc3W1Fnx1c7Yotb1O84kVMuqJLlMBXd2duvjI,6093
406
+ numpy/typing/tests/data/reveal/emath.pyi,sha256=-muNpWOv_niIn-zS3gUnFO4qBZAouNlVGue2x1L5Ris,2423
407
+ numpy/typing/tests/data/reveal/arrayprint.pyi,sha256=YyzzkL-wj4Rs-fdo3brpoaWtb5g3yk4Vn2HKu5KRo4w,876
408
+ numpy/typing/tests/data/reveal/numeric.pyi,sha256=aJKnav-X45tjSFfgGD4iCetwEFcJXdNgU7valktjiCg,6160
409
+ numpy/typing/tests/data/reveal/memmap.pyi,sha256=A5PovMzjRp2zslF1vw3TdTQjj4Y0dIEJ__HDBV_svGM,842
410
+ numpy/typing/tests/data/reveal/ufuncs.pyi,sha256=VnwYr5KT_FLKfc0wV7dtNz7bNtaC9VIQt-oz56Hb5EE,2798
411
+ numpy/typing/tests/data/reveal/ndarray_shape_manipulation.pyi,sha256=QDQ9g6l-e73pTJp-Dosiynb-okbqi91D4KirjhIjcv4,1233
412
+ numpy/typing/tests/data/reveal/dtype.pyi,sha256=TKrYyxMu5IGobs0SDTIRcPuWsZ5X7zMYB4pmUlTTJxA,2872
413
+ numpy/typing/tests/data/reveal/matrix.pyi,sha256=ciJXsn5v2O1IZ3VEn5Ilp8-40NTQokfrOOgVXMFsvLo,2922
414
+ numpy/typing/tests/data/reveal/false_positives.pyi,sha256=AplTmZV7TS7nivU8vegbstMN5MdMv4U0JJdZ4IeeA5M,482
415
+ numpy/typing/tests/data/reveal/lib_utils.pyi,sha256=_zj7WGYGYMFXAHLK-F11aeFfDvjRvFARUjoXhbXn8V0,1049
416
+ numpy/typing/tests/data/reveal/char.pyi,sha256=M_iTa9Pn8F7jQ1k6RN9KvbhEn00g7UYJZ5PV57ikcZM,7289
417
+ numpy/typing/tests/data/reveal/ufunc_config.pyi,sha256=buwSvat3SVFAFl5k8TL6Mgpi32o6hHZYZ2Lpn6AHdEU,1327
418
+ numpy/typing/tests/data/reveal/multiarray.pyi,sha256=6MvfNKihK-oN6QwG9HFNelgheo4lnL0FCrmIF_qxdoA,5326
419
+ numpy/typing/tests/data/reveal/array_constructors.pyi,sha256=DcT8Z2rEpqYfjXySBejk8cGOUidUmizZGE5ZEy7r14E,10600
420
+ numpy/typing/tests/data/reveal/modules.pyi,sha256=0WPq7A-aqWkJsV-IA1_7dFNCcxBacj1AWExaXbXErG4,1958
421
+ numpy/typing/tests/data/reveal/type_check.pyi,sha256=yZSp50TtvPqv_PN7zmVcNOVUTUXMNYFGcguMNj25E9Y,3044
422
+ numpy/typing/tests/data/reveal/random.pyi,sha256=s6T074ZIpGAUqHnA-yAlozTLvt7PNBjCBqd-nGMqWGg,104091
423
+ numpy/typing/tests/data/reveal/arrayterator.pyi,sha256=TF_1eneHoT0v9HqS9dKc5Xiv3iY3E330GR1RNcJ7s2Q,1111
424
+ numpy/typing/tests/data/reveal/lib_polynomial.pyi,sha256=TOzOdMPDqveDv3vDKSjtq6RRvN-j_s2J7aud2ySDAB0,5986
425
+ numpy/typing/tests/data/reveal/warnings_and_errors.pyi,sha256=jsy2e6YlBU9ZlAx3IlVi3VLiPVduHE_nVYpWIeswEvo,538
426
+ numpy/typing/tests/data/reveal/lib_function_base.pyi,sha256=eSiSZUlmPXqVPKknM7GcEv76BDgj0IJRu3FXcZXpmqc,8318
427
+ numpy/typing/tests/data/reveal/twodim_base.pyi,sha256=ZdNVo2HIJcx8iF9PA-z5W3Bs0hWM2nlVdbhLuAQlljM,3132
428
+ numpy/typing/tests/data/reveal/comparisons.pyi,sha256=huaf-seaF5ndTqfoaBfPtMMkOYovq7ibJl5-CRoQW7s,7468
429
+ numpy/typing/tests/data/reveal/linalg.pyi,sha256=LPaY-RyYL7Xt3djCgNaWEgI8beI9Eo_XnvOwi6Y7-eo,4877
430
+ numpy/typing/tests/data/reveal/stride_tricks.pyi,sha256=EBZR8gSP385nhotwJ3GH9DOUD2q5nUEYbXfhLo5xrPo,1542
431
+ numpy/typing/tests/data/reveal/arithmetic.pyi,sha256=Ndmi_IFAl8z28RHsYTbOouf-B5FH91x_9ky-JwsdXVg,19765
432
+ numpy/typing/tests/data/reveal/arraysetops.pyi,sha256=ApCFQcZzQ08zV32SJ86Xyv_7jazl3XKMmJmULtNquJ8,4155
433
+ numpy/typing/tests/data/reveal/numerictypes.pyi,sha256=-YQRhwjBjsFJHjpGCRqzafNnKDdsmbBHbmPwccP0pLI,2487
434
+ numpy/typing/tests/data/reveal/histograms.pyi,sha256=MxKWoa7UoJRRLim53H6OoyYfz87P3_9YUXGYPTknGVQ,1303
435
+ numpy/typing/tests/data/reveal/ndarray_conversion.pyi,sha256=BfjQD8U756l4gOfY0LD47HhDRxbq0yCFfEFKvbXs7Rs,1791
436
+ numpy/typing/tests/data/reveal/npyio.pyi,sha256=YXagt2J-1suu5WXZ_si5NuJf7sHj_7NlaSLqQkam1Po,4209
437
+ numpy/typing/tests/data/reveal/testing.pyi,sha256=_WOAj_t5SWYiqN0KG26Mza8RvaD3WAa7rFUlgksjLms,8611
438
+ numpy/typing/tests/data/reveal/lib_version.pyi,sha256=UCioUeykot8-nWL6goKxZnKZxtgB4lFEi9wdN_xyF1U,672
439
+ numpy/typing/tests/data/reveal/ndarray_misc.pyi,sha256=0EN-a47Msn4pZgKVdD-GrXCCmt-oxjlov5rszchBmOI,7126
440
+ numpy/typing/tests/data/reveal/nested_sequence.pyi,sha256=IQyRlXduk-ZEakOtoliMLCqNgGbeg0mzZf-a-a3Gq_0,734
441
+ numpy/typing/tests/data/reveal/fft.pyi,sha256=ReQ9qn5frvJEy-g0RWpUGlPBntUS1cFSIu6WfPotHzE,1749
442
+ numpy/typing/tests/data/reveal/ctypeslib.pyi,sha256=-Pk2rLEGCzz3B_y8Mu10JSVA8gPFztl5fV1dspPzqig,4727
443
+ numpy/testing/print_coercion_tables.py,sha256=ndxOsS4XfrZ4UY_9nqRTCnxhkzgdqcuUHL8nezd7Op4,6180
444
+ numpy/testing/__init__.pyi,sha256=AhK5NuOpdD-JjIzXOlssE8_iSLyFAAHzyGV_w1BT7vA,1674
445
+ numpy/testing/setup.py,sha256=GPKAtTTBRsNW4kmR7NjP6mmBR_GTdpaTvkTm10_VcLg,709
446
+ numpy/testing/overrides.py,sha256=u6fcKSBC8HIzMPWKAbdyowU71h2Fx2ekDQxpG5NhIr8,2123
447
+ numpy/testing/__init__.py,sha256=InpVKoDAzMKO_l_HNcatziW_u1k9_JZze__t2nybrL0,595
448
+ numpy/testing/tests/test_utils.py,sha256=IDOr-GXuNGlrsb-XzGSYUHXEqcGYJ78p60jOpBqyPM4,55740
449
+ numpy/testing/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
450
+ numpy/testing/_private/utils.py,sha256=3FrSTMi0OdpDODBDoncgiDQzdo5NKA6YVfQ3uKRSQnc,85242
451
+ numpy/testing/_private/extbuild.py,sha256=nG2dwP4nUmQS3e5eIRinxt0s_f4sxxA1YfohCg-navo,8017
452
+ numpy/testing/_private/utils.pyi,sha256=MMNrvwEeSTYzZFWawSSzHnTFYG-cSAIiID-1FuJ1f8U,10123
453
+ numpy/testing/_private/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
454
+ numpy/lib/user_array.py,sha256=LE958--CMkBI2r3l1SQxmCHdCSw6HY6-RhWCnduzGA4,7721
455
+ numpy/lib/mixins.pyi,sha256=h9N1kbZsUntF0zjOxPYeD_rCB2dMiG35TYYPl9ymkI4,3117
456
+ numpy/lib/index_tricks.pyi,sha256=D2nkNXOB9Vea1PfMaTn94OGBGayjTaQ-bKMsjDmYpak,4251
457
+ numpy/lib/shape_base.py,sha256=AhCO9DEyysE-P-QJF9ryUtJ1ghU4_0mORhAJ59poObU,38947
458
+ numpy/lib/arraypad.pyi,sha256=ADXphtAORYl3EqvE5qs_u32B_TALKSOtF43jOLmoxRw,1728
459
+ numpy/lib/function_base.pyi,sha256=KWaC5UOBANU4hiIoN2eptE4HYsm4vgp_8BMFV1Y3JX4,16585
460
+ numpy/lib/recfunctions.py,sha256=-90AbWWvVFOqVUPLh9K9NYdKUHYIgSEyg2Y35MnOVUA,59423
461
+ numpy/lib/ufunclike.pyi,sha256=hLxcYfQprh1tTY_UO2QscA3Hd9Zd7cVGXIINZLhMFqY,1293
462
+ numpy/lib/shape_base.pyi,sha256=bGJhLA_RvUpVTiDFgCV-1rUjV8e1qCh0gK_3PLgXA_U,5341
463
+ numpy/lib/type_check.py,sha256=_EOtB296nFYlNT7ztBYoC_yK9aycIb0KTmRjvzVdZNg,19954
464
+ numpy/lib/format.pyi,sha256=YWBxC3GdsZ7SKBN8I7nMwWeVuFD1aT9d-VJ8zE4-P-o,748
465
+ numpy/lib/scimath.py,sha256=T4ITysZgqhY1J8IxyXCtioHjMTg2ci-4i3mr9TBF2UA,15037
466
+ numpy/lib/twodim_base.py,sha256=Mvzn_PyShIb9m7nJjJ4IetdxwmLYEsCPHvJoK7n2viU,32947
467
+ numpy/lib/_iotools.py,sha256=Yg9HCfPg4tbhbdgLPcxSMiZXq1xDprvJKLebLwhDszY,30868
468
+ numpy/lib/nanfunctions.pyi,sha256=oPqAfCinmBL85Ji7ko4QlzAzLAK9nZL0t2_CllEbCEU,606
469
+ numpy/lib/__init__.pyi,sha256=y5ANokFm7EkrlNoHdeQm1FsUhLFxkYtLuanCbsWrGio,5596
470
+ numpy/lib/arrayterator.py,sha256=BQ97S00zvfURUZfes0GZo-5hydYNRuvwX1I1bLzeRik,7063
471
+ numpy/lib/ufunclike.py,sha256=_ceBGbGCMOd3u_h2UVzyaRK6ZY7ryoJ0GJB7zqcJG3w,6325
472
+ numpy/lib/mixins.py,sha256=y6_MzQuiNjv-1EFVROqv2y2cAJi5X4rQYzbZCyUyXgw,7071
473
+ numpy/lib/arraysetops.py,sha256=GJ2RhkzIJmIbwyG6h3LOFTPXg62kM9tcV1a-7tdbVuU,33655
474
+ numpy/lib/_version.pyi,sha256=B572hyWrUWG-TAAAXrNNAT4AgyUAmJ4lvgpwMkDzunk,633
475
+ numpy/lib/utils.py,sha256=6NdleaELZiqARdj-ECZjxtwLf1bqklOcK43m9yoZefs,37804
476
+ numpy/lib/type_check.pyi,sha256=LPvAvIxU-p5i_Qe-ic7hEvo4OTfSrNpplxMG7OAZe8Q,5571
477
+ numpy/lib/histograms.py,sha256=xsj_qpaZoI2Bv1FBpY8mIMPJrYRiuIBszn_6kO7YFRA,37778
478
+ numpy/lib/_datasource.py,sha256=CDF3im6IxdY3Mu6fwRQmkSEBmXS3kQVInQ4plXsoX9c,22631
479
+ numpy/lib/arrayterator.pyi,sha256=f7Pwp83_6DiMYmJGUsffncM-FRAynB1iYGvhmHM_SZE,1537
480
+ numpy/lib/polynomial.pyi,sha256=GerIpQnf5LdtFMOy9AxhOTqUyfn57k4MxqEYrfdckWE,6958
481
+ numpy/lib/utils.pyi,sha256=mVHVzWuc2-M3Oz60lFsbok0v8LH_HRHMjZpXwrtzF_c,2360
482
+ numpy/lib/setup.py,sha256=0K5NJKuvKvNEWp-EX7j0ODi3ZQQgIMHobzSFJq3G7yM,405
483
+ numpy/lib/polynomial.py,sha256=6Aw3_2vdbh4urERQ6NaPhf9a_T1o1o6cjm3fb5Z3_YE,44133
484
+ numpy/lib/nanfunctions.py,sha256=6EjzydZlugIzfiENKtC4ycZ2Nckt8ZQg5v6D6tX1SiU,65775
485
+ numpy/lib/twodim_base.pyi,sha256=xFRcEVJdDj4mrXW_6iVP1lTMoJx4QJjYRD3o2_9f2eY,5370
486
+ numpy/lib/function_base.py,sha256=G8I3G6wqJv_tcvimu3iwdqh-39EDI-FlDEVd2dqjvsM,189103
487
+ numpy/lib/format.py,sha256=T8qJMyG2DDVjjYNNpUvBgfA9tCo23IS0w9byRB6twwQ,34769
488
+ numpy/lib/stride_tricks.py,sha256=brY5b-0YQJuIH2CavfpIinMolyTUv5k9DUvLoZ-imis,17911
489
+ numpy/lib/stride_tricks.pyi,sha256=0pQ4DP9l6g21q2Ajv6dJFRWMr9auPGTNV9BmZUbogPY,1747
490
+ numpy/lib/__init__.py,sha256=XMPNJkG_mQ__xuvbf0OcpotgMbA9owt10ZHYVnYHq8E,2713
491
+ numpy/lib/arraysetops.pyi,sha256=6X-5l5Yss_9y10LYyIsDLbGX77vt7PtVLDqxOlSRPfY,8372
492
+ numpy/lib/histograms.pyi,sha256=hNwR2xYWkgJCP-nfRGxc-EgHLTD3qm4zmWXthZLt08M,995
493
+ numpy/lib/_version.py,sha256=6vK7czNSB_KrWx2rZJzJ1pyOc73Q07hAgfLB5ItUCnU,4855
494
+ numpy/lib/npyio.pyi,sha256=SUFWJh90vWZCdd6GCSGbfYeXKlWut0XY_SHvZJc8yqY,9728
495
+ numpy/lib/index_tricks.py,sha256=4PEvXk6VFTkttMViYBVC4yDhyOiKIon6JpIm0d_CmNg,31346
496
+ numpy/lib/scimath.pyi,sha256=E2roKJzMFwWSyhLu8UPUr54WOpxF8jp_pyXYBgsUSQ8,2883
497
+ numpy/lib/arraypad.py,sha256=bKP7ZS9NYFYzqSk8OnpFLFrMsua4m_hcqFsi7cGkrJE,31803
498
+ numpy/lib/npyio.py,sha256=NUjtFvAmPdTjwJQ-ia-xbCr849M_M6NilP5IHfkKaRg,97316
499
+ numpy/lib/tests/test_arrayterator.py,sha256=AYs2SwV5ankgwnvKI9RSO1jZck118nu3SyZ4ngzZNso,1291
500
+ numpy/lib/tests/test_index_tricks.py,sha256=Vjz25Y6H_ih0iEE2AG0kaxO9U8PwcXSrofzqnN4XBwI,20256
501
+ numpy/lib/tests/test_arraypad.py,sha256=obohHbyM0gPYPUkd7iJSOSiDqyqtJsjDNtQX68NC4lM,54830
502
+ numpy/lib/tests/test_nanfunctions.py,sha256=01r_mmTCvKVdZuOGTEHNDZXrMS724us_jwZANzCd74A,47609
503
+ numpy/lib/tests/test_packbits.py,sha256=OWGAd5g5GG0gl7WHqNfwkZ7G-2rrtLt2sI854PG4nnw,17546
504
+ numpy/lib/tests/test__version.py,sha256=aO3YgkAohLsLzCNQ7vjIwdpFUMz0cPLbcuuxIkjuN74,1999
505
+ numpy/lib/tests/test__datasource.py,sha256=65KXfUUvp8wXSqgQisuYlkhg-qHjBV5FXYetL8Ba-rc,10571
506
+ numpy/lib/tests/test_ufunclike.py,sha256=4hSnXGlSC8HE-_pRRMzD8-HI4hGHqsAWu1pD0o2kPI0,2982
507
+ numpy/lib/tests/test_stride_tricks.py,sha256=wprpWWH5eq07DY7rzG0WDv5fMtLxzRQz6fm6TZWlScQ,22849
508
+ numpy/lib/tests/test_histograms.py,sha256=LGw-qIpq94gfP7Qtom5QzC5yRym3fYw97_hTDuyZjB0,32734
509
+ numpy/lib/tests/test_loadtxt.py,sha256=gwcDJDJmLJRMLpg322yjQ1IzI505w9EqJoq4DmDPCdI,38560
510
+ numpy/lib/tests/test_polynomial.py,sha256=URouxJpr8FQ5hiKybqhtOcLA7e-3hj4kWzjLBROByyA,11395
511
+ numpy/lib/tests/test_twodim_base.py,sha256=ll-72RhqCItIPB97nOWhH7H292h4nVIX_w1toKTPMUg,18841
512
+ numpy/lib/tests/test_type_check.py,sha256=lxCH5aApWVYhhSoDQSLDTCHLVHuK2c-jBbnfnZUrOaA,15114
513
+ numpy/lib/tests/test_utils.py,sha256=RVAxrzSFu6N3C4_jIgAlTDOWF_B7wr2v1Y20dX5upYM,6218
514
+ numpy/lib/tests/test_recfunctions.py,sha256=6jzouPEQ7Uhtj8_-W5yTI6ymNp2nLgmdHzxdd74jVuM,44001
515
+ numpy/lib/tests/test_arraysetops.py,sha256=5-T1MVhfIMivat8Z47GZw0ZaR811W_FskM1bAXnFyLU,35912
516
+ numpy/lib/tests/test_financial_expired.py,sha256=yq5mqGMvqpkiiw9CuZhJgrYa7Squj1mXr_G-IvAFgwI,247
517
+ numpy/lib/tests/test_format.py,sha256=xV0oi1eoRnVwAAhSOcPFQHQWF7TfsROtDYShQLPtdaA,41028
518
+ numpy/lib/tests/test_shape_base.py,sha256=2iQCEFR6evVpF8woaenxUOzooHkfuMYkBaUj8ecyJ-E,26817
519
+ numpy/lib/tests/test_io.py,sha256=3Tow1pucrQ7z7osNN4a2grBYUoBGNkQEhjmCjXT6Vag,107891
520
+ numpy/lib/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
521
+ numpy/lib/tests/test_function_base.py,sha256=tqIwgkd-4uWZlHCQ-7eplJuFXvSD_oWMD8Bibc8-ptk,157726
522
+ numpy/lib/tests/test__iotools.py,sha256=HerCqvDE07JxjFQlWEfpZO7lC9z0Sbr3z20GSutoCPs,13743
523
+ numpy/lib/tests/test_regression.py,sha256=KzGFkhTcvEG97mymoOQ2hP2CEr2nPZou0Ztf4-WaXCs,8257
524
+ numpy/lib/tests/test_mixins.py,sha256=Wivwz3XBWsEozGzrzsyyvL3qAuE14t1BHk2LPm9Z9Zc,7030
525
+ numpy/lib/tests/data/py2-objarr.npz,sha256=xo13HBT0FbFZ2qvZz0LWGDb3SuQASSaXh7rKfVcJjx4,366
526
+ numpy/lib/tests/data/py2-objarr.npy,sha256=F4cyUC-_TB9QSFLAo2c7c44rC6NUYIgrfGx9PqWPSKk,258
527
+ numpy/lib/tests/data/win64python2.npy,sha256=agOcgHVYFJrV-nrRJDbGnUnF4ZTPYXuSeF-Mtg7GMpc,96
528
+ numpy/lib/tests/data/py3-objarr.npz,sha256=qQR0gS57e9ta16d_vCQjaaKM74gPdlwCPkp55P-qrdw,449
529
+ numpy/lib/tests/data/python3.npy,sha256=X0ad3hAaLGXig9LtSHAo-BgOvLlFfPYMnZuVIxRmj-0,96
530
+ numpy/lib/tests/data/py3-objarr.npy,sha256=pTTVh8ezp-lwAK3fkgvdKU8Arp5NMKznVD-M6Ex_uA0,341
531
+ numpy/tests/test_numpy_version.py,sha256=A8cXFzp4k-p6J5zkOxlDfDvkoFMxDW2hpTFVXcaQRVo,1479
532
+ numpy/tests/test_ctypeslib.py,sha256=B06QKeFRgDIEbkEPBy_zYA1H5E2exuhTi7IDkzV8gfo,12257
533
+ numpy/tests/test_numpy_config.py,sha256=qHvepgi9oyAbQuZD06k7hpcCC2MYhdzcY6D1iQDPNMI,1241
534
+ numpy/tests/test_warnings.py,sha256=b7x4zdms9sNJkO9FJ-LTzYI4BWhbeLGy2oFMC6Z85ig,2280
535
+ numpy/tests/test_reloading.py,sha256=QuVaPQulcNLg4Fl31Lw-O89L42KclYCK68n5GVy0PNQ,2354
536
+ numpy/tests/test__all__.py,sha256=L3mCnYPTpzAgNfedVuq9g7xPWbc0c1Pot94k9jZ9NpI,221
537
+ numpy/tests/test_matlib.py,sha256=gwhIXrJJo9DiecaGLCHLJBjhx2nVGl6yHq80AOUQSRM,1852
538
+ numpy/tests/test_public_api.py,sha256=DTq7SO84uBjC2tKPoqX17xazc-SLkTAbQ2fLZwGM2jc,18170
539
+ numpy/tests/test_scripts.py,sha256=jluCLfG94VM1cuX-5RcLFBli_yaJZpIvmVuMxRKRJrc,1645
540
+ numpy/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
541
+ numpy/tests/test_lazyloading.py,sha256=YETrYiDLAqLX04K_u5_3NVxAfxDoeguxwkIRfz6qKcY,1162
542
+ numpy/_typing/_array_like.py,sha256=L4gnx2KWG8yYcouz5b9boJIkkFNtOJV6QjcnGCrbnRY,4298
543
+ numpy/_typing/_scalars.py,sha256=eVP8PjlcTIlY7v0fRI3tFXPogWtpLJZ8nFvRRrLjDqs,980
544
+ numpy/_typing/_shape.py,sha256=JPy7jJMkISGFTnkgiEifYM-4xTcjb7JMRkLIIjZLw08,211
545
+ numpy/_typing/_char_codes.py,sha256=LR51O5AUBDbCmJvlMoxyUvsfvb1p7WHrexgtTGtuWTc,5916
546
+ numpy/_typing/_add_docstring.py,sha256=xQhQX372aN_m3XN95CneMxOST2FdPcovR-MXM-9ep58,3922
547
+ numpy/_typing/_nbit.py,sha256=-EQOShHpB3r30b4RVEcruQRTcTaFAZwtqCJ4BsvpEzA,345
548
+ numpy/_typing/_nested_sequence.py,sha256=5eNaVZAV9tZQLFWHYOuVs336JjoiaWxyZQ7cMKb6m1I,2566
549
+ numpy/_typing/setup.py,sha256=SE0Q6HPqDjWUfceA4yXgkII8y3z7EiSF0Z-MNwOIyG4,337
550
+ numpy/_typing/_extended_precision.py,sha256=dGios-1k-QBGew7YFzONZTzVWxz-aYAaqlccl2_h5Bo,777
551
+ numpy/_typing/__init__.py,sha256=6w9E9V9VaT7vTM-veua8XcySv50Je5qSPJzK9HTocIg,7003
552
+ numpy/_typing/_ufunc.pyi,sha256=e74LtOP9e8kkRhvrIJ_RXz9Ua_L43Pd9IixwNwermnM,12638
553
+ numpy/_typing/_dtype_like.py,sha256=21Uxy0UgIawGM82xjDF_ifMq-nP-Bkhn_LpiK_HvWC4,5661
554
+ numpy/_typing/_callable.pyi,sha256=Mf57BwohRn9ye6ixJqjNEnK0gKqnVPE9Gy8vK-6_zxo,11121
555
+ numpy/ma/extras.pyi,sha256=BBsiCZbaPpGCY506fkmqZdBkJNCXcglc3wcSBuAACNk,2646
556
+ numpy/ma/core.pyi,sha256=YfgyuBuKxZ5v4I2JxZDvCLhnztOCRgzTeDg-JGTon_M,14305
557
+ numpy/ma/testutils.py,sha256=RQw0RyS7hOSVTk4KrCGleq0VHlnDqzwwaLtuZbRE4_I,10235
558
+ numpy/ma/extras.py,sha256=MC7QPS34PC4wxNbOp7pTy57dqF9B-L6L1KMI6rrfe2w,64383
559
+ numpy/ma/__init__.pyi,sha256=ppCg_TS0POutNB3moJE4kBabWURnc0WGXyYPquXZxS4,6063
560
+ numpy/ma/LICENSE,sha256=BfO4g1GYjs-tEKvpLAxQ5YdcZFLVAJoAhMwpFVH_zKY,1593
561
+ numpy/ma/mrecords.pyi,sha256=r1a2I662ywnhGS6zvfcyK-9RHVvb4sHxiCx9Dhf5AE4,1934
562
+ numpy/ma/README.rst,sha256=q-gCsZ4Cw_gUGGvEjog556sJUHIm8WTAwkFK5Qnz9XA,9872
563
+ numpy/ma/API_CHANGES.txt,sha256=F_4jW8X5cYBbzpcwteymkonTmvzgKKY2kGrHF1AtnrI,3405
564
+ numpy/ma/setup.py,sha256=MqmMicr_xHkAGoG-T7NJ4YdUZIJLO4ZFp6AmEJDlyhw,418
565
+ numpy/ma/__init__.py,sha256=dgP0WdnOpph28Fd6UiqoyDKhfrct0H6QWqbCcETsk6M,1404
566
+ numpy/ma/mrecords.py,sha256=degd6dLaDEvEWNHmvSnUZXos1csIzaqjR_jAutm8JfI,27232
567
+ numpy/ma/core.py,sha256=4MglVRJtmQ9_iIVaQ2b-_Vmw1TjAhEsMJdtKOhyBFXQ,278213
568
+ numpy/ma/timer_comparison.py,sha256=pIGSZG-qYYYlRWSTgzPlyCAINbGKhXrZrDZBBjiM080,15658
569
+ numpy/ma/tests/test_extras.py,sha256=lX4cbdGDEXaBHzA3q8hJxve4635XCJw4AP7FO7zhOfk,74858
570
+ numpy/ma/tests/test_deprecations.py,sha256=nq_wFVt2EBHcT3AHxattfKXx2JDf1K5D-QBzUU0_15A,2566
571
+ numpy/ma/tests/test_subclassing.py,sha256=HeTIE_n1I8atwzF8tpvNtGHp-0dmM8PT8AS4IDWbcso,16967
572
+ numpy/ma/tests/test_mrecords.py,sha256=PsJhUlABgdpSsPUeijonfyFNqz5AfNSGQTtJUte7yts,19890
573
+ numpy/ma/tests/test_core.py,sha256=xd5S3oa0jObo8jnsJk0-o46d-KNC3RtgNRKinJeY_kE,215100
574
+ numpy/ma/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
575
+ numpy/ma/tests/test_old_ma.py,sha256=h4BncexBcBigqvZMA6RjDjpHPurWtt99A7KTag2rmOs,32690
576
+ numpy/ma/tests/test_regression.py,sha256=foMpI0luAvwkkRpAfPDV_810h1URISXDZhmaNhxb50k,3287
577
+ numpy/_pyinstaller/hook-numpy.py,sha256=PUQ-mNWje6bFALB-mLVFRPkvbM4JpLXunB6sjBbTy5g,1409
578
+ numpy/_pyinstaller/pyinstaller-smoke.py,sha256=6iL-eHMQaG3rxnS5EgcvrCqElm9aKL07Cjr1FZJSXls,1143
579
+ numpy/_pyinstaller/test_pyinstaller.py,sha256=8K-7QxmfoXCG0NwR0bhIgCNrDjGlrTzWnrR1sR8btgU,1135
580
+ numpy/_pyinstaller/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
581
+ numpy/matrixlib/__init__.pyi,sha256=-t3ZuvbzRuRwWfZOeN4xlNWdm7gQEprhUsWzu8MRvUE,252
582
+ numpy/matrixlib/defmatrix.pyi,sha256=lmBMRahKcMOl2PHDo79J67VRAZOkI54BzfDaTLpE0LI,451
583
+ numpy/matrixlib/defmatrix.py,sha256=JXdJGm1LayOOXfKpp7OVZfb0pzzP4Lwh45sTJrleALc,30656
584
+ numpy/matrixlib/setup.py,sha256=1r7JRkSM4HyVorgtjoKJGWLcOcPO3wmvivpeEsVtAEg,426
585
+ numpy/matrixlib/__init__.py,sha256=BHBpQKoQv4EjT0UpWBA-Ck4L5OsMqTI2IuY24p-ucXk,242
586
+ numpy/matrixlib/tests/test_numeric.py,sha256=MP70qUwgshTtThKZaZDp7_6U-Z66NIV1geVhasGXejQ,441
587
+ numpy/matrixlib/tests/test_multiarray.py,sha256=jB3XCBmAtcqf-Wb9PwBW6uIykPpMPthuXLJ0giTKzZE,554
588
+ numpy/matrixlib/tests/test_interaction.py,sha256=PpjmgjEKighDXvt38labKE6L7f2jP74UEmp3JRb_iOY,11875
589
+ numpy/matrixlib/tests/test_defmatrix.py,sha256=8E_-y7VD2vsq1y8CcI8km37pp5qcAtkciO16xqf2UIs,14982
590
+ numpy/matrixlib/tests/test_masked_matrix.py,sha256=7YO_LCO8DOhW3CuXJuxH93rnmttfvHnU7El-MBzxzFw,8932
591
+ numpy/matrixlib/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
592
+ numpy/matrixlib/tests/test_regression.py,sha256=8sHDtO8Zi8p3a1eQKEWxtCmKrXmHoD3qxlIokg2AIAU,927
593
+ numpy/matrixlib/tests/test_matrix_linalg.py,sha256=ObbSUXU4R2pWajH__xAdizADrU2kBKDDCxkDV-oVBXc,2059
594
+ numpy/fft/__init__.pyi,sha256=vD9Xzz5r13caF4AVL87Y4U9KOj9ic25Vci_wb3dmgpk,550
595
+ numpy/fft/helper.pyi,sha256=NLTEjy2Gz1aAMDZwCgssIyUne0ubjJqukfYkpsL3gXM,1176
596
+ numpy/fft/helper.py,sha256=aNj1AcLvtfoX26RiLOwcR-k2QSMuBZkGj2Fu0CeFPJs,6154
597
+ numpy/fft/__init__.py,sha256=HqjmF6s_dh0Ri4UZzUDtOKbNUyfAfJAWew3e3EL_KUk,8175
598
+ numpy/fft/_pocketfft.pyi,sha256=S6-ylUuHbgm8vNbh7tLru6K2R5SJzE81BC_Sllm6QrQ,2371
599
+ numpy/fft/_pocketfft_internal.cpython-311-x86_64-linux-gnu.so,sha256=w2pDSZMizgUEm4qTDXTvKxP5oqdEzZ42AE4anGWB8Uo,97056
600
+ numpy/fft/_pocketfft.py,sha256=Xkm8wcP4JyBNMbp0ZoHIWhNDlgliX24RzrDuo29uRks,52897
601
+ numpy/fft/tests/test_pocketfft.py,sha256=RdeCCvUQmJYVvccOJwToobTKDg9yzUL06o9MkPmRfmI,12895
602
+ numpy/fft/tests/test_helper.py,sha256=whgeaQ8PzFf3B1wkbXobGZ5sF4WxPp4gf1UPUVZest8,6148
603
+ numpy/fft/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
604
+ numpy/array_api/_manipulation_functions.py,sha256=qCoW5B5FXcFOWKPU9D9MXHdMeXIuzvnHUUvprNlwfjc,3317
605
+ numpy/array_api/_statistical_functions.py,sha256=HspfYteZWSa3InMs10KZz-sk3ZuW6teX6fNdo829T84,3584
606
+ numpy/array_api/_dtypes.py,sha256=kDU1NLvEQN-W2HPmJ2wGPx8jiNkFbrvTCD1T1RT8Pwo,4823
607
+ numpy/array_api/_creation_functions.py,sha256=6SqHdzZqHOJFEyWFtqnj6KIKRivrGXxROlgnez_3Mt0,10050
608
+ numpy/array_api/_set_functions.py,sha256=ULpfK1zznW9joX1DXSiP0R3ahcDB_po7mZlpsRqi7Fs,2948
609
+ numpy/array_api/_utility_functions.py,sha256=HwycylbPAgRVz4nZvjvwqN3mQnJbqKA-NRMaAvIP-CE,824
610
+ numpy/array_api/_data_type_functions.py,sha256=P57FOsNdXahNUriVtdldonbvBQrrZkVzxZbcqkR_8AA,6288
611
+ numpy/array_api/_sorting_functions.py,sha256=7pszlxNN7-DNqEZlonGLFQrlXPP7evVA8jN31NShg00,2031
612
+ numpy/array_api/linalg.py,sha256=rOKR6I34BN09XNs8yws55SvIpL5RnivcLlRSAhHOkuo,18221
613
+ numpy/array_api/_array_object.py,sha256=7u7HfkdCviDoqMDr-Su7aszEh9cpKQQu51LT6c7baBU,43739
614
+ numpy/array_api/setup.py,sha256=Wx6qD7GU_APiqKolYPO0OHv4eHGYrjPZmDAgjWhOEhM,341
615
+ numpy/array_api/__init__.py,sha256=98LJFXrRDAwkSjavC6DTqvtksX3zboHdq7h4x5JjiYU,10355
616
+ numpy/array_api/_searching_functions.py,sha256=mGZiqheYXGWiDK9rqXFiDKX0_B0mJ1OjdA-9FC2o5lA,1715
617
+ numpy/array_api/_elementwise_functions.py,sha256=0kGuDX3Ur_Qp6tBMBWTO7LPUxzXNGAlA2SSJhdAp4DU,25992
618
+ numpy/array_api/_constants.py,sha256=Z6bImx0puhVuCwc5dPXvZ6TZt46exiuuX1TubSyQ62E,66
619
+ numpy/array_api/_indexing_functions.py,sha256=d-gzqzyvR45FQerRYJrbBzCWFnDsZWSI9pggA5QWRO4,715
620
+ numpy/array_api/_typing.py,sha256=uKidRp6nYxgHnEPaqXXZsDDZ6tw1LshpbwLvy-09eeM,1347
621
+ numpy/array_api/tests/test_manipulation_functions.py,sha256=wce25dSJjubrGhFxmiatzR_IpmNYp9ICJ9PZBBnZTOQ,1087
622
+ numpy/array_api/tests/test_creation_functions.py,sha256=s3A1COWmXIAJdhzd8v7VtL-jbiSspskTqwYy0BTpmpw,5023
623
+ numpy/array_api/tests/test_data_type_functions.py,sha256=qc8ktRlVXWC3PKhxPVWI_UF9f1zZtpmzHjdCtf3e16E,1018
624
+ numpy/array_api/tests/test_indexing_functions.py,sha256=AbuBGyEufEAf24b7fy8JQhdJtGPdP9XEIxPTJAfAFFo,627
625
+ numpy/array_api/tests/test_set_functions.py,sha256=D016G7v3ko49bND5sVERP8IqQXZiwr-2yrKbBPJ-oqg,546
626
+ numpy/array_api/tests/test_array_object.py,sha256=FQoAxP4CLDiv6iih8KKUDSLuYM6dtnDcB1f0pMHw4-M,17035
627
+ numpy/array_api/tests/__init__.py,sha256=t_2GZ3lKcsu4ec4GMKPUDYaeMUJyDquBlQAcPgj7kFE,282
628
+ numpy/array_api/tests/test_sorting_functions.py,sha256=INPiYnuGBcsmWtYqdTTX3ENHmM4iUx4zs9KdwDaSmdA,602
629
+ numpy/array_api/tests/test_validation.py,sha256=QUG9yWC3QhkPxNhbQeakwBbl-0Rr0iTuZ41_0sfVIGU,676
630
+ numpy/array_api/tests/test_elementwise_functions.py,sha256=CTj4LLwtusI51HkpzD0JPohP1ffNxogAVFz8WLuWFzM,3800
631
+ numpy/f2py/symbolic.py,sha256=M9ZiMeGdYnMSRO_TKrlDSltaS5nAiJfatWqMND3T6cw,53002
632
+ numpy/f2py/rules.py,sha256=cD2sEEQbgWp5KmC0Oy8gBuckmsu2KwtZH4x4R2mqIq8,62755
633
+ numpy/f2py/use_rules.py,sha256=5t6X17rF6y42SwuUYe1LtNihJJEIgCU7f9jPqKphfgA,3587
634
+ numpy/f2py/func2subr.py,sha256=Cd7rV44qEjOzVEnk_VYkgoQ8TT6LvyTyooGtrQSnDzE,10349
635
+ numpy/f2py/__init__.pyi,sha256=eA7uYXZr0p0aaz5rBW-EypLx9RchrvqDYtSnkEJQsYw,1087
636
+ numpy/f2py/_isocbind.py,sha256=S8_dfiW8O4Kg8WO0RpI-q1cOO_MPt-6kya0FIq6x6Vg,1364
637
+ numpy/f2py/cfuncs.py,sha256=W9GApLYhWFOua3Fikqv0oKsX88dLuDgK-2URowebvaA,51719
638
+ numpy/f2py/common_rules.py,sha256=jvbAHF1YESIuG-vQRiNwQ8KLwfMyMlX9ZugL-R4Fbtc,5089
639
+ numpy/f2py/__version__.py,sha256=7HHdjR82FCBmftwMRyrlhcEj-8mGQb6oCH-wlUPH4Nw,34
640
+ numpy/f2py/setup.cfg,sha256=Fpn4sjqTl5OT5sp8haqKIRnUcTPZNM6MIvUJBU7BIhg,48
641
+ numpy/f2py/diagnose.py,sha256=0SRXBE2hJgKJN_Rf4Zn00oKXC_Tka3efPWM47zg6BoY,5197
642
+ numpy/f2py/cb_rules.py,sha256=osSAGP1A4ARNjsfRJmYLkZjrBqaWkQQh5rao8q1vjZw,25039
643
+ numpy/f2py/__main__.py,sha256=6i2jVH2fPriV1aocTY_dUFvWK18qa-zjpnISA-OpF3w,130
644
+ numpy/f2py/f90mod_rules.py,sha256=Gs08YcZ_i_99-tgHLPah-AX4RKW1vzGBTcoTO42Zybg,9456
645
+ numpy/f2py/auxfuncs.py,sha256=ONJO3hZrQOh_hH9LOLUbW-S6gBfkQiQxqPMn5N-5GGY,24374
646
+ numpy/f2py/crackfortran.py,sha256=Z5NPef_gwcwBuWEb5y2z1pRb-ZVkU9SckgGtqhw1g3U,142692
647
+ numpy/f2py/capi_maps.py,sha256=1Gc102m5KbVXJE6JCRJia0esmYHItqDhjHZniEtvW-4,31248
648
+ numpy/f2py/setup.py,sha256=RopKBR38sOcIPtgBIf3yie04tVxhQ-4OXzBGu196WUM,2421
649
+ numpy/f2py/__init__.py,sha256=Bw8AsdY1o7Oj-fVMbS8x0lfMsUOjEIwyLKOV0FVCMV8,5227
650
+ numpy/f2py/f2py2e.py,sha256=s0OedVk80zR7DyJ0mWW9kWYNlddMYHP1gKZBZms4ctQ,25972
651
+ numpy/f2py/src/fortranobject.c,sha256=g4BKDO1_9pCu6hithKXD2oH_Mt-HH1NTnP6leCqJrzc,46017
652
+ numpy/f2py/src/fortranobject.h,sha256=neMKotYWbHvrhW9KXz4QzQ8fzPkiQXLHHjy82vLSeog,5835
653
+ numpy/f2py/tests/test_isoc.py,sha256=RiGC0JHIeLa15eY5uGsZXhJrmb__0cXqQALEO9zeZf4,449
654
+ numpy/f2py/tests/test_return_complex.py,sha256=BZIIqQ1abdiPLgVmu03_q37yCtND0ijxGSMhGz2Wf-o,2397
655
+ numpy/f2py/tests/test_assumed_shape.py,sha256=FeaqtrWyBf5uyArcmI0D2e_f763aSMpgU3QmdDXe-tA,1466
656
+ numpy/f2py/tests/test_return_integer.py,sha256=t--9UsdLF9flLTQv7a0KTSVoBuoDtTnmOG2QIFPINVc,1758
657
+ numpy/f2py/tests/test_crackfortran.py,sha256=y1x3U-jlQWD5rmTXz1I2RlTz7LEfbI6qxCDkR5fzPwY,13441
658
+ numpy/f2py/tests/test_return_character.py,sha256=18HJtiRwQ7a_2mdPUonD5forKWZJEapD-Vi1DsbTjVs,1493
659
+ numpy/f2py/tests/test_module_doc.py,sha256=sjCXWIKrqMD1NQ1DUAzgQqkjS5w9h9gvM_Lj29Rdcrg,863
660
+ numpy/f2py/tests/test_f2py2e.py,sha256=6l26S9EpN9I_0ymtq9q8DPIL9DzkJb3J5aQVS5g-wpk,21570
661
+ numpy/f2py/tests/test_data.py,sha256=HFcmPYbiveKa-swJ8x8XlRR9sM0ESB9FEN-txZnHTok,2876
662
+ numpy/f2py/tests/test_string.py,sha256=5xZOfdReoHnId0950XfmtfduPPfBbtMkzBoXMtygvMk,2962
663
+ numpy/f2py/tests/test_callback.py,sha256=t129L4PrDSCeGdr4S405XuJjeSKlrNLHlosDsEmz1e0,6152
664
+ numpy/f2py/tests/test_symbolic.py,sha256=28quk2kTKfWhKe56n4vINJ8G9weKBfc7HysMlE9J3_g,18341
665
+ numpy/f2py/tests/test_character.py,sha256=ebQB2uI2Tkd8B9wGusEF0UCbCA5zhITnMBf6f-AfB4M,20653
666
+ numpy/f2py/tests/test_semicolon_split.py,sha256=_Mdsi84lES18pPjl9J-QsbGttV4tPFFjZvJvejNcqPc,1635
667
+ numpy/f2py/tests/test_value_attrspec.py,sha256=rWwJBfE2qGzqilZZurJ-7ucNoJDICye6lLetQSLFees,323
668
+ numpy/f2py/tests/test_f2cmap.py,sha256=p-Sylbr3ctdKT3UQV9FzpCuYPH5U7Vyn8weXFAjiI9o,391
669
+ numpy/f2py/tests/test_docs.py,sha256=jqtuHE5ZjxP4D8Of3Fkzz36F8_0qKbeS040_m0ac4v4,1662
670
+ numpy/f2py/tests/test_array_from_pyobj.py,sha256=Txff89VUeEhWqUCRVybIqsqH4YQvpk4Uyjmh_XjyMi0,24049
671
+ numpy/f2py/tests/test_common.py,sha256=SZlrUR1e_CbkUD4O6i99QgUmOctHQNP0MmyhMWpio5E,584
672
+ numpy/f2py/tests/test_abstract_interface.py,sha256=C8-ly0_TqkmpQNZmwPHwo2IV2MBH0jQEjAhpqHrg8Y4,832
673
+ numpy/f2py/tests/test_kind.py,sha256=aOMQSBoD_dw49acKN25_abEvQBLI27DsnWIb9CNpSAE,1671
674
+ numpy/f2py/tests/test_return_logical.py,sha256=XCmp8E8I6BOeNYF59HjSFAdv1hM9WaDvl8UDS10_05o,2017
675
+ numpy/f2py/tests/util.py,sha256=F0fs80ln4tV6THNXfv-DXBqViEg9wu6lTelQQTSzHaI,11136
676
+ numpy/f2py/tests/test_quoted_character.py,sha256=cpjMdrHwimnkoJkXd_W_FSlh43oWytY5VHySW9oskO4,454
677
+ numpy/f2py/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
678
+ numpy/f2py/tests/test_return_real.py,sha256=ATek5AM7dCCPeIvoMOQIt5yFNFzKrFb1Kno8B4M0rn4,3235
679
+ numpy/f2py/tests/test_parameter.py,sha256=ADI7EV_CM4ztICpqHqeq8LI-WdB6cX0ttatdRdjbsUA,3941
680
+ numpy/f2py/tests/test_size.py,sha256=q6YqQvcyqdXJeWbGijTiCbxyEG3EkPcvT8AlAW6RCMo,1164
681
+ numpy/f2py/tests/test_mixed.py,sha256=Ctuw-H7DxhPjSt7wZdJ2xffawIoEBCPWc5F7PSkY4HY,848
682
+ numpy/f2py/tests/test_regression.py,sha256=19GNZxElsPX1HV0p5pXrh4_KWt0whjeZTLDEttA0aHI,2157
683
+ numpy/f2py/tests/test_block_docstring.py,sha256=SEpuq73T9oVtHhRVilFf1xF7nb683d4-Kv7V0kfL4AA,564
684
+ numpy/f2py/tests/test_compile_function.py,sha256=9d_FZ8P2wbIlQ2qPDRrsFqPb4nMH8tiWqYZN-P_shCs,4186
685
+ numpy/f2py/tests/src/regression/inout.f90,sha256=CpHpgMrf0bqA1W3Ozo3vInDz0RP904S7LkpdAH6ODck,277
686
+ numpy/f2py/tests/src/return_real/foo90.f90,sha256=gZuH5lj2lG6gqHlH766KQ3J4-Ero-G4WpOOo2MG3ohU,1194
687
+ numpy/f2py/tests/src/return_real/foo77.f,sha256=ZTrzb6oDrIDPlrVWP3Bmtkbz3ffHaaSQoXkfTGtCuFE,933
688
+ numpy/f2py/tests/src/assumed_shape/precision.f90,sha256=r08JeTVmTTExA-hYZ6HzaxVwBn1GMbPAuuwBhBDtJUk,130
689
+ numpy/f2py/tests/src/assumed_shape/.f2py_f2cmap,sha256=But9r9m4iL7EGq_haMW8IiQ4VivH0TgUozxX4pPvdpE,29
690
+ numpy/f2py/tests/src/assumed_shape/foo_free.f90,sha256=oBwbGSlbr9MkFyhVO2aldjc01dr9GHrMrSiRQek8U64,460
691
+ numpy/f2py/tests/src/assumed_shape/foo_use.f90,sha256=rmT9k4jP9Ru1PLcGqepw9Jc6P9XNXM0axY7o4hi9lUw,269
692
+ numpy/f2py/tests/src/assumed_shape/foo_mod.f90,sha256=rfzw3QdI-eaDSl-hslCgGpd5tHftJOVhXvb21Y9Gf6M,499
693
+ numpy/f2py/tests/src/cli/hi77.f,sha256=ttyI6vAP3qLnDqy82V04XmoqrXNM6uhMvvLri2p0dq0,71
694
+ numpy/f2py/tests/src/cli/hiworld.f90,sha256=QWOLPrTxYQu1yrEtyQMbM0fE9M2RmXe7c185KnD5x3o,51
695
+ numpy/f2py/tests/src/string/fixed_string.f90,sha256=5n6IkuASFKgYICXY9foCVoqndfAY0AQZFEK8L8ARBGM,695
696
+ numpy/f2py/tests/src/string/gh24008.f,sha256=UA8Pr-_yplfOFmc6m4v9ryFQ8W9OulaglulefkFWD68,217
697
+ numpy/f2py/tests/src/string/scalar_string.f90,sha256=ACxV2i6iPDk-a6L_Bs4jryVKYJMEGUTitEIYTjbJes4,176
698
+ numpy/f2py/tests/src/string/string.f,sha256=shr3fLVZaa6SyUJFYIF1OZuhff8v5lCwsVNBU2B-3pk,248
699
+ numpy/f2py/tests/src/string/char.f90,sha256=ihr_BH9lY7eXcQpHHDQhFoKcbu7VMOX5QP2Tlr7xlaM,618
700
+ numpy/f2py/tests/src/callback/gh18335.f90,sha256=NraOyKIXyvv_Y-3xGnmTjtNjW2Znsnlk8AViI8zfovc,506
701
+ numpy/f2py/tests/src/callback/gh17797.f90,sha256=_Nrl0a2HgUbtymGU0twaJ--7rMa1Uco2A3swbWvHoMo,148
702
+ numpy/f2py/tests/src/callback/foo.f,sha256=C1hjfpRCQWiOVVzIHqnsYcnLrqQcixrnHCn8hd9GhVk,1254
703
+ numpy/f2py/tests/src/return_integer/foo90.f90,sha256=bzxbYtofivGRYH35Ang9ScnbNsVERN8-6ub5-eI-LGQ,1531
704
+ numpy/f2py/tests/src/return_integer/foo77.f,sha256=_8k1evlzBwvgZ047ofpdcbwKdF8Bm3eQ7VYl2Y8b5kA,1178
705
+ numpy/f2py/tests/src/mixed/foo_fixed.f90,sha256=pxKuPzxF3Kn5khyFq9ayCsQiolxB3SaNtcWaK5j6Rv4,179
706
+ numpy/f2py/tests/src/mixed/foo_free.f90,sha256=fIQ71wrBc00JUAVUj_r3QF9SdeNniBiMw6Ly7CGgPWU,139
707
+ numpy/f2py/tests/src/mixed/foo.f,sha256=90zmbSHloY1XQYcPb8B5d9bv9mCZx8Z8AMTtgDwJDz8,85
708
+ numpy/f2py/tests/src/value_attrspec/gh21665.f90,sha256=JC0FfVXsnB2lZHb-nGbySnxv_9VHAyD0mKaLDowczFU,190
709
+ numpy/f2py/tests/src/block_docstring/foo.f,sha256=y7lPCPu7_Fhs_Tf2hfdpDQo1bhtvNSKRaZAOpM_l3dg,97
710
+ numpy/f2py/tests/src/abstract_interface/gh18403_mod.f90,sha256=gvQJIzNtvacWE0dhysxn30-iUeI65Hpq7DiE9oRauz8,105
711
+ numpy/f2py/tests/src/abstract_interface/foo.f90,sha256=JFU2w98cB_XNwfrqNtI0yDTmpEdxYO_UEl2pgI_rnt8,658
712
+ numpy/f2py/tests/src/common/block.f,sha256=GQ0Pd-VMX3H3a-__f2SuosSdwNXHpBqoGnQDjf8aG9g,224
713
+ numpy/f2py/tests/src/quoted_character/foo.f,sha256=WjC9D9171fe2f7rkUAZUvik9bkIf9adByfRGzh6V0cM,482
714
+ numpy/f2py/tests/src/crackfortran/operators.f90,sha256=-Fc-qjW1wBr3Dkvdd5dMTrt0hnjnV-1AYo-NFWcwFSo,1184
715
+ numpy/f2py/tests/src/crackfortran/data_with_comments.f,sha256=hoyXw330VHh8duMVmAQZjr1lgLVF4zFCIuEaUIrupv0,175
716
+ numpy/f2py/tests/src/crackfortran/unicode_comment.f90,sha256=aINLh6GlfTwFewxvDoqnMqwuCNb4XAqi5Nj5vXguXYs,98
717
+ numpy/f2py/tests/src/crackfortran/gh23879.f90,sha256=LWDJTYR3t9h1IsrKC8dVXZlBfWX7clLeU006X6Ow8oI,332
718
+ numpy/f2py/tests/src/crackfortran/gh17859.f,sha256=7K5dtOXGuBDAENPNCt-tAGJqTfNKz5OsqVSk16_e7Es,340
719
+ numpy/f2py/tests/src/crackfortran/data_stmts.f90,sha256=19YO7OGj0IksyBlmMLZGRBQLjoE3erfkR4tFvhznvvE,693
720
+ numpy/f2py/tests/src/crackfortran/publicmod.f90,sha256=Pnwyf56Qd6W3FUH-ZMgnXEYkb7gn18ptNTdwmGan0Jo,167
721
+ numpy/f2py/tests/src/crackfortran/accesstype.f90,sha256=-5Din7YlY1TU7tUHD2p-_DSTxGBpDsWYNeT9WOwGhno,208
722
+ numpy/f2py/tests/src/crackfortran/gh22648.pyf,sha256=qZHPRNQljIeYNwbqPLxREnOrSdVV14f3fnaHqB1M7c0,241
723
+ numpy/f2py/tests/src/crackfortran/gh15035.f,sha256=jJly1AzF5L9VxbVQ0vr-sf4LaUo4eQzJguhuemFxnvg,375
724
+ numpy/f2py/tests/src/crackfortran/gh23598Warn.f90,sha256=1v-hMCT_K7prhhamoM20nMU9zILam84Hr-imck_dYYk,205
725
+ numpy/f2py/tests/src/crackfortran/gh2848.f90,sha256=gPNasx98SIf7Z9ibk_DHiGKCvl7ERtsfoGXiFDT7FbM,282
726
+ numpy/f2py/tests/src/crackfortran/gh23598.f90,sha256=41W6Ire-5wjJTTg6oAo7O1WZfd1Ug9vvNtNgHS5MhEU,101
727
+ numpy/f2py/tests/src/crackfortran/data_common.f,sha256=ZSUAh3uhn9CCF-cYqK5TNmosBGPfsuHBIEfudgysun4,193
728
+ numpy/f2py/tests/src/crackfortran/foo_deps.f90,sha256=CaH7mnWTG7FcnJe2vXN_0zDbMadw6NCqK-JJ2HmDjK8,128
729
+ numpy/f2py/tests/src/crackfortran/pubprivmod.f90,sha256=eYpJwBYLKGOxVbKgEqfny1znib-b7uYhxcRXIf7uwXg,165
730
+ numpy/f2py/tests/src/crackfortran/gh23533.f,sha256=w3tr_KcY3s7oSWGDmjfMHv5h0RYVGUpyXquNdNFOJQg,126
731
+ numpy/f2py/tests/src/crackfortran/data_multiplier.f,sha256=jYrJKZWF_59JF9EMOSALUjn0UupWvp1teuGpcL5s1Sc,197
732
+ numpy/f2py/tests/src/crackfortran/privatemod.f90,sha256=7bubZGMIn7iD31wDkjF1TlXCUM7naCIK69M9d0e3y-U,174
733
+ numpy/f2py/tests/src/parameter/constant_real.f90,sha256=quNbDsM1Ts2rN4WtPO67S9Xi_8l2cXabWRO00CPQSSQ,610
734
+ numpy/f2py/tests/src/parameter/constant_non_compound.f90,sha256=IcxESVLKJUZ1k9uYKoSb8Hfm9-O_4rVnlkiUU2diy8Q,609
735
+ numpy/f2py/tests/src/parameter/constant_integer.f90,sha256=nEmMLitKoSAG7gBBEQLWumogN-KS3DBZOAZJWcSDnFw,612
736
+ numpy/f2py/tests/src/parameter/constant_both.f90,sha256=-bBf2eqHb-uFxgo6Q7iAtVUUQzrGFqzhHDNaxwSICfQ,1939
737
+ numpy/f2py/tests/src/parameter/constant_compound.f90,sha256=re7pfzcuaquiOia53UT7qNNrTYu2euGKOF4IhoLmT6g,469
738
+ numpy/f2py/tests/src/size/foo.f90,sha256=IlFAQazwBRr3zyT7v36-tV0-fXtB1d7WFp6S1JVMstg,815
739
+ numpy/f2py/tests/src/module_data/mod.mod,sha256=EkjrU7NTZrOH68yKrz6C_eyJMSFSxGgC2yMQT9Zscek,412
740
+ numpy/f2py/tests/src/module_data/module_data_docstring.f90,sha256=tDZ3fUlazLL8ThJm3VwNGJ75QIlLcW70NnMFv-JA4W0,224
741
+ numpy/f2py/tests/src/f2cmap/isoFortranEnvMap.f90,sha256=iJCD8a8MUTmuPuedbcmxW54Nr4alYuLhksBe1sHS4K0,298
742
+ numpy/f2py/tests/src/f2cmap/.f2py_f2cmap,sha256=iUOtfHd3OuT1Rz2-yiSgt4uPKGvCt5AzQ1iygJt_yjg,82
743
+ numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c,sha256=Ff5wHYV9-OJnZuelfFWcjAibRvDkEIlbTVczTyv6TG8,7299
744
+ numpy/f2py/tests/src/kind/foo.f90,sha256=zIHpw1KdkWbTzbXb73hPbCg4N2Htj3XL8DIwM7seXpo,347
745
+ numpy/f2py/tests/src/return_complex/foo90.f90,sha256=c1BnrtWwL2dkrTr7wvlEqNDg59SeNMo3gyJuGdRwcDw,1238
746
+ numpy/f2py/tests/src/return_complex/foo77.f,sha256=8ECRJkfX82oFvGWKbIrCvKjf5QQQClx4sSEvsbkB6A8,973
747
+ numpy/f2py/tests/src/isocintrin/isoCtests.f90,sha256=JFl_c4GWjOjitoeFcRpCDjc7QxD7HVQFONd7D8oP3zU,475
748
+ numpy/f2py/tests/src/negative_bounds/issue_20853.f90,sha256=fdOPhRi7ipygwYCXcda7p_dlrws5Hd2GlpF9EZ-qnck,157
749
+ numpy/f2py/tests/src/return_logical/foo90.f90,sha256=9KmCe7yJYpi4ftkKOM3BCDnPOdBPTbUNrKxY3p37O14,1531
750
+ numpy/f2py/tests/src/return_logical/foo77.f,sha256=FxiF_X0HkyXHzJM2rLyTubZJu4JB-ObLnVqfZwAQFl8,1188
751
+ numpy/f2py/tests/src/return_character/foo90.f90,sha256=ULcETDEt7gXHRzmsMhPsGG4o3lGrcx-FEFaJsPGFKyA,1248
752
+ numpy/f2py/tests/src/return_character/foo77.f,sha256=WzDNF3d_hUDSSZjtxd3DtE-bSx1ilOMEviGyYHbcFgM,980
753
+ numpy/f2py/_backends/_meson.py,sha256=SOA5CMhsSP1Oy5MKlFf4V_G_qUxjHhHo2tg7A4vnMok,5124
754
+ numpy/f2py/_backends/_backend.py,sha256=GKb9-UaFszT045vUgVukPs1n97iyyjqahrWKxLOKNYo,1187
755
+ numpy/f2py/_backends/_distutils.py,sha256=wuUhDmYpPT4Nq-D7Lv1PvttlbTh5kpL5iZkwMAFXb2I,2382
756
+ numpy/f2py/_backends/__init__.py,sha256=7_bA7c_xDpLc4_8vPfH32-Lxn9fcUTgjQ25srdvwvAM,299
757
+ numpy/f2py/_backends/meson.build.template,sha256=M4QRFGD_ml_BR4kqbO2j7ZowSp7iBulbzK0V8knvyUo,1295
758
+ numpy/compat/py3k.py,sha256=Je74CVk_7qI_qX7pLbYcuQJsxlMq1poGIfRIrH99kZQ,3833
759
+ numpy/compat/setup.py,sha256=36X1kF0C_NVROXfJ7w3SQeBm5AIDBuJbM5qT7cvSDgU,335
760
+ numpy/compat/__init__.py,sha256=iAHrmsZWzouOMSyD9bdSE0APWMlRpqW92MQgF8y6x3E,448
761
+ numpy/compat/tests/test_compat.py,sha256=YqV67pSN8nXPbXaEdjhmyaoVetNyFupVv57OMEgCwKA,579
762
+ numpy/compat/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
763
+ numpy/distutils/system_info.py,sha256=SCk1ku0HnZNwConQBJN8FVidbeKVnrMxUyNWUVx73pY,114022
764
+ numpy/distutils/log.py,sha256=m8caNBwPhIG7YTnD9iq9jjc6_yJOeU9FHuau2CSulds,2879
765
+ numpy/distutils/unixccompiler.py,sha256=fN4-LH6JJp44SLE7JkdG2kKQlK4LC8zuUpVC-RtmJ-U,5426
766
+ numpy/distutils/conv_template.py,sha256=F-4vkkfAjCb-fN79WYrXX3BMHMoiQO-W2u09q12OPuI,9536
767
+ numpy/distutils/msvccompiler.py,sha256=ILookUifVJF9tAtPJoVCqZ673m5od6MVKuAHuA3Rcfk,2647
768
+ numpy/distutils/npy_pkg_config.py,sha256=fIFyWLTqRySO3hn-0i0FNdHeblRN_hDv-wc68-sa3hQ,12972
769
+ numpy/distutils/fujitsuccompiler.py,sha256=JDuUUE-GyPahkNnDZLWNHyAmJ2lJPCnLuIUFfHkjMzA,834
770
+ numpy/distutils/cpuinfo.py,sha256=XuNhsx_-tyrui_AOgn10yfZ9p4YBM68vW2_bGmKj07I,22639
771
+ numpy/distutils/__init__.pyi,sha256=D8LRE6BNOmuBGO-oakJGnjT9UJTk9zSR5rxMfZzlX64,119
772
+ numpy/distutils/_shell_utils.py,sha256=kMLOIoimB7PdFRgoVxCIyCFsIl1pP3d0hkm_s3E9XdA,2613
773
+ numpy/distutils/pathccompiler.py,sha256=KnJEA5H4cXg7SLrMjwWtidD24VSvOdu72d17votiY9E,713
774
+ numpy/distutils/mingw32ccompiler.py,sha256=4G8t_6plw7xqoF0icDaWGNSBgbyDaHQn3GB5l9gikEA,22067
775
+ numpy/distutils/intelccompiler.py,sha256=N_pvWjlLORdlH34cs97oU4LBNr_s9r5ddsmme7XEvs4,4234
776
+ numpy/distutils/extension.py,sha256=YgeB8e2fVc2l_1etuRBv0P8c1NULOz4SaudHgsVBc30,3568
777
+ numpy/distutils/ccompiler_opt.py,sha256=A7s9-Zg6WCVoOeM1gyKTE0NswAvXRXAOEmSLkNchBTQ,100335
778
+ numpy/distutils/armccompiler.py,sha256=8qUaYh8QHOJlz7MNvkuJNyYdCOCivuW0pbmf_2OPZu0,962
779
+ numpy/distutils/misc_util.py,sha256=2MxXE4rex_wSUhpLuwxOFeeor-WxZLjisVvXWycNaq4,89359
780
+ numpy/distutils/from_template.py,sha256=hpoFQortsLZdMSr_fJILzXzrIwFlZoFjsDSo6jNtvWs,7913
781
+ numpy/distutils/line_endings.py,sha256=a8ZZECrPRffsbs0UygeR47_fOUlZppnx-QPssrIXtB0,2032
782
+ numpy/distutils/setup.py,sha256=l9ke_Bws431UdBfysaq7ZeGtZ8dix76oh9Huq5qqbkU,634
783
+ numpy/distutils/msvc9compiler.py,sha256=FCtP7g34AVuMIaqQlH8AV1ZBdIUXbk5G7eBeeTSr1zE,2192
784
+ numpy/distutils/ccompiler.py,sha256=6I-zQBLJCyZUZaYdmK23pmucM8MAn2OsvyzEdghPpW0,28618
785
+ numpy/distutils/__init__.py,sha256=BU1C21439HRo7yH1SsN9me6WCDPpOwRQ37ZpNwDMqCw,2074
786
+ numpy/distutils/core.py,sha256=C-_z7rODE_12olz0dwtlKqwfaSLXEV3kZ1CyDJMsQh8,8200
787
+ numpy/distutils/lib2def.py,sha256=-3rDf9FXsDik3-Qpp-A6N_cYZKTlmVjVi4Jzyo-pSlY,3630
788
+ numpy/distutils/exec_command.py,sha256=0EGasX7tM47Q0k8yJA1q-BvIcjV_1UAC-zDmen-j6Lg,10283
789
+ numpy/distutils/numpy_distribution.py,sha256=10Urolg1aDAG0EHYfcvObzOgqRV0ARh2GhDklEg4vS0,634
790
+ numpy/distutils/checks/cpu_xop.c,sha256=7uabsGeqvmVJQvuSEjs8-Sm8kpmvl6uZ9YHMF5h2opQ,234
791
+ numpy/distutils/checks/cpu_avx512_cnl.c,sha256=f_c2Z0xwAKTJeK3RYMIp1dgXYV8QyeOxUgKkMht4qko,948
792
+ numpy/distutils/checks/cpu_vsx3.c,sha256=omC50tbEZNigsKMFPtE3zGRlIS2VuDTm3vZ9TBZWo4U,250
793
+ numpy/distutils/checks/extra_vsx4_mma.c,sha256=GiQGZ9-6wYTgH42bJgSlXhWcTIrkjh5xv4uymj6rglk,499
794
+ numpy/distutils/checks/cpu_f16c.c,sha256=nzZzpUc8AfTtw-INR3KOxcjx9pyzVUM8OhsrdH2dO_w,868
795
+ numpy/distutils/checks/extra_avx512dq_mask.c,sha256=nMfIvepISGFDexPrMYl5LWtdmt6Uy9TKPzF4BVayw2I,504
796
+ numpy/distutils/checks/cpu_ssse3.c,sha256=X6VWxIXMRpdSCBsHPXvot3yTZ4d5yK9Bi1ScQP3WC-Q,705
797
+ numpy/distutils/checks/cpu_sse2.c,sha256=yUZzdjDtBS-vYlhfP-pEzj3m0UPmgZs-hA99TZAEACU,697
798
+ numpy/distutils/checks/cpu_asimd.c,sha256=nXUsTLrSlhRL-UzDM8zMqn1uqJnR7TRlJi3Ixqw539w,818
799
+ numpy/distutils/checks/cpu_fma4.c,sha256=qKdgTNNFg-n8vSB1Txco60HBLCcOi1aH23gZOX7yKqs,301
800
+ numpy/distutils/checks/cpu_avx512_clx.c,sha256=P-YHjj2XE4SithBkPwDgShOxGWnVSNUXg72h8O3kpbs,842
801
+ numpy/distutils/checks/cpu_vsx.c,sha256=FVmR4iliKjcihzMCwloR1F2JYwSZK9P4f_hvIRLHSDQ,478
802
+ numpy/distutils/checks/cpu_fma3.c,sha256=YN6IDwuZALJHVVmpQ2tj-14HI_PcxH_giV8-XjzlmkU,817
803
+ numpy/distutils/checks/extra_avx512bw_mask.c,sha256=pVPOhcu80yJVnIhOcHHXOlZ2proJ1MUf0XgccqhPoNk,636
804
+ numpy/distutils/checks/cpu_avx2.c,sha256=jlDlea393op0JOiMJgmmPyKmyAXztLcObPOp9F9FaS0,749
805
+ numpy/distutils/checks/cpu_asimddp.c,sha256=E4b9zT1IdSfGR2ACZJiQoR-BqaeDtzFqRNW8lBOXAaY,432
806
+ numpy/distutils/checks/cpu_avx512_knl.c,sha256=Veq4zNRDDqABV1dPyYdpyPzqZnEBrRsPsTZU1ebPi_Y,956
807
+ numpy/distutils/checks/cpu_vsx4.c,sha256=ngezA1KuINqJkLAcMrZJR7bM0IeA25U6I-a5aISGXJo,305
808
+ numpy/distutils/checks/cpu_vsx2.c,sha256=yESs25Rt5ztb5-stuYbu3TbiyJKmllMpMLu01GOAHqE,263
809
+ numpy/distutils/checks/cpu_avx.c,sha256=LuZW8o93VZZi7cYEP30dvKWTm7Mw1TLmCt5UaXDxCJg,779
810
+ numpy/distutils/checks/cpu_sse3.c,sha256=j5XRHumUuccgN9XPZyjWUUqkq8Nu8XCSWmvUhmJTJ08,689
811
+ numpy/distutils/checks/cpu_avx512_spr.c,sha256=i8DpADB8ZhIucKc8lt9JfYbQANRvR67u59oQf5winvg,904
812
+ numpy/distutils/checks/cpu_neon_fp16.c,sha256=E7YOGyYP41u1sqiCHpCGGqjmo7Cs6yUkmJ46K7LZloc,251
813
+ numpy/distutils/checks/cpu_avx512_skx.c,sha256=59VD8ebEJJHLlbY-4dakZV34bmq_lr9mBKz8BAcsdYc,1010
814
+ numpy/distutils/checks/cpu_sse.c,sha256=6MHITtC76UpSR9uh0SiURpnkpPkLzT5tbrcXT4xBFxo,686
815
+ numpy/distutils/checks/cpu_avx512f.c,sha256=d97NRcbJhqpvURnw7zyG0TOuEijKXvU0g4qOTWHbwxY,755
816
+ numpy/distutils/checks/test_flags.c,sha256=uAIbhfAhyGe4nTdK_mZmoCefj9P0TGHNF9AUv_Cdx5A,16
817
+ numpy/distutils/checks/cpu_vx.c,sha256=OpLU6jIfwvGJR4JPVVZLlUfvo7oAZ0YvsjafM2qtPlk,461
818
+ numpy/distutils/checks/cpu_asimdfhm.c,sha256=6tXINVEpmA-lYRSbL6CrBu2ejNFmd9WONFGgg-JFXZE,529
819
+ numpy/distutils/checks/cpu_avx512_icl.c,sha256=isI35-gm7Hqn2Qink5hP1XHWlh52a5vwKhEdW_CRviE,1004
820
+ numpy/distutils/checks/cpu_asimdhp.c,sha256=SfwrEEA_091tmyI4vN3BNLs7ypUnrF_VbTg6gPl-ocs,379
821
+ numpy/distutils/checks/cpu_popcnt.c,sha256=vRcXHVw2j1F9I_07eIZ_xzDX3fd3mqgiQXL1w3pULJk,1049
822
+ numpy/distutils/checks/cpu_avx512_knm.c,sha256=eszPGr3XC9Js7mQUB0gFxlrNjQwfucQFz_UwFyNLjes,1132
823
+ numpy/distutils/checks/extra_avx512f_reduce.c,sha256=_NfbtfSAkm_A67umjR1oEb9yRnBL5EnTA76fvQIuNVk,1595
824
+ numpy/distutils/checks/cpu_sse42.c,sha256=3PXucdI2mII-txO7zFN99TlVveT_QUAETTGvRk-_hYw,692
825
+ numpy/distutils/checks/cpu_avx512cd.c,sha256=Qfh5FJUv9ZWd_P5zxkvYYIkvqsPptgaDuKkeX_F8vyA,759
826
+ numpy/distutils/checks/cpu_vxe2.c,sha256=Hv4wO23kwC2G6lqqercq4NE4K0nrvBxR7RIzr5HTXCc,624
827
+ numpy/distutils/checks/extra_vsx_asm.c,sha256=BngiMVS9nyr22z6zMrOrHLeCloe_5luXhf5T5mYucgI,945
828
+ numpy/distutils/checks/cpu_neon.c,sha256=Y0SjuVLzh3upcbY47igHjmKgjHbXxbvzncwB7acfjxw,600
829
+ numpy/distutils/checks/cpu_neon_vfpv4.c,sha256=qFY1C_fQYz7M_a_8j0KTdn7vaE3NNVmWY2JGArDGM3w,609
830
+ numpy/distutils/checks/cpu_vxe.c,sha256=rYW_nKwXnlB0b8xCrJEr4TmvrEvS-NToxwyqqOHV8Bk,788
831
+ numpy/distutils/checks/cpu_sse41.c,sha256=y_k81P-1b-Hx8OeRVDE9V1O9JakS0zPvlFKJ3VbSmEw,675
832
+ numpy/distutils/command/install_clib.py,sha256=1xv0_lPVu3g16GgICjjlh7T8zQ6PSlevCuq8Bocx5YM,1399
833
+ numpy/distutils/command/install_headers.py,sha256=tVpOGqkmh8AA_tam0K0SeCd4kvZj3UqSOjWKm6Kz4jY,919
834
+ numpy/distutils/command/build.py,sha256=aj1SUGsDUTxs4Tch2ALLcPnuAVhaPjEPIZIobzMajm0,2613
835
+ numpy/distutils/command/autodist.py,sha256=8KWwr5mnjX20UpY4ITRDx-PreApyh9M7B92IwsEtTsQ,3718
836
+ numpy/distutils/command/build_scripts.py,sha256=P2ytmZb3UpwfmbMXkFB2iMQk15tNUCynzMATllmp-Gs,1665
837
+ numpy/distutils/command/build_ext.py,sha256=UcyG8KKyrd5v1s6qDdKEkzwLwmoMlfHA893Lj-OOgl0,32983
838
+ numpy/distutils/command/config_compiler.py,sha256=Cp9RTpW72gg8XC_3-9dCTlLYr352pBfBRZA8YBWvOoY,4369
839
+ numpy/distutils/command/egg_info.py,sha256=i-Zk4sftK5cMQVQ2jqSxTMpVI-gYyXN16-p5TvmjURc,921
840
+ numpy/distutils/command/build_clib.py,sha256=TCuZDpRd8ZPZH6SRwIZcWZC3aoGc18Rll6FYcawS6qY,19317
841
+ numpy/distutils/command/config.py,sha256=SdN-Cxvwx3AD5k-Xx_VyS2WWpVGmflnYGiTIyruj_xM,20670
842
+ numpy/distutils/command/develop.py,sha256=9SbbnFnVbSJVZxTFoV9pwlOcM1D30GnOWm2QonQDvHI,575
843
+ numpy/distutils/command/build_src.py,sha256=sxsnfc8KBsnsSvI-8sKIKNo2KA2uvrrvW0WYZCqyjyk,31178
844
+ numpy/distutils/command/bdist_rpm.py,sha256=-tkZupIJr_jLqeX7xbRhE8-COXHRI0GoRpAKchVte54,709
845
+ numpy/distutils/command/sdist.py,sha256=8Tsju1RwXNbPyQcjv8GRMFveFQqYlbNdSZh2X1OV-VU,733
846
+ numpy/distutils/command/__init__.py,sha256=fW49zUB3syMFsKpf1oRBO0h8tmnTwRP3zUPrsB0R22M,1032
847
+ numpy/distutils/command/build_py.py,sha256=XiLZ2d_tmCE8uG5VAU5OK2zlzQayBfeY4l8FFEltbig,1144
848
+ numpy/distutils/command/install.py,sha256=nkW2fl7OABcE3sUcoNM7iONkF64CBESdVlRjTLg3hVA,3073
849
+ numpy/distutils/command/install_data.py,sha256=Y59EBG61MWP_5C8XJvSCVfzYpMNVNVcH_Z6c0qgr9KA,848
850
+ numpy/distutils/mingw/gfortran_vs2003_hack.c,sha256=cbsN3Lk9Hkwzr9c-yOP2xEBg1_ml1X7nwAMDWxGjzc8,77
851
+ numpy/distutils/tests/test_build_ext.py,sha256=RNrEi-YMTGQG5YDi5GWL8iJRkk_bQHBQKcqp43TdJco,2769
852
+ numpy/distutils/tests/test_fcompiler_gnu.py,sha256=nmfaFCVzbViIOQ2-MjgXt-bN8Uj674hCgiwr5Iol-_U,2136
853
+ numpy/distutils/tests/test_ccompiler_opt_conf.py,sha256=maXytv39amuojbQIieIGIXMV4Cv-s0fsPMZeFEh9XyY,6347
854
+ numpy/distutils/tests/test_fcompiler_nagfor.py,sha256=CKEjik7YVfSJGL4abuctkmlkIUhAhv-x2aUcXiTR9b0,1102
855
+ numpy/distutils/tests/test_fcompiler_intel.py,sha256=mxkfFD2rNfg8nn1pp_413S0uCdYXydPWBcz9ilgGkA0,1058
856
+ numpy/distutils/tests/test_system_info.py,sha256=wMV7bH5oB0luLDR2tunHrLaUxsD_-sIhLnNpj1blQPs,11405
857
+ numpy/distutils/tests/test_fcompiler.py,sha256=mJXezTXDUbduhCwVGAfABHpEARWhnj8hLW9EOU3rn84,1277
858
+ numpy/distutils/tests/test_npy_pkg_config.py,sha256=apGrmViPcXoPCEOgDthJgL13C9N0qQMs392QjZDxJd4,2557
859
+ numpy/distutils/tests/test_misc_util.py,sha256=Qs96vTr8GZSyVCWuamzcNlVMRa15vt0Y-T2yZSUm_QA,3218
860
+ numpy/distutils/tests/test_from_template.py,sha256=SDYoe0XUpAayyEQDq7ZhrvEEz7U9upJDLYzhcdoVifc,1103
861
+ numpy/distutils/tests/test_log.py,sha256=0tSM4q-00CjbMIRb9QOJzI4A7GHUiRGOG1SOOLz8dnM,868
862
+ numpy/distutils/tests/test_shell_utils.py,sha256=UKU_t5oIa_kVMv89Ys9KN6Z_Fy5beqPDUsDAWPmcoR8,2114
863
+ numpy/distutils/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
864
+ numpy/distutils/tests/test_exec_command.py,sha256=BK-hHfIIrkCep-jNmS5_Cwq5oESvsvX3V_0XDAkT1Ok,7395
865
+ numpy/distutils/tests/test_mingw32ccompiler.py,sha256=rMC8-IyBOiuZVfAoklV_KnD9qVeB_hFVvb5dStxfk08,1609
866
+ numpy/distutils/tests/test_ccompiler_opt.py,sha256=N3pN-9gxPY1KvvMEjoXr7kLxTGN8aQOr8qo5gmlrm90,28778
867
+ numpy/distutils/fcompiler/hpux.py,sha256=gloUjWGo7MgJmukorDq7ZxDnnUKXx-C6AQfryQshVM4,1353
868
+ numpy/distutils/fcompiler/absoft.py,sha256=yPUHBNZHOr_gxnte16I_X85o1iL9FI4RLHjG9JOuyYU,5516
869
+ numpy/distutils/fcompiler/mips.py,sha256=LAwT0DY5yqlYh20hNMYR1-OKu8A9GNw-TbUfI8pvglM,1714
870
+ numpy/distutils/fcompiler/gnu.py,sha256=ag8v_pp-fYpDPKJsVmNaFwN621b1MFQAxew0T1KdE_Y,20502
871
+ numpy/distutils/fcompiler/nv.py,sha256=LGBQY417zibQ-fnPis5rNtP_I1Qk9OlhEFOnPvmwXHI,1560
872
+ numpy/distutils/fcompiler/environment.py,sha256=DOD2FtKDk6O9k6U0h9UKWQ-65wU8z1tSPn3gUlRwCso,3080
873
+ numpy/distutils/fcompiler/none.py,sha256=6RX2X-mV1HuhJZnVfQmDmLVhIUWseIT4P5wf3rdLq9Y,758
874
+ numpy/distutils/fcompiler/sun.py,sha256=mfS3RTj9uYT6K9Ikp8RjmsEPIWAtUTzMhX9sGjEyF6I,1577
875
+ numpy/distutils/fcompiler/arm.py,sha256=MCri346qo1bYwjlm32xHRyRl-bAINTlfVIubN6HDz68,2090
876
+ numpy/distutils/fcompiler/fujitsu.py,sha256=yK3wdHoF5qq25UcnIM6FzTXsJGJxdfKa_f__t04Ne7M,1333
877
+ numpy/distutils/fcompiler/intel.py,sha256=XYF0GLVhJWjS8noEx4TJ704Eqt-JGBolRZEOkwgNItE,6570
878
+ numpy/distutils/fcompiler/pathf95.py,sha256=MiHVar6-beUEYVEpqXORIX4f8G29I47D36kreltdfoQ,1061
879
+ numpy/distutils/fcompiler/compaq.py,sha256=sjU2GKHJGuChtRb_MhnouMqvkIOQflmowFE6ErCWZhE,3903
880
+ numpy/distutils/fcompiler/pg.py,sha256=NOB1stzrjvQMZS7bIPTgWTcAFe3cjNveA5-SztUZqD0,3568
881
+ numpy/distutils/fcompiler/vast.py,sha256=Xuxa4sNraUPcQmt45SogAfN0kDHFb6C73uNZNmX3RBE,1667
882
+ numpy/distutils/fcompiler/nag.py,sha256=9pQCMUlwjRVHGKwZxvwd4bW5p-9v7VXcflELEImHg1g,2777
883
+ numpy/distutils/fcompiler/ibm.py,sha256=Ts2PXg2ocrXtX9eguvcHeQ4JB2ktpd5isXtRTpU9F5Y,3534
884
+ numpy/distutils/fcompiler/lahey.py,sha256=U63KMfN8zDAd_jnvMkS2N-dvP4UiSRB9Ces290qLNXw,1327
885
+ numpy/distutils/fcompiler/__init__.py,sha256=DqfaiKGVagOFuL0v3VZxZZkRnWWvly0_lYHuLjaZTBo,40625
886
+ numpy/distutils/fcompiler/g95.py,sha256=FH4uww6re50OUT_BfdoWSLCDUqk8LvmQ2_j5RhF5nLQ,1330
887
+ numpy/distutils/__pycache__/conv_template.cpython-311.pyc,sha256=6j_TLKqQwkQy9MBg7N4jMwZQ28S2dfC0FhyhyBk3vOQ,14202
888
+ numpy/linalg/__init__.pyi,sha256=XBy4ocuypsRVflw_mbSTUhR4N5Roemu6w5SfeVwbkAc,620
889
+ numpy/linalg/_umath_linalg.cpython-311-x86_64-linux-gnu.so,sha256=s0q50ZA8PbldpZuWVapl8s5JQDdyeVCoKi6TjigkfYo,196313
890
+ numpy/linalg/lapack_lite.cpython-311-x86_64-linux-gnu.so,sha256=7Ec6jGxWKMdCrPoAs79grW11ilmlppggG6NBcrtaFB0,29873
891
+ numpy/linalg/linalg.py,sha256=kDVK1GBxbUjlRgxXCoEfkRJm8yrNr1Iu7hMn2rKK8RE,90923
892
+ numpy/linalg/linalg.pyi,sha256=zD9U5BUCB1uQggSxfZaTGX_uB2Hkp75sttGmZbCGgBI,7505
893
+ numpy/linalg/__init__.py,sha256=mpdlEXWtTvpF7In776ONLwp6RIyo4U_GLPT1L1eIJnw,1813
894
+ numpy/linalg/tests/test_deprecations.py,sha256=9p_SRmtxj2zc1doY9Ie3dyy5JzWy-tCQWFoajcAJUmM,640
895
+ numpy/linalg/tests/test_linalg.py,sha256=rgvmK6Or70u8mN04puetL3FgSxZ8fJrOlI5ptTgCU5k,78085
896
+ numpy/linalg/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
897
+ numpy/linalg/tests/test_regression.py,sha256=qbugUmrENybkEaM1GhfA01RXQUy8AkzalbrfzSIgUmM,5434
898
+ numpy-1.26.1.dist-info/METADATA,sha256=KUdEW5WpYZJwUffywdztTXJ17cqOZb9vGlocMd4Mk98,61198
899
+ numpy-1.26.1.dist-info/LICENSE.txt,sha256=nN7Gb1dL5q9Yp4iDIAQhiDSybNe14ou4zMavko94iPI,47856
900
+ numpy-1.26.1.dist-info/entry_points.txt,sha256=zddyYJuUw9Uud7LeLfynXk62_ry0lGihDwCIgugBdZM,144
901
+ numpy-1.26.1.dist-info/WHEEL,sha256=6uXuBuTHKYVHX38njLnDjCYRk1Z5gwaXJtzFqt6LRKw,137
902
+ numpy-1.26.1.dist-info/RECORD,,
.venv/lib/python3.11/site-packages/numpy-1.26.1.dist-info/WHEEL ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ Wheel-Version: 1.0
2
+ Generator: meson
3
+ Root-Is-Purelib: false
4
+ Tag: cp311-cp311-manylinux_2_17_x86_64
5
+ Tag: cp311-cp311-manylinux2014_x86_64
6
+
.venv/lib/python3.11/site-packages/numpy-1.26.1.dist-info/entry_points.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ [array_api]
2
+ numpy = numpy.array_api
3
+
4
+ [pyinstaller40]
5
+ hook-dirs = numpy:_pyinstaller_hooks_dir
6
+
7
+ [console_scripts]
8
+ f2py = numpy.f2py.f2py2e:main
9
+
.venv/lib/python3.11/site-packages/numpy/__config__.py ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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"]
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": "gcc",
35
+ "linker": "ld.bfd",
36
+ "version": "10.2.1",
37
+ "commands": "cc",
38
+ },
39
+ "cython": {
40
+ "name": "cython",
41
+ "linker": "cython",
42
+ "version": "3.0.3",
43
+ "commands": "cython",
44
+ },
45
+ "c++": {
46
+ "name": "gcc",
47
+ "linker": "ld.bfd",
48
+ "version": "10.2.1",
49
+ "commands": "c++",
50
+ },
51
+ },
52
+ "Machine Information": {
53
+ "host": {
54
+ "cpu": "x86_64",
55
+ "family": "x86_64",
56
+ "endian": "little",
57
+ "system": "linux",
58
+ },
59
+ "build": {
60
+ "cpu": "x86_64",
61
+ "family": "x86_64",
62
+ "endian": "little",
63
+ "system": "linux",
64
+ },
65
+ "cross-compiled": bool("False".lower().replace("false", "")),
66
+ },
67
+ "Build Dependencies": {
68
+ "blas": {
69
+ "name": "openblas64",
70
+ "found": bool("True".lower().replace("false", "")),
71
+ "version": "0.3.23.dev",
72
+ "detection method": "pkgconfig",
73
+ "include directory": r"/usr/local/include",
74
+ "lib directory": r"/usr/local/lib",
75
+ "openblas configuration": "USE_64BITINT=1 DYNAMIC_ARCH=1 DYNAMIC_OLDER= NO_CBLAS= NO_LAPACK= NO_LAPACKE= NO_AFFINITY=1 USE_OPENMP= HASWELL MAX_THREADS=2",
76
+ "pc file directory": r"/usr/local/lib/pkgconfig",
77
+ },
78
+ "lapack": {
79
+ "name": "dep140250237405136",
80
+ "found": bool("True".lower().replace("false", "")),
81
+ "version": "1.26.1",
82
+ "detection method": "internal",
83
+ "include directory": r"unknown",
84
+ "lib directory": r"unknown",
85
+ "openblas configuration": "unknown",
86
+ "pc file directory": r"unknown",
87
+ },
88
+ },
89
+ "Python Information": {
90
+ "path": r"/opt/python/cp311-cp311/bin/python",
91
+ "version": "3.11",
92
+ },
93
+ "SIMD Extensions": {
94
+ "baseline": __cpu_baseline__,
95
+ "found": [
96
+ feature for feature in __cpu_dispatch__ if __cpu_features__[feature]
97
+ ],
98
+ "not found": [
99
+ feature for feature in __cpu_dispatch__ if not __cpu_features__[feature]
100
+ ],
101
+ },
102
+ }
103
+ )
104
+
105
+
106
+ def _check_pyyaml():
107
+ import yaml
108
+
109
+ return yaml
110
+
111
+
112
+ def show(mode=DisplayModes.stdout.value):
113
+ """
114
+ Show libraries and system information on which NumPy was built
115
+ and is being used
116
+
117
+ Parameters
118
+ ----------
119
+ mode : {`'stdout'`, `'dicts'`}, optional.
120
+ Indicates how to display the config information.
121
+ `'stdout'` prints to console, `'dicts'` returns a dictionary
122
+ of the configuration.
123
+
124
+ Returns
125
+ -------
126
+ out : {`dict`, `None`}
127
+ If mode is `'dicts'`, a dict is returned, else None
128
+
129
+ See Also
130
+ --------
131
+ get_include : Returns the directory containing NumPy C
132
+ header files.
133
+
134
+ Notes
135
+ -----
136
+ 1. The `'stdout'` mode will give more readable
137
+ output if ``pyyaml`` is installed
138
+
139
+ """
140
+ if mode == DisplayModes.stdout.value:
141
+ try: # Non-standard library, check import
142
+ yaml = _check_pyyaml()
143
+
144
+ print(yaml.dump(CONFIG))
145
+ except ModuleNotFoundError:
146
+ import warnings
147
+ import json
148
+
149
+ warnings.warn("Install `pyyaml` for better output", stacklevel=1)
150
+ print(json.dumps(CONFIG, indent=2))
151
+ elif mode == DisplayModes.dicts.value:
152
+ return CONFIG
153
+ else:
154
+ raise AttributeError(
155
+ f"Invalid `mode`, use one of: {', '.join([e.value for e in DisplayModes])}"
156
+ )
.venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd ADDED
@@ -0,0 +1,1049 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 "Python.h":
24
+ ctypedef Py_ssize_t Py_intptr_t
25
+
26
+ cdef extern from "numpy/arrayobject.h":
27
+ ctypedef Py_intptr_t npy_intp
28
+ ctypedef size_t npy_uintp
29
+
30
+ cdef enum NPY_TYPES:
31
+ NPY_BOOL
32
+ NPY_BYTE
33
+ NPY_UBYTE
34
+ NPY_SHORT
35
+ NPY_USHORT
36
+ NPY_INT
37
+ NPY_UINT
38
+ NPY_LONG
39
+ NPY_ULONG
40
+ NPY_LONGLONG
41
+ NPY_ULONGLONG
42
+ NPY_FLOAT
43
+ NPY_DOUBLE
44
+ NPY_LONGDOUBLE
45
+ NPY_CFLOAT
46
+ NPY_CDOUBLE
47
+ NPY_CLONGDOUBLE
48
+ NPY_OBJECT
49
+ NPY_STRING
50
+ NPY_UNICODE
51
+ NPY_VOID
52
+ NPY_DATETIME
53
+ NPY_TIMEDELTA
54
+ NPY_NTYPES
55
+ NPY_NOTYPE
56
+
57
+ NPY_INT8
58
+ NPY_INT16
59
+ NPY_INT32
60
+ NPY_INT64
61
+ NPY_INT128
62
+ NPY_INT256
63
+ NPY_UINT8
64
+ NPY_UINT16
65
+ NPY_UINT32
66
+ NPY_UINT64
67
+ NPY_UINT128
68
+ NPY_UINT256
69
+ NPY_FLOAT16
70
+ NPY_FLOAT32
71
+ NPY_FLOAT64
72
+ NPY_FLOAT80
73
+ NPY_FLOAT96
74
+ NPY_FLOAT128
75
+ NPY_FLOAT256
76
+ NPY_COMPLEX32
77
+ NPY_COMPLEX64
78
+ NPY_COMPLEX128
79
+ NPY_COMPLEX160
80
+ NPY_COMPLEX192
81
+ NPY_COMPLEX256
82
+ NPY_COMPLEX512
83
+
84
+ NPY_INTP
85
+
86
+ ctypedef enum NPY_ORDER:
87
+ NPY_ANYORDER
88
+ NPY_CORDER
89
+ NPY_FORTRANORDER
90
+ NPY_KEEPORDER
91
+
92
+ ctypedef enum NPY_CASTING:
93
+ NPY_NO_CASTING
94
+ NPY_EQUIV_CASTING
95
+ NPY_SAFE_CASTING
96
+ NPY_SAME_KIND_CASTING
97
+ NPY_UNSAFE_CASTING
98
+
99
+ ctypedef enum NPY_CLIPMODE:
100
+ NPY_CLIP
101
+ NPY_WRAP
102
+ NPY_RAISE
103
+
104
+ ctypedef enum NPY_SCALARKIND:
105
+ NPY_NOSCALAR,
106
+ NPY_BOOL_SCALAR,
107
+ NPY_INTPOS_SCALAR,
108
+ NPY_INTNEG_SCALAR,
109
+ NPY_FLOAT_SCALAR,
110
+ NPY_COMPLEX_SCALAR,
111
+ NPY_OBJECT_SCALAR
112
+
113
+ ctypedef enum NPY_SORTKIND:
114
+ NPY_QUICKSORT
115
+ NPY_HEAPSORT
116
+ NPY_MERGESORT
117
+
118
+ ctypedef enum NPY_SEARCHSIDE:
119
+ NPY_SEARCHLEFT
120
+ NPY_SEARCHRIGHT
121
+
122
+ enum:
123
+ # DEPRECATED since NumPy 1.7 ! Do not use in new code!
124
+ NPY_C_CONTIGUOUS
125
+ NPY_F_CONTIGUOUS
126
+ NPY_CONTIGUOUS
127
+ NPY_FORTRAN
128
+ NPY_OWNDATA
129
+ NPY_FORCECAST
130
+ NPY_ENSURECOPY
131
+ NPY_ENSUREARRAY
132
+ NPY_ELEMENTSTRIDES
133
+ NPY_ALIGNED
134
+ NPY_NOTSWAPPED
135
+ NPY_WRITEABLE
136
+ NPY_ARR_HAS_DESCR
137
+
138
+ NPY_BEHAVED
139
+ NPY_BEHAVED_NS
140
+ NPY_CARRAY
141
+ NPY_CARRAY_RO
142
+ NPY_FARRAY
143
+ NPY_FARRAY_RO
144
+ NPY_DEFAULT
145
+
146
+ NPY_IN_ARRAY
147
+ NPY_OUT_ARRAY
148
+ NPY_INOUT_ARRAY
149
+ NPY_IN_FARRAY
150
+ NPY_OUT_FARRAY
151
+ NPY_INOUT_FARRAY
152
+
153
+ NPY_UPDATE_ALL
154
+
155
+ enum:
156
+ # Added in NumPy 1.7 to replace the deprecated enums above.
157
+ NPY_ARRAY_C_CONTIGUOUS
158
+ NPY_ARRAY_F_CONTIGUOUS
159
+ NPY_ARRAY_OWNDATA
160
+ NPY_ARRAY_FORCECAST
161
+ NPY_ARRAY_ENSURECOPY
162
+ NPY_ARRAY_ENSUREARRAY
163
+ NPY_ARRAY_ELEMENTSTRIDES
164
+ NPY_ARRAY_ALIGNED
165
+ NPY_ARRAY_NOTSWAPPED
166
+ NPY_ARRAY_WRITEABLE
167
+ NPY_ARRAY_WRITEBACKIFCOPY
168
+
169
+ NPY_ARRAY_BEHAVED
170
+ NPY_ARRAY_BEHAVED_NS
171
+ NPY_ARRAY_CARRAY
172
+ NPY_ARRAY_CARRAY_RO
173
+ NPY_ARRAY_FARRAY
174
+ NPY_ARRAY_FARRAY_RO
175
+ NPY_ARRAY_DEFAULT
176
+
177
+ NPY_ARRAY_IN_ARRAY
178
+ NPY_ARRAY_OUT_ARRAY
179
+ NPY_ARRAY_INOUT_ARRAY
180
+ NPY_ARRAY_IN_FARRAY
181
+ NPY_ARRAY_OUT_FARRAY
182
+ NPY_ARRAY_INOUT_FARRAY
183
+
184
+ NPY_ARRAY_UPDATE_ALL
185
+
186
+ cdef enum:
187
+ NPY_MAXDIMS
188
+
189
+ npy_intp NPY_MAX_ELSIZE
190
+
191
+ ctypedef void (*PyArray_VectorUnaryFunc)(void *, void *, npy_intp, void *, void *)
192
+
193
+ ctypedef struct PyArray_ArrayDescr:
194
+ # shape is a tuple, but Cython doesn't support "tuple shape"
195
+ # inside a non-PyObject declaration, so we have to declare it
196
+ # as just a PyObject*.
197
+ PyObject* shape
198
+
199
+ ctypedef struct PyArray_Descr:
200
+ pass
201
+
202
+ ctypedef class numpy.dtype [object PyArray_Descr, check_size ignore]:
203
+ # Use PyDataType_* macros when possible, however there are no macros
204
+ # for accessing some of the fields, so some are defined.
205
+ cdef PyTypeObject* typeobj
206
+ cdef char kind
207
+ cdef char type
208
+ # Numpy sometimes mutates this without warning (e.g. it'll
209
+ # sometimes change "|" to "<" in shared dtype objects on
210
+ # little-endian machines). If this matters to you, use
211
+ # PyArray_IsNativeByteOrder(dtype.byteorder) instead of
212
+ # directly accessing this field.
213
+ cdef char byteorder
214
+ cdef char flags
215
+ cdef int type_num
216
+ cdef int itemsize "elsize"
217
+ cdef int alignment
218
+ cdef object fields
219
+ cdef tuple names
220
+ # Use PyDataType_HASSUBARRAY to test whether this field is
221
+ # valid (the pointer can be NULL). Most users should access
222
+ # this field via the inline helper method PyDataType_SHAPE.
223
+ cdef PyArray_ArrayDescr* subarray
224
+
225
+ ctypedef class numpy.flatiter [object PyArrayIterObject, check_size ignore]:
226
+ # Use through macros
227
+ pass
228
+
229
+ ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
230
+ # Use through macros
231
+ pass
232
+
233
+ ctypedef struct PyArrayObject:
234
+ # For use in situations where ndarray can't replace PyArrayObject*,
235
+ # like PyArrayObject**.
236
+ pass
237
+
238
+ ctypedef class numpy.ndarray [object PyArrayObject, check_size ignore]:
239
+ cdef __cythonbufferdefaults__ = {"mode": "strided"}
240
+
241
+ # NOTE: no field declarations since direct access is deprecated since NumPy 1.7
242
+ # Instead, we use properties that map to the corresponding C-API functions.
243
+
244
+ @property
245
+ cdef inline PyObject* base(self) nogil:
246
+ """Returns a borrowed reference to the object owning the data/memory.
247
+ """
248
+ return PyArray_BASE(self)
249
+
250
+ @property
251
+ cdef inline dtype descr(self):
252
+ """Returns an owned reference to the dtype of the array.
253
+ """
254
+ return <dtype>PyArray_DESCR(self)
255
+
256
+ @property
257
+ cdef inline int ndim(self) nogil:
258
+ """Returns the number of dimensions in the array.
259
+ """
260
+ return PyArray_NDIM(self)
261
+
262
+ @property
263
+ cdef inline npy_intp *shape(self) nogil:
264
+ """Returns a pointer to the dimensions/shape of the array.
265
+ The number of elements matches the number of dimensions of the array (ndim).
266
+ Can return NULL for 0-dimensional arrays.
267
+ """
268
+ return PyArray_DIMS(self)
269
+
270
+ @property
271
+ cdef inline npy_intp *strides(self) nogil:
272
+ """Returns a pointer to the strides of the array.
273
+ The number of elements matches the number of dimensions of the array (ndim).
274
+ """
275
+ return PyArray_STRIDES(self)
276
+
277
+ @property
278
+ cdef inline npy_intp size(self) nogil:
279
+ """Returns the total size (in number of elements) of the array.
280
+ """
281
+ return PyArray_SIZE(self)
282
+
283
+ @property
284
+ cdef inline char* data(self) nogil:
285
+ """The pointer to the data buffer as a char*.
286
+ This is provided for legacy reasons to avoid direct struct field access.
287
+ For new code that needs this access, you probably want to cast the result
288
+ of `PyArray_DATA()` instead, which returns a 'void*'.
289
+ """
290
+ return PyArray_BYTES(self)
291
+
292
+ ctypedef unsigned char npy_bool
293
+
294
+ ctypedef signed char npy_byte
295
+ ctypedef signed short npy_short
296
+ ctypedef signed int npy_int
297
+ ctypedef signed long npy_long
298
+ ctypedef signed long long npy_longlong
299
+
300
+ ctypedef unsigned char npy_ubyte
301
+ ctypedef unsigned short npy_ushort
302
+ ctypedef unsigned int npy_uint
303
+ ctypedef unsigned long npy_ulong
304
+ ctypedef unsigned long long npy_ulonglong
305
+
306
+ ctypedef float npy_float
307
+ ctypedef double npy_double
308
+ ctypedef long double npy_longdouble
309
+
310
+ ctypedef signed char npy_int8
311
+ ctypedef signed short npy_int16
312
+ ctypedef signed int npy_int32
313
+ ctypedef signed long long npy_int64
314
+ ctypedef signed long long npy_int96
315
+ ctypedef signed long long npy_int128
316
+
317
+ ctypedef unsigned char npy_uint8
318
+ ctypedef unsigned short npy_uint16
319
+ ctypedef unsigned int npy_uint32
320
+ ctypedef unsigned long long npy_uint64
321
+ ctypedef unsigned long long npy_uint96
322
+ ctypedef unsigned long long npy_uint128
323
+
324
+ ctypedef float npy_float32
325
+ ctypedef double npy_float64
326
+ ctypedef long double npy_float80
327
+ ctypedef long double npy_float96
328
+ ctypedef long double npy_float128
329
+
330
+ ctypedef struct npy_cfloat:
331
+ float real
332
+ float imag
333
+
334
+ ctypedef struct npy_cdouble:
335
+ double real
336
+ double imag
337
+
338
+ ctypedef struct npy_clongdouble:
339
+ long double real
340
+ long double imag
341
+
342
+ ctypedef struct npy_complex64:
343
+ float real
344
+ float imag
345
+
346
+ ctypedef struct npy_complex128:
347
+ double real
348
+ double imag
349
+
350
+ ctypedef struct npy_complex160:
351
+ long double real
352
+ long double imag
353
+
354
+ ctypedef struct npy_complex192:
355
+ long double real
356
+ long double imag
357
+
358
+ ctypedef struct npy_complex256:
359
+ long double real
360
+ long double imag
361
+
362
+ ctypedef struct PyArray_Dims:
363
+ npy_intp *ptr
364
+ int len
365
+
366
+ int _import_array() except -1
367
+ # A second definition so _import_array isn't marked as used when we use it here.
368
+ # Do not use - subject to change any time.
369
+ int __pyx_import_array "_import_array"() except -1
370
+
371
+ #
372
+ # Macros from ndarrayobject.h
373
+ #
374
+ bint PyArray_CHKFLAGS(ndarray m, int flags) nogil
375
+ bint PyArray_IS_C_CONTIGUOUS(ndarray arr) nogil
376
+ bint PyArray_IS_F_CONTIGUOUS(ndarray arr) nogil
377
+ bint PyArray_ISCONTIGUOUS(ndarray m) nogil
378
+ bint PyArray_ISWRITEABLE(ndarray m) nogil
379
+ bint PyArray_ISALIGNED(ndarray m) nogil
380
+
381
+ int PyArray_NDIM(ndarray) nogil
382
+ bint PyArray_ISONESEGMENT(ndarray) nogil
383
+ bint PyArray_ISFORTRAN(ndarray) nogil
384
+ int PyArray_FORTRANIF(ndarray) nogil
385
+
386
+ void* PyArray_DATA(ndarray) nogil
387
+ char* PyArray_BYTES(ndarray) nogil
388
+
389
+ npy_intp* PyArray_DIMS(ndarray) nogil
390
+ npy_intp* PyArray_STRIDES(ndarray) nogil
391
+ npy_intp PyArray_DIM(ndarray, size_t) nogil
392
+ npy_intp PyArray_STRIDE(ndarray, size_t) nogil
393
+
394
+ PyObject *PyArray_BASE(ndarray) nogil # returns borrowed reference!
395
+ PyArray_Descr *PyArray_DESCR(ndarray) nogil # returns borrowed reference to dtype!
396
+ PyArray_Descr *PyArray_DTYPE(ndarray) nogil # returns borrowed reference to dtype! NP 1.7+ alias for descr.
397
+ int PyArray_FLAGS(ndarray) nogil
398
+ void PyArray_CLEARFLAGS(ndarray, int flags) nogil # Added in NumPy 1.7
399
+ void PyArray_ENABLEFLAGS(ndarray, int flags) nogil # Added in NumPy 1.7
400
+ npy_intp PyArray_ITEMSIZE(ndarray) nogil
401
+ int PyArray_TYPE(ndarray arr) nogil
402
+
403
+ object PyArray_GETITEM(ndarray arr, void *itemptr)
404
+ int PyArray_SETITEM(ndarray arr, void *itemptr, object obj) except -1
405
+
406
+ bint PyTypeNum_ISBOOL(int) nogil
407
+ bint PyTypeNum_ISUNSIGNED(int) nogil
408
+ bint PyTypeNum_ISSIGNED(int) nogil
409
+ bint PyTypeNum_ISINTEGER(int) nogil
410
+ bint PyTypeNum_ISFLOAT(int) nogil
411
+ bint PyTypeNum_ISNUMBER(int) nogil
412
+ bint PyTypeNum_ISSTRING(int) nogil
413
+ bint PyTypeNum_ISCOMPLEX(int) nogil
414
+ bint PyTypeNum_ISPYTHON(int) nogil
415
+ bint PyTypeNum_ISFLEXIBLE(int) nogil
416
+ bint PyTypeNum_ISUSERDEF(int) nogil
417
+ bint PyTypeNum_ISEXTENDED(int) nogil
418
+ bint PyTypeNum_ISOBJECT(int) nogil
419
+
420
+ bint PyDataType_ISBOOL(dtype) nogil
421
+ bint PyDataType_ISUNSIGNED(dtype) nogil
422
+ bint PyDataType_ISSIGNED(dtype) nogil
423
+ bint PyDataType_ISINTEGER(dtype) nogil
424
+ bint PyDataType_ISFLOAT(dtype) nogil
425
+ bint PyDataType_ISNUMBER(dtype) nogil
426
+ bint PyDataType_ISSTRING(dtype) nogil
427
+ bint PyDataType_ISCOMPLEX(dtype) nogil
428
+ bint PyDataType_ISPYTHON(dtype) nogil
429
+ bint PyDataType_ISFLEXIBLE(dtype) nogil
430
+ bint PyDataType_ISUSERDEF(dtype) nogil
431
+ bint PyDataType_ISEXTENDED(dtype) nogil
432
+ bint PyDataType_ISOBJECT(dtype) nogil
433
+ bint PyDataType_HASFIELDS(dtype) nogil
434
+ bint PyDataType_HASSUBARRAY(dtype) nogil
435
+
436
+ bint PyArray_ISBOOL(ndarray) nogil
437
+ bint PyArray_ISUNSIGNED(ndarray) nogil
438
+ bint PyArray_ISSIGNED(ndarray) nogil
439
+ bint PyArray_ISINTEGER(ndarray) nogil
440
+ bint PyArray_ISFLOAT(ndarray) nogil
441
+ bint PyArray_ISNUMBER(ndarray) nogil
442
+ bint PyArray_ISSTRING(ndarray) nogil
443
+ bint PyArray_ISCOMPLEX(ndarray) nogil
444
+ bint PyArray_ISPYTHON(ndarray) nogil
445
+ bint PyArray_ISFLEXIBLE(ndarray) nogil
446
+ bint PyArray_ISUSERDEF(ndarray) nogil
447
+ bint PyArray_ISEXTENDED(ndarray) nogil
448
+ bint PyArray_ISOBJECT(ndarray) nogil
449
+ bint PyArray_HASFIELDS(ndarray) nogil
450
+
451
+ bint PyArray_ISVARIABLE(ndarray) nogil
452
+
453
+ bint PyArray_SAFEALIGNEDCOPY(ndarray) nogil
454
+ bint PyArray_ISNBO(char) nogil # works on ndarray.byteorder
455
+ bint PyArray_IsNativeByteOrder(char) nogil # works on ndarray.byteorder
456
+ bint PyArray_ISNOTSWAPPED(ndarray) nogil
457
+ bint PyArray_ISBYTESWAPPED(ndarray) nogil
458
+
459
+ bint PyArray_FLAGSWAP(ndarray, int) nogil
460
+
461
+ bint PyArray_ISCARRAY(ndarray) nogil
462
+ bint PyArray_ISCARRAY_RO(ndarray) nogil
463
+ bint PyArray_ISFARRAY(ndarray) nogil
464
+ bint PyArray_ISFARRAY_RO(ndarray) nogil
465
+ bint PyArray_ISBEHAVED(ndarray) nogil
466
+ bint PyArray_ISBEHAVED_RO(ndarray) nogil
467
+
468
+
469
+ bint PyDataType_ISNOTSWAPPED(dtype) nogil
470
+ bint PyDataType_ISBYTESWAPPED(dtype) nogil
471
+
472
+ bint PyArray_DescrCheck(object)
473
+
474
+ bint PyArray_Check(object)
475
+ bint PyArray_CheckExact(object)
476
+
477
+ # Cannot be supported due to out arg:
478
+ # bint PyArray_HasArrayInterfaceType(object, dtype, object, object&)
479
+ # bint PyArray_HasArrayInterface(op, out)
480
+
481
+
482
+ bint PyArray_IsZeroDim(object)
483
+ # Cannot be supported due to ## ## in macro:
484
+ # bint PyArray_IsScalar(object, verbatim work)
485
+ bint PyArray_CheckScalar(object)
486
+ bint PyArray_IsPythonNumber(object)
487
+ bint PyArray_IsPythonScalar(object)
488
+ bint PyArray_IsAnyScalar(object)
489
+ bint PyArray_CheckAnyScalar(object)
490
+
491
+ ndarray PyArray_GETCONTIGUOUS(ndarray)
492
+ bint PyArray_SAMESHAPE(ndarray, ndarray) nogil
493
+ npy_intp PyArray_SIZE(ndarray) nogil
494
+ npy_intp PyArray_NBYTES(ndarray) nogil
495
+
496
+ object PyArray_FROM_O(object)
497
+ object PyArray_FROM_OF(object m, int flags)
498
+ object PyArray_FROM_OT(object m, int type)
499
+ object PyArray_FROM_OTF(object m, int type, int flags)
500
+ object PyArray_FROMANY(object m, int type, int min, int max, int flags)
501
+ object PyArray_ZEROS(int nd, npy_intp* dims, int type, int fortran)
502
+ object PyArray_EMPTY(int nd, npy_intp* dims, int type, int fortran)
503
+ void PyArray_FILLWBYTE(object, int val)
504
+ npy_intp PyArray_REFCOUNT(object)
505
+ object PyArray_ContiguousFromAny(op, int, int min_depth, int max_depth)
506
+ unsigned char PyArray_EquivArrTypes(ndarray a1, ndarray a2)
507
+ bint PyArray_EquivByteorders(int b1, int b2) nogil
508
+ object PyArray_SimpleNew(int nd, npy_intp* dims, int typenum)
509
+ object PyArray_SimpleNewFromData(int nd, npy_intp* dims, int typenum, void* data)
510
+ #object PyArray_SimpleNewFromDescr(int nd, npy_intp* dims, dtype descr)
511
+ object PyArray_ToScalar(void* data, ndarray arr)
512
+
513
+ void* PyArray_GETPTR1(ndarray m, npy_intp i) nogil
514
+ void* PyArray_GETPTR2(ndarray m, npy_intp i, npy_intp j) nogil
515
+ void* PyArray_GETPTR3(ndarray m, npy_intp i, npy_intp j, npy_intp k) nogil
516
+ void* PyArray_GETPTR4(ndarray m, npy_intp i, npy_intp j, npy_intp k, npy_intp l) nogil
517
+
518
+ # Cannot be supported due to out arg
519
+ # void PyArray_DESCR_REPLACE(descr)
520
+
521
+
522
+ object PyArray_Copy(ndarray)
523
+ object PyArray_FromObject(object op, int type, int min_depth, int max_depth)
524
+ object PyArray_ContiguousFromObject(object op, int type, int min_depth, int max_depth)
525
+ object PyArray_CopyFromObject(object op, int type, int min_depth, int max_depth)
526
+
527
+ object PyArray_Cast(ndarray mp, int type_num)
528
+ object PyArray_Take(ndarray ap, object items, int axis)
529
+ object PyArray_Put(ndarray ap, object items, object values)
530
+
531
+ void PyArray_ITER_RESET(flatiter it) nogil
532
+ void PyArray_ITER_NEXT(flatiter it) nogil
533
+ void PyArray_ITER_GOTO(flatiter it, npy_intp* destination) nogil
534
+ void PyArray_ITER_GOTO1D(flatiter it, npy_intp ind) nogil
535
+ void* PyArray_ITER_DATA(flatiter it) nogil
536
+ bint PyArray_ITER_NOTDONE(flatiter it) nogil
537
+
538
+ void PyArray_MultiIter_RESET(broadcast multi) nogil
539
+ void PyArray_MultiIter_NEXT(broadcast multi) nogil
540
+ void PyArray_MultiIter_GOTO(broadcast multi, npy_intp dest) nogil
541
+ void PyArray_MultiIter_GOTO1D(broadcast multi, npy_intp ind) nogil
542
+ void* PyArray_MultiIter_DATA(broadcast multi, npy_intp i) nogil
543
+ void PyArray_MultiIter_NEXTi(broadcast multi, npy_intp i) nogil
544
+ bint PyArray_MultiIter_NOTDONE(broadcast multi) nogil
545
+
546
+ # Functions from __multiarray_api.h
547
+
548
+ # Functions taking dtype and returning object/ndarray are disabled
549
+ # for now as they steal dtype references. I'm conservative and disable
550
+ # more than is probably needed until it can be checked further.
551
+ int PyArray_SetNumericOps (object) except -1
552
+ object PyArray_GetNumericOps ()
553
+ int PyArray_INCREF (ndarray) except * # uses PyArray_Item_INCREF...
554
+ int PyArray_XDECREF (ndarray) except * # uses PyArray_Item_DECREF...
555
+ void PyArray_SetStringFunction (object, int)
556
+ dtype PyArray_DescrFromType (int)
557
+ object PyArray_TypeObjectFromType (int)
558
+ char * PyArray_Zero (ndarray)
559
+ char * PyArray_One (ndarray)
560
+ #object PyArray_CastToType (ndarray, dtype, int)
561
+ int PyArray_CastTo (ndarray, ndarray) except -1
562
+ int PyArray_CastAnyTo (ndarray, ndarray) except -1
563
+ int PyArray_CanCastSafely (int, int) # writes errors
564
+ npy_bool PyArray_CanCastTo (dtype, dtype) # writes errors
565
+ int PyArray_ObjectType (object, int) except 0
566
+ dtype PyArray_DescrFromObject (object, dtype)
567
+ #ndarray* PyArray_ConvertToCommonType (object, int *)
568
+ dtype PyArray_DescrFromScalar (object)
569
+ dtype PyArray_DescrFromTypeObject (object)
570
+ npy_intp PyArray_Size (object)
571
+ #object PyArray_Scalar (void *, dtype, object)
572
+ #object PyArray_FromScalar (object, dtype)
573
+ void PyArray_ScalarAsCtype (object, void *)
574
+ #int PyArray_CastScalarToCtype (object, void *, dtype)
575
+ #int PyArray_CastScalarDirect (object, dtype, void *, int)
576
+ object PyArray_ScalarFromObject (object)
577
+ #PyArray_VectorUnaryFunc * PyArray_GetCastFunc (dtype, int)
578
+ object PyArray_FromDims (int, int *, int)
579
+ #object PyArray_FromDimsAndDataAndDescr (int, int *, dtype, char *)
580
+ #object PyArray_FromAny (object, dtype, int, int, int, object)
581
+ object PyArray_EnsureArray (object)
582
+ object PyArray_EnsureAnyArray (object)
583
+ #object PyArray_FromFile (stdio.FILE *, dtype, npy_intp, char *)
584
+ #object PyArray_FromString (char *, npy_intp, dtype, npy_intp, char *)
585
+ #object PyArray_FromBuffer (object, dtype, npy_intp, npy_intp)
586
+ #object PyArray_FromIter (object, dtype, npy_intp)
587
+ object PyArray_Return (ndarray)
588
+ #object PyArray_GetField (ndarray, dtype, int)
589
+ #int PyArray_SetField (ndarray, dtype, int, object) except -1
590
+ object PyArray_Byteswap (ndarray, npy_bool)
591
+ object PyArray_Resize (ndarray, PyArray_Dims *, int, NPY_ORDER)
592
+ int PyArray_MoveInto (ndarray, ndarray) except -1
593
+ int PyArray_CopyInto (ndarray, ndarray) except -1
594
+ int PyArray_CopyAnyInto (ndarray, ndarray) except -1
595
+ int PyArray_CopyObject (ndarray, object) except -1
596
+ object PyArray_NewCopy (ndarray, NPY_ORDER)
597
+ object PyArray_ToList (ndarray)
598
+ object PyArray_ToString (ndarray, NPY_ORDER)
599
+ int PyArray_ToFile (ndarray, stdio.FILE *, char *, char *) except -1
600
+ int PyArray_Dump (object, object, int) except -1
601
+ object PyArray_Dumps (object, int)
602
+ int PyArray_ValidType (int) # Cannot error
603
+ void PyArray_UpdateFlags (ndarray, int)
604
+ object PyArray_New (type, int, npy_intp *, int, npy_intp *, void *, int, int, object)
605
+ #object PyArray_NewFromDescr (type, dtype, int, npy_intp *, npy_intp *, void *, int, object)
606
+ #dtype PyArray_DescrNew (dtype)
607
+ dtype PyArray_DescrNewFromType (int)
608
+ double PyArray_GetPriority (object, double) # clears errors as of 1.25
609
+ object PyArray_IterNew (object)
610
+ object PyArray_MultiIterNew (int, ...)
611
+
612
+ int PyArray_PyIntAsInt (object) except? -1
613
+ npy_intp PyArray_PyIntAsIntp (object)
614
+ int PyArray_Broadcast (broadcast) except -1
615
+ void PyArray_FillObjectArray (ndarray, object) except *
616
+ int PyArray_FillWithScalar (ndarray, object) except -1
617
+ npy_bool PyArray_CheckStrides (int, int, npy_intp, npy_intp, npy_intp *, npy_intp *)
618
+ dtype PyArray_DescrNewByteorder (dtype, char)
619
+ object PyArray_IterAllButAxis (object, int *)
620
+ #object PyArray_CheckFromAny (object, dtype, int, int, int, object)
621
+ #object PyArray_FromArray (ndarray, dtype, int)
622
+ object PyArray_FromInterface (object)
623
+ object PyArray_FromStructInterface (object)
624
+ #object PyArray_FromArrayAttr (object, dtype, object)
625
+ #NPY_SCALARKIND PyArray_ScalarKind (int, ndarray*)
626
+ int PyArray_CanCoerceScalar (int, int, NPY_SCALARKIND)
627
+ object PyArray_NewFlagsObject (object)
628
+ npy_bool PyArray_CanCastScalar (type, type)
629
+ #int PyArray_CompareUCS4 (npy_ucs4 *, npy_ucs4 *, register size_t)
630
+ int PyArray_RemoveSmallest (broadcast) except -1
631
+ int PyArray_ElementStrides (object)
632
+ void PyArray_Item_INCREF (char *, dtype) except *
633
+ void PyArray_Item_XDECREF (char *, dtype) except *
634
+ object PyArray_FieldNames (object)
635
+ object PyArray_Transpose (ndarray, PyArray_Dims *)
636
+ object PyArray_TakeFrom (ndarray, object, int, ndarray, NPY_CLIPMODE)
637
+ object PyArray_PutTo (ndarray, object, object, NPY_CLIPMODE)
638
+ object PyArray_PutMask (ndarray, object, object)
639
+ object PyArray_Repeat (ndarray, object, int)
640
+ object PyArray_Choose (ndarray, object, ndarray, NPY_CLIPMODE)
641
+ int PyArray_Sort (ndarray, int, NPY_SORTKIND) except -1
642
+ object PyArray_ArgSort (ndarray, int, NPY_SORTKIND)
643
+ object PyArray_SearchSorted (ndarray, object, NPY_SEARCHSIDE, PyObject *)
644
+ object PyArray_ArgMax (ndarray, int, ndarray)
645
+ object PyArray_ArgMin (ndarray, int, ndarray)
646
+ object PyArray_Reshape (ndarray, object)
647
+ object PyArray_Newshape (ndarray, PyArray_Dims *, NPY_ORDER)
648
+ object PyArray_Squeeze (ndarray)
649
+ #object PyArray_View (ndarray, dtype, type)
650
+ object PyArray_SwapAxes (ndarray, int, int)
651
+ object PyArray_Max (ndarray, int, ndarray)
652
+ object PyArray_Min (ndarray, int, ndarray)
653
+ object PyArray_Ptp (ndarray, int, ndarray)
654
+ object PyArray_Mean (ndarray, int, int, ndarray)
655
+ object PyArray_Trace (ndarray, int, int, int, int, ndarray)
656
+ object PyArray_Diagonal (ndarray, int, int, int)
657
+ object PyArray_Clip (ndarray, object, object, ndarray)
658
+ object PyArray_Conjugate (ndarray, ndarray)
659
+ object PyArray_Nonzero (ndarray)
660
+ object PyArray_Std (ndarray, int, int, ndarray, int)
661
+ object PyArray_Sum (ndarray, int, int, ndarray)
662
+ object PyArray_CumSum (ndarray, int, int, ndarray)
663
+ object PyArray_Prod (ndarray, int, int, ndarray)
664
+ object PyArray_CumProd (ndarray, int, int, ndarray)
665
+ object PyArray_All (ndarray, int, ndarray)
666
+ object PyArray_Any (ndarray, int, ndarray)
667
+ object PyArray_Compress (ndarray, object, int, ndarray)
668
+ object PyArray_Flatten (ndarray, NPY_ORDER)
669
+ object PyArray_Ravel (ndarray, NPY_ORDER)
670
+ npy_intp PyArray_MultiplyList (npy_intp *, int)
671
+ int PyArray_MultiplyIntList (int *, int)
672
+ void * PyArray_GetPtr (ndarray, npy_intp*)
673
+ int PyArray_CompareLists (npy_intp *, npy_intp *, int)
674
+ #int PyArray_AsCArray (object*, void *, npy_intp *, int, dtype)
675
+ #int PyArray_As1D (object*, char **, int *, int)
676
+ #int PyArray_As2D (object*, char ***, int *, int *, int)
677
+ int PyArray_Free (object, void *)
678
+ #int PyArray_Converter (object, object*)
679
+ int PyArray_IntpFromSequence (object, npy_intp *, int) except -1
680
+ object PyArray_Concatenate (object, int)
681
+ object PyArray_InnerProduct (object, object)
682
+ object PyArray_MatrixProduct (object, object)
683
+ object PyArray_CopyAndTranspose (object)
684
+ object PyArray_Correlate (object, object, int)
685
+ int PyArray_TypestrConvert (int, int)
686
+ #int PyArray_DescrConverter (object, dtype*) except 0
687
+ #int PyArray_DescrConverter2 (object, dtype*) except 0
688
+ int PyArray_IntpConverter (object, PyArray_Dims *) except 0
689
+ #int PyArray_BufferConverter (object, chunk) except 0
690
+ int PyArray_AxisConverter (object, int *) except 0
691
+ int PyArray_BoolConverter (object, npy_bool *) except 0
692
+ int PyArray_ByteorderConverter (object, char *) except 0
693
+ int PyArray_OrderConverter (object, NPY_ORDER *) except 0
694
+ unsigned char PyArray_EquivTypes (dtype, dtype) # clears errors
695
+ #object PyArray_Zeros (int, npy_intp *, dtype, int)
696
+ #object PyArray_Empty (int, npy_intp *, dtype, int)
697
+ object PyArray_Where (object, object, object)
698
+ object PyArray_Arange (double, double, double, int)
699
+ #object PyArray_ArangeObj (object, object, object, dtype)
700
+ int PyArray_SortkindConverter (object, NPY_SORTKIND *) except 0
701
+ object PyArray_LexSort (object, int)
702
+ object PyArray_Round (ndarray, int, ndarray)
703
+ unsigned char PyArray_EquivTypenums (int, int)
704
+ int PyArray_RegisterDataType (dtype) except -1
705
+ int PyArray_RegisterCastFunc (dtype, int, PyArray_VectorUnaryFunc *) except -1
706
+ int PyArray_RegisterCanCast (dtype, int, NPY_SCALARKIND) except -1
707
+ #void PyArray_InitArrFuncs (PyArray_ArrFuncs *)
708
+ object PyArray_IntTupleFromIntp (int, npy_intp *)
709
+ int PyArray_TypeNumFromName (char *)
710
+ int PyArray_ClipmodeConverter (object, NPY_CLIPMODE *) except 0
711
+ #int PyArray_OutputConverter (object, ndarray*) except 0
712
+ object PyArray_BroadcastToShape (object, npy_intp *, int)
713
+ void _PyArray_SigintHandler (int)
714
+ void* _PyArray_GetSigintBuf ()
715
+ #int PyArray_DescrAlignConverter (object, dtype*) except 0
716
+ #int PyArray_DescrAlignConverter2 (object, dtype*) except 0
717
+ int PyArray_SearchsideConverter (object, void *) except 0
718
+ object PyArray_CheckAxis (ndarray, int *, int)
719
+ npy_intp PyArray_OverflowMultiplyList (npy_intp *, int)
720
+ int PyArray_CompareString (char *, char *, size_t)
721
+ int PyArray_SetBaseObject(ndarray, base) except -1 # NOTE: steals a reference to base! Use "set_array_base()" instead.
722
+
723
+
724
+ # Typedefs that matches the runtime dtype objects in
725
+ # the numpy module.
726
+
727
+ # The ones that are commented out needs an IFDEF function
728
+ # in Cython to enable them only on the right systems.
729
+
730
+ ctypedef npy_int8 int8_t
731
+ ctypedef npy_int16 int16_t
732
+ ctypedef npy_int32 int32_t
733
+ ctypedef npy_int64 int64_t
734
+ #ctypedef npy_int96 int96_t
735
+ #ctypedef npy_int128 int128_t
736
+
737
+ ctypedef npy_uint8 uint8_t
738
+ ctypedef npy_uint16 uint16_t
739
+ ctypedef npy_uint32 uint32_t
740
+ ctypedef npy_uint64 uint64_t
741
+ #ctypedef npy_uint96 uint96_t
742
+ #ctypedef npy_uint128 uint128_t
743
+
744
+ ctypedef npy_float32 float32_t
745
+ ctypedef npy_float64 float64_t
746
+ #ctypedef npy_float80 float80_t
747
+ #ctypedef npy_float128 float128_t
748
+
749
+ ctypedef float complex complex64_t
750
+ ctypedef double complex complex128_t
751
+
752
+ # The int types are mapped a bit surprising --
753
+ # numpy.int corresponds to 'l' and numpy.long to 'q'
754
+ ctypedef npy_long int_t
755
+ ctypedef npy_longlong longlong_t
756
+
757
+ ctypedef npy_ulong uint_t
758
+ ctypedef npy_ulonglong ulonglong_t
759
+
760
+ ctypedef npy_intp intp_t
761
+ ctypedef npy_uintp uintp_t
762
+
763
+ ctypedef npy_double float_t
764
+ ctypedef npy_double double_t
765
+ ctypedef npy_longdouble longdouble_t
766
+
767
+ ctypedef npy_cfloat cfloat_t
768
+ ctypedef npy_cdouble cdouble_t
769
+ ctypedef npy_clongdouble clongdouble_t
770
+
771
+ ctypedef npy_cdouble complex_t
772
+
773
+ cdef inline object PyArray_MultiIterNew1(a):
774
+ return PyArray_MultiIterNew(1, <void*>a)
775
+
776
+ cdef inline object PyArray_MultiIterNew2(a, b):
777
+ return PyArray_MultiIterNew(2, <void*>a, <void*>b)
778
+
779
+ cdef inline object PyArray_MultiIterNew3(a, b, c):
780
+ return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
781
+
782
+ cdef inline object PyArray_MultiIterNew4(a, b, c, d):
783
+ return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
784
+
785
+ cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
786
+ return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
787
+
788
+ cdef inline tuple PyDataType_SHAPE(dtype d):
789
+ if PyDataType_HASSUBARRAY(d):
790
+ return <tuple>d.subarray.shape
791
+ else:
792
+ return ()
793
+
794
+
795
+ cdef extern from "numpy/ndarrayobject.h":
796
+ PyTypeObject PyTimedeltaArrType_Type
797
+ PyTypeObject PyDatetimeArrType_Type
798
+ ctypedef int64_t npy_timedelta
799
+ ctypedef int64_t npy_datetime
800
+
801
+ cdef extern from "numpy/ndarraytypes.h":
802
+ ctypedef struct PyArray_DatetimeMetaData:
803
+ NPY_DATETIMEUNIT base
804
+ int64_t num
805
+
806
+ cdef extern from "numpy/arrayscalars.h":
807
+
808
+ # abstract types
809
+ ctypedef class numpy.generic [object PyObject]:
810
+ pass
811
+ ctypedef class numpy.number [object PyObject]:
812
+ pass
813
+ ctypedef class numpy.integer [object PyObject]:
814
+ pass
815
+ ctypedef class numpy.signedinteger [object PyObject]:
816
+ pass
817
+ ctypedef class numpy.unsignedinteger [object PyObject]:
818
+ pass
819
+ ctypedef class numpy.inexact [object PyObject]:
820
+ pass
821
+ ctypedef class numpy.floating [object PyObject]:
822
+ pass
823
+ ctypedef class numpy.complexfloating [object PyObject]:
824
+ pass
825
+ ctypedef class numpy.flexible [object PyObject]:
826
+ pass
827
+ ctypedef class numpy.character [object PyObject]:
828
+ pass
829
+
830
+ ctypedef struct PyDatetimeScalarObject:
831
+ # PyObject_HEAD
832
+ npy_datetime obval
833
+ PyArray_DatetimeMetaData obmeta
834
+
835
+ ctypedef struct PyTimedeltaScalarObject:
836
+ # PyObject_HEAD
837
+ npy_timedelta obval
838
+ PyArray_DatetimeMetaData obmeta
839
+
840
+ ctypedef enum NPY_DATETIMEUNIT:
841
+ NPY_FR_Y
842
+ NPY_FR_M
843
+ NPY_FR_W
844
+ NPY_FR_D
845
+ NPY_FR_B
846
+ NPY_FR_h
847
+ NPY_FR_m
848
+ NPY_FR_s
849
+ NPY_FR_ms
850
+ NPY_FR_us
851
+ NPY_FR_ns
852
+ NPY_FR_ps
853
+ NPY_FR_fs
854
+ NPY_FR_as
855
+
856
+
857
+ #
858
+ # ufunc API
859
+ #
860
+
861
+ cdef extern from "numpy/ufuncobject.h":
862
+
863
+ ctypedef void (*PyUFuncGenericFunction) (char **, npy_intp *, npy_intp *, void *)
864
+
865
+ ctypedef class numpy.ufunc [object PyUFuncObject, check_size ignore]:
866
+ cdef:
867
+ int nin, nout, nargs
868
+ int identity
869
+ PyUFuncGenericFunction *functions
870
+ void **data
871
+ int ntypes
872
+ int check_return
873
+ char *name
874
+ char *types
875
+ char *doc
876
+ void *ptr
877
+ PyObject *obj
878
+ PyObject *userloops
879
+
880
+ cdef enum:
881
+ PyUFunc_Zero
882
+ PyUFunc_One
883
+ PyUFunc_None
884
+ UFUNC_ERR_IGNORE
885
+ UFUNC_ERR_WARN
886
+ UFUNC_ERR_RAISE
887
+ UFUNC_ERR_CALL
888
+ UFUNC_ERR_PRINT
889
+ UFUNC_ERR_LOG
890
+ UFUNC_MASK_DIVIDEBYZERO
891
+ UFUNC_MASK_OVERFLOW
892
+ UFUNC_MASK_UNDERFLOW
893
+ UFUNC_MASK_INVALID
894
+ UFUNC_SHIFT_DIVIDEBYZERO
895
+ UFUNC_SHIFT_OVERFLOW
896
+ UFUNC_SHIFT_UNDERFLOW
897
+ UFUNC_SHIFT_INVALID
898
+ UFUNC_FPE_DIVIDEBYZERO
899
+ UFUNC_FPE_OVERFLOW
900
+ UFUNC_FPE_UNDERFLOW
901
+ UFUNC_FPE_INVALID
902
+ UFUNC_ERR_DEFAULT
903
+ UFUNC_ERR_DEFAULT2
904
+
905
+ object PyUFunc_FromFuncAndData(PyUFuncGenericFunction *,
906
+ void **, char *, int, int, int, int, char *, char *, int)
907
+ int PyUFunc_RegisterLoopForType(ufunc, int,
908
+ PyUFuncGenericFunction, int *, void *) except -1
909
+ void PyUFunc_f_f_As_d_d \
910
+ (char **, npy_intp *, npy_intp *, void *)
911
+ void PyUFunc_d_d \
912
+ (char **, npy_intp *, npy_intp *, void *)
913
+ void PyUFunc_f_f \
914
+ (char **, npy_intp *, npy_intp *, void *)
915
+ void PyUFunc_g_g \
916
+ (char **, npy_intp *, npy_intp *, void *)
917
+ void PyUFunc_F_F_As_D_D \
918
+ (char **, npy_intp *, npy_intp *, void *)
919
+ void PyUFunc_F_F \
920
+ (char **, npy_intp *, npy_intp *, void *)
921
+ void PyUFunc_D_D \
922
+ (char **, npy_intp *, npy_intp *, void *)
923
+ void PyUFunc_G_G \
924
+ (char **, npy_intp *, npy_intp *, void *)
925
+ void PyUFunc_O_O \
926
+ (char **, npy_intp *, npy_intp *, void *)
927
+ void PyUFunc_ff_f_As_dd_d \
928
+ (char **, npy_intp *, npy_intp *, void *)
929
+ void PyUFunc_ff_f \
930
+ (char **, npy_intp *, npy_intp *, void *)
931
+ void PyUFunc_dd_d \
932
+ (char **, npy_intp *, npy_intp *, void *)
933
+ void PyUFunc_gg_g \
934
+ (char **, npy_intp *, npy_intp *, void *)
935
+ void PyUFunc_FF_F_As_DD_D \
936
+ (char **, npy_intp *, npy_intp *, void *)
937
+ void PyUFunc_DD_D \
938
+ (char **, npy_intp *, npy_intp *, void *)
939
+ void PyUFunc_FF_F \
940
+ (char **, npy_intp *, npy_intp *, void *)
941
+ void PyUFunc_GG_G \
942
+ (char **, npy_intp *, npy_intp *, void *)
943
+ void PyUFunc_OO_O \
944
+ (char **, npy_intp *, npy_intp *, void *)
945
+ void PyUFunc_O_O_method \
946
+ (char **, npy_intp *, npy_intp *, void *)
947
+ void PyUFunc_OO_O_method \
948
+ (char **, npy_intp *, npy_intp *, void *)
949
+ void PyUFunc_On_Om \
950
+ (char **, npy_intp *, npy_intp *, void *)
951
+ int PyUFunc_GetPyValues \
952
+ (char *, int *, int *, PyObject **)
953
+ int PyUFunc_checkfperr \
954
+ (int, PyObject *, int *)
955
+ void PyUFunc_clearfperr()
956
+ int PyUFunc_getfperr()
957
+ int PyUFunc_handlefperr \
958
+ (int, PyObject *, int, int *) except -1
959
+ int PyUFunc_ReplaceLoopBySignature \
960
+ (ufunc, PyUFuncGenericFunction, int *, PyUFuncGenericFunction *)
961
+ object PyUFunc_FromFuncAndDataAndSignature \
962
+ (PyUFuncGenericFunction *, void **, char *, int, int, int,
963
+ int, char *, char *, int, char *)
964
+
965
+ int _import_umath() except -1
966
+
967
+ cdef inline void set_array_base(ndarray arr, object base):
968
+ Py_INCREF(base) # important to do this before stealing the reference below!
969
+ PyArray_SetBaseObject(arr, base)
970
+
971
+ cdef inline object get_array_base(ndarray arr):
972
+ base = PyArray_BASE(arr)
973
+ if base is NULL:
974
+ return None
975
+ return <object>base
976
+
977
+ # Versions of the import_* functions which are more suitable for
978
+ # Cython code.
979
+ cdef inline int import_array() except -1:
980
+ try:
981
+ __pyx_import_array()
982
+ except Exception:
983
+ raise ImportError("numpy.core.multiarray failed to import")
984
+
985
+ cdef inline int import_umath() except -1:
986
+ try:
987
+ _import_umath()
988
+ except Exception:
989
+ raise ImportError("numpy.core.umath failed to import")
990
+
991
+ cdef inline int import_ufunc() except -1:
992
+ try:
993
+ _import_umath()
994
+ except Exception:
995
+ raise ImportError("numpy.core.umath failed to import")
996
+
997
+
998
+ cdef inline bint is_timedelta64_object(object obj):
999
+ """
1000
+ Cython equivalent of `isinstance(obj, np.timedelta64)`
1001
+
1002
+ Parameters
1003
+ ----------
1004
+ obj : object
1005
+
1006
+ Returns
1007
+ -------
1008
+ bool
1009
+ """
1010
+ return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)
1011
+
1012
+
1013
+ cdef inline bint is_datetime64_object(object obj):
1014
+ """
1015
+ Cython equivalent of `isinstance(obj, np.datetime64)`
1016
+
1017
+ Parameters
1018
+ ----------
1019
+ obj : object
1020
+
1021
+ Returns
1022
+ -------
1023
+ bool
1024
+ """
1025
+ return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)
1026
+
1027
+
1028
+ cdef inline npy_datetime get_datetime64_value(object obj) nogil:
1029
+ """
1030
+ returns the int64 value underlying scalar numpy datetime64 object
1031
+
1032
+ Note that to interpret this as a datetime, the corresponding unit is
1033
+ also needed. That can be found using `get_datetime64_unit`.
1034
+ """
1035
+ return (<PyDatetimeScalarObject*>obj).obval
1036
+
1037
+
1038
+ cdef inline npy_timedelta get_timedelta64_value(object obj) nogil:
1039
+ """
1040
+ returns the int64 value underlying scalar numpy timedelta64 object
1041
+ """
1042
+ return (<PyTimedeltaScalarObject*>obj).obval
1043
+
1044
+
1045
+ cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:
1046
+ """
1047
+ returns the unit part of the dtype for a numpy datetime64 object.
1048
+ """
1049
+ return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base
.venv/lib/python3.11/site-packages/numpy/__init__.pxd ADDED
@@ -0,0 +1,1014 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ cdef extern from "Python.h":
20
+ ctypedef int Py_intptr_t
21
+ bint PyObject_TypeCheck(object obj, PyTypeObject* type)
22
+
23
+ cdef extern from "numpy/arrayobject.h":
24
+ ctypedef Py_intptr_t npy_intp
25
+ ctypedef size_t npy_uintp
26
+
27
+ cdef enum NPY_TYPES:
28
+ NPY_BOOL
29
+ NPY_BYTE
30
+ NPY_UBYTE
31
+ NPY_SHORT
32
+ NPY_USHORT
33
+ NPY_INT
34
+ NPY_UINT
35
+ NPY_LONG
36
+ NPY_ULONG
37
+ NPY_LONGLONG
38
+ NPY_ULONGLONG
39
+ NPY_FLOAT
40
+ NPY_DOUBLE
41
+ NPY_LONGDOUBLE
42
+ NPY_CFLOAT
43
+ NPY_CDOUBLE
44
+ NPY_CLONGDOUBLE
45
+ NPY_OBJECT
46
+ NPY_STRING
47
+ NPY_UNICODE
48
+ NPY_VOID
49
+ NPY_DATETIME
50
+ NPY_TIMEDELTA
51
+ NPY_NTYPES
52
+ NPY_NOTYPE
53
+
54
+ NPY_INT8
55
+ NPY_INT16
56
+ NPY_INT32
57
+ NPY_INT64
58
+ NPY_INT128
59
+ NPY_INT256
60
+ NPY_UINT8
61
+ NPY_UINT16
62
+ NPY_UINT32
63
+ NPY_UINT64
64
+ NPY_UINT128
65
+ NPY_UINT256
66
+ NPY_FLOAT16
67
+ NPY_FLOAT32
68
+ NPY_FLOAT64
69
+ NPY_FLOAT80
70
+ NPY_FLOAT96
71
+ NPY_FLOAT128
72
+ NPY_FLOAT256
73
+ NPY_COMPLEX32
74
+ NPY_COMPLEX64
75
+ NPY_COMPLEX128
76
+ NPY_COMPLEX160
77
+ NPY_COMPLEX192
78
+ NPY_COMPLEX256
79
+ NPY_COMPLEX512
80
+
81
+ NPY_INTP
82
+
83
+ ctypedef enum NPY_ORDER:
84
+ NPY_ANYORDER
85
+ NPY_CORDER
86
+ NPY_FORTRANORDER
87
+ NPY_KEEPORDER
88
+
89
+ ctypedef enum NPY_CASTING:
90
+ NPY_NO_CASTING
91
+ NPY_EQUIV_CASTING
92
+ NPY_SAFE_CASTING
93
+ NPY_SAME_KIND_CASTING
94
+ NPY_UNSAFE_CASTING
95
+
96
+ ctypedef enum NPY_CLIPMODE:
97
+ NPY_CLIP
98
+ NPY_WRAP
99
+ NPY_RAISE
100
+
101
+ ctypedef enum NPY_SCALARKIND:
102
+ NPY_NOSCALAR,
103
+ NPY_BOOL_SCALAR,
104
+ NPY_INTPOS_SCALAR,
105
+ NPY_INTNEG_SCALAR,
106
+ NPY_FLOAT_SCALAR,
107
+ NPY_COMPLEX_SCALAR,
108
+ NPY_OBJECT_SCALAR
109
+
110
+ ctypedef enum NPY_SORTKIND:
111
+ NPY_QUICKSORT
112
+ NPY_HEAPSORT
113
+ NPY_MERGESORT
114
+
115
+ ctypedef enum NPY_SEARCHSIDE:
116
+ NPY_SEARCHLEFT
117
+ NPY_SEARCHRIGHT
118
+
119
+ enum:
120
+ # DEPRECATED since NumPy 1.7 ! Do not use in new code!
121
+ NPY_C_CONTIGUOUS
122
+ NPY_F_CONTIGUOUS
123
+ NPY_CONTIGUOUS
124
+ NPY_FORTRAN
125
+ NPY_OWNDATA
126
+ NPY_FORCECAST
127
+ NPY_ENSURECOPY
128
+ NPY_ENSUREARRAY
129
+ NPY_ELEMENTSTRIDES
130
+ NPY_ALIGNED
131
+ NPY_NOTSWAPPED
132
+ NPY_WRITEABLE
133
+ NPY_ARR_HAS_DESCR
134
+
135
+ NPY_BEHAVED
136
+ NPY_BEHAVED_NS
137
+ NPY_CARRAY
138
+ NPY_CARRAY_RO
139
+ NPY_FARRAY
140
+ NPY_FARRAY_RO
141
+ NPY_DEFAULT
142
+
143
+ NPY_IN_ARRAY
144
+ NPY_OUT_ARRAY
145
+ NPY_INOUT_ARRAY
146
+ NPY_IN_FARRAY
147
+ NPY_OUT_FARRAY
148
+ NPY_INOUT_FARRAY
149
+
150
+ NPY_UPDATE_ALL
151
+
152
+ enum:
153
+ # Added in NumPy 1.7 to replace the deprecated enums above.
154
+ NPY_ARRAY_C_CONTIGUOUS
155
+ NPY_ARRAY_F_CONTIGUOUS
156
+ NPY_ARRAY_OWNDATA
157
+ NPY_ARRAY_FORCECAST
158
+ NPY_ARRAY_ENSURECOPY
159
+ NPY_ARRAY_ENSUREARRAY
160
+ NPY_ARRAY_ELEMENTSTRIDES
161
+ NPY_ARRAY_ALIGNED
162
+ NPY_ARRAY_NOTSWAPPED
163
+ NPY_ARRAY_WRITEABLE
164
+ NPY_ARRAY_WRITEBACKIFCOPY
165
+
166
+ NPY_ARRAY_BEHAVED
167
+ NPY_ARRAY_BEHAVED_NS
168
+ NPY_ARRAY_CARRAY
169
+ NPY_ARRAY_CARRAY_RO
170
+ NPY_ARRAY_FARRAY
171
+ NPY_ARRAY_FARRAY_RO
172
+ NPY_ARRAY_DEFAULT
173
+
174
+ NPY_ARRAY_IN_ARRAY
175
+ NPY_ARRAY_OUT_ARRAY
176
+ NPY_ARRAY_INOUT_ARRAY
177
+ NPY_ARRAY_IN_FARRAY
178
+ NPY_ARRAY_OUT_FARRAY
179
+ NPY_ARRAY_INOUT_FARRAY
180
+
181
+ NPY_ARRAY_UPDATE_ALL
182
+
183
+ cdef enum:
184
+ NPY_MAXDIMS
185
+
186
+ npy_intp NPY_MAX_ELSIZE
187
+
188
+ ctypedef void (*PyArray_VectorUnaryFunc)(void *, void *, npy_intp, void *, void *)
189
+
190
+ ctypedef struct PyArray_ArrayDescr:
191
+ # shape is a tuple, but Cython doesn't support "tuple shape"
192
+ # inside a non-PyObject declaration, so we have to declare it
193
+ # as just a PyObject*.
194
+ PyObject* shape
195
+
196
+ ctypedef struct PyArray_Descr:
197
+ pass
198
+
199
+ ctypedef class numpy.dtype [object PyArray_Descr, check_size ignore]:
200
+ # Use PyDataType_* macros when possible, however there are no macros
201
+ # for accessing some of the fields, so some are defined.
202
+ cdef PyTypeObject* typeobj
203
+ cdef char kind
204
+ cdef char type
205
+ # Numpy sometimes mutates this without warning (e.g. it'll
206
+ # sometimes change "|" to "<" in shared dtype objects on
207
+ # little-endian machines). If this matters to you, use
208
+ # PyArray_IsNativeByteOrder(dtype.byteorder) instead of
209
+ # directly accessing this field.
210
+ cdef char byteorder
211
+ cdef char flags
212
+ cdef int type_num
213
+ cdef int itemsize "elsize"
214
+ cdef int alignment
215
+ cdef object fields
216
+ cdef tuple names
217
+ # Use PyDataType_HASSUBARRAY to test whether this field is
218
+ # valid (the pointer can be NULL). Most users should access
219
+ # this field via the inline helper method PyDataType_SHAPE.
220
+ cdef PyArray_ArrayDescr* subarray
221
+
222
+ ctypedef class numpy.flatiter [object PyArrayIterObject, check_size ignore]:
223
+ # Use through macros
224
+ pass
225
+
226
+ ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
227
+ cdef int numiter
228
+ cdef npy_intp size, index
229
+ cdef int nd
230
+ cdef npy_intp *dimensions
231
+ cdef void **iters
232
+
233
+ ctypedef struct PyArrayObject:
234
+ # For use in situations where ndarray can't replace PyArrayObject*,
235
+ # like PyArrayObject**.
236
+ pass
237
+
238
+ ctypedef class numpy.ndarray [object PyArrayObject, check_size ignore]:
239
+ cdef __cythonbufferdefaults__ = {"mode": "strided"}
240
+
241
+ cdef:
242
+ # Only taking a few of the most commonly used and stable fields.
243
+ # One should use PyArray_* macros instead to access the C fields.
244
+ char *data
245
+ int ndim "nd"
246
+ npy_intp *shape "dimensions"
247
+ npy_intp *strides
248
+ dtype descr # deprecated since NumPy 1.7 !
249
+ PyObject* base # NOT PUBLIC, DO NOT USE !
250
+
251
+
252
+
253
+ ctypedef unsigned char npy_bool
254
+
255
+ ctypedef signed char npy_byte
256
+ ctypedef signed short npy_short
257
+ ctypedef signed int npy_int
258
+ ctypedef signed long npy_long
259
+ ctypedef signed long long npy_longlong
260
+
261
+ ctypedef unsigned char npy_ubyte
262
+ ctypedef unsigned short npy_ushort
263
+ ctypedef unsigned int npy_uint
264
+ ctypedef unsigned long npy_ulong
265
+ ctypedef unsigned long long npy_ulonglong
266
+
267
+ ctypedef float npy_float
268
+ ctypedef double npy_double
269
+ ctypedef long double npy_longdouble
270
+
271
+ ctypedef signed char npy_int8
272
+ ctypedef signed short npy_int16
273
+ ctypedef signed int npy_int32
274
+ ctypedef signed long long npy_int64
275
+ ctypedef signed long long npy_int96
276
+ ctypedef signed long long npy_int128
277
+
278
+ ctypedef unsigned char npy_uint8
279
+ ctypedef unsigned short npy_uint16
280
+ ctypedef unsigned int npy_uint32
281
+ ctypedef unsigned long long npy_uint64
282
+ ctypedef unsigned long long npy_uint96
283
+ ctypedef unsigned long long npy_uint128
284
+
285
+ ctypedef float npy_float32
286
+ ctypedef double npy_float64
287
+ ctypedef long double npy_float80
288
+ ctypedef long double npy_float96
289
+ ctypedef long double npy_float128
290
+
291
+ ctypedef struct npy_cfloat:
292
+ float real
293
+ float imag
294
+
295
+ ctypedef struct npy_cdouble:
296
+ double real
297
+ double imag
298
+
299
+ ctypedef struct npy_clongdouble:
300
+ long double real
301
+ long double imag
302
+
303
+ ctypedef struct npy_complex64:
304
+ float real
305
+ float imag
306
+
307
+ ctypedef struct npy_complex128:
308
+ double real
309
+ double imag
310
+
311
+ ctypedef struct npy_complex160:
312
+ long double real
313
+ long double imag
314
+
315
+ ctypedef struct npy_complex192:
316
+ long double real
317
+ long double imag
318
+
319
+ ctypedef struct npy_complex256:
320
+ long double real
321
+ long double imag
322
+
323
+ ctypedef struct PyArray_Dims:
324
+ npy_intp *ptr
325
+ int len
326
+
327
+ int _import_array() except -1
328
+ # A second definition so _import_array isn't marked as used when we use it here.
329
+ # Do not use - subject to change any time.
330
+ int __pyx_import_array "_import_array"() except -1
331
+
332
+ #
333
+ # Macros from ndarrayobject.h
334
+ #
335
+ bint PyArray_CHKFLAGS(ndarray m, int flags) nogil
336
+ bint PyArray_IS_C_CONTIGUOUS(ndarray arr) nogil
337
+ bint PyArray_IS_F_CONTIGUOUS(ndarray arr) nogil
338
+ bint PyArray_ISCONTIGUOUS(ndarray m) nogil
339
+ bint PyArray_ISWRITEABLE(ndarray m) nogil
340
+ bint PyArray_ISALIGNED(ndarray m) nogil
341
+
342
+ int PyArray_NDIM(ndarray) nogil
343
+ bint PyArray_ISONESEGMENT(ndarray) nogil
344
+ bint PyArray_ISFORTRAN(ndarray) nogil
345
+ int PyArray_FORTRANIF(ndarray) nogil
346
+
347
+ void* PyArray_DATA(ndarray) nogil
348
+ char* PyArray_BYTES(ndarray) nogil
349
+
350
+ npy_intp* PyArray_DIMS(ndarray) nogil
351
+ npy_intp* PyArray_STRIDES(ndarray) nogil
352
+ npy_intp PyArray_DIM(ndarray, size_t) nogil
353
+ npy_intp PyArray_STRIDE(ndarray, size_t) nogil
354
+
355
+ PyObject *PyArray_BASE(ndarray) nogil # returns borrowed reference!
356
+ PyArray_Descr *PyArray_DESCR(ndarray) nogil # returns borrowed reference to dtype!
357
+ int PyArray_FLAGS(ndarray) nogil
358
+ npy_intp PyArray_ITEMSIZE(ndarray) nogil
359
+ int PyArray_TYPE(ndarray arr) nogil
360
+
361
+ object PyArray_GETITEM(ndarray arr, void *itemptr)
362
+ int PyArray_SETITEM(ndarray arr, void *itemptr, object obj) except -1
363
+
364
+ bint PyTypeNum_ISBOOL(int) nogil
365
+ bint PyTypeNum_ISUNSIGNED(int) nogil
366
+ bint PyTypeNum_ISSIGNED(int) nogil
367
+ bint PyTypeNum_ISINTEGER(int) nogil
368
+ bint PyTypeNum_ISFLOAT(int) nogil
369
+ bint PyTypeNum_ISNUMBER(int) nogil
370
+ bint PyTypeNum_ISSTRING(int) nogil
371
+ bint PyTypeNum_ISCOMPLEX(int) nogil
372
+ bint PyTypeNum_ISPYTHON(int) nogil
373
+ bint PyTypeNum_ISFLEXIBLE(int) nogil
374
+ bint PyTypeNum_ISUSERDEF(int) nogil
375
+ bint PyTypeNum_ISEXTENDED(int) nogil
376
+ bint PyTypeNum_ISOBJECT(int) nogil
377
+
378
+ bint PyDataType_ISBOOL(dtype) nogil
379
+ bint PyDataType_ISUNSIGNED(dtype) nogil
380
+ bint PyDataType_ISSIGNED(dtype) nogil
381
+ bint PyDataType_ISINTEGER(dtype) nogil
382
+ bint PyDataType_ISFLOAT(dtype) nogil
383
+ bint PyDataType_ISNUMBER(dtype) nogil
384
+ bint PyDataType_ISSTRING(dtype) nogil
385
+ bint PyDataType_ISCOMPLEX(dtype) nogil
386
+ bint PyDataType_ISPYTHON(dtype) nogil
387
+ bint PyDataType_ISFLEXIBLE(dtype) nogil
388
+ bint PyDataType_ISUSERDEF(dtype) nogil
389
+ bint PyDataType_ISEXTENDED(dtype) nogil
390
+ bint PyDataType_ISOBJECT(dtype) nogil
391
+ bint PyDataType_HASFIELDS(dtype) nogil
392
+ bint PyDataType_HASSUBARRAY(dtype) nogil
393
+
394
+ bint PyArray_ISBOOL(ndarray) nogil
395
+ bint PyArray_ISUNSIGNED(ndarray) nogil
396
+ bint PyArray_ISSIGNED(ndarray) nogil
397
+ bint PyArray_ISINTEGER(ndarray) nogil
398
+ bint PyArray_ISFLOAT(ndarray) nogil
399
+ bint PyArray_ISNUMBER(ndarray) nogil
400
+ bint PyArray_ISSTRING(ndarray) nogil
401
+ bint PyArray_ISCOMPLEX(ndarray) nogil
402
+ bint PyArray_ISPYTHON(ndarray) nogil
403
+ bint PyArray_ISFLEXIBLE(ndarray) nogil
404
+ bint PyArray_ISUSERDEF(ndarray) nogil
405
+ bint PyArray_ISEXTENDED(ndarray) nogil
406
+ bint PyArray_ISOBJECT(ndarray) nogil
407
+ bint PyArray_HASFIELDS(ndarray) nogil
408
+
409
+ bint PyArray_ISVARIABLE(ndarray) nogil
410
+
411
+ bint PyArray_SAFEALIGNEDCOPY(ndarray) nogil
412
+ bint PyArray_ISNBO(char) nogil # works on ndarray.byteorder
413
+ bint PyArray_IsNativeByteOrder(char) nogil # works on ndarray.byteorder
414
+ bint PyArray_ISNOTSWAPPED(ndarray) nogil
415
+ bint PyArray_ISBYTESWAPPED(ndarray) nogil
416
+
417
+ bint PyArray_FLAGSWAP(ndarray, int) nogil
418
+
419
+ bint PyArray_ISCARRAY(ndarray) nogil
420
+ bint PyArray_ISCARRAY_RO(ndarray) nogil
421
+ bint PyArray_ISFARRAY(ndarray) nogil
422
+ bint PyArray_ISFARRAY_RO(ndarray) nogil
423
+ bint PyArray_ISBEHAVED(ndarray) nogil
424
+ bint PyArray_ISBEHAVED_RO(ndarray) nogil
425
+
426
+
427
+ bint PyDataType_ISNOTSWAPPED(dtype) nogil
428
+ bint PyDataType_ISBYTESWAPPED(dtype) nogil
429
+
430
+ bint PyArray_DescrCheck(object)
431
+
432
+ bint PyArray_Check(object)
433
+ bint PyArray_CheckExact(object)
434
+
435
+ # Cannot be supported due to out arg:
436
+ # bint PyArray_HasArrayInterfaceType(object, dtype, object, object&)
437
+ # bint PyArray_HasArrayInterface(op, out)
438
+
439
+
440
+ bint PyArray_IsZeroDim(object)
441
+ # Cannot be supported due to ## ## in macro:
442
+ # bint PyArray_IsScalar(object, verbatim work)
443
+ bint PyArray_CheckScalar(object)
444
+ bint PyArray_IsPythonNumber(object)
445
+ bint PyArray_IsPythonScalar(object)
446
+ bint PyArray_IsAnyScalar(object)
447
+ bint PyArray_CheckAnyScalar(object)
448
+
449
+ ndarray PyArray_GETCONTIGUOUS(ndarray)
450
+ bint PyArray_SAMESHAPE(ndarray, ndarray) nogil
451
+ npy_intp PyArray_SIZE(ndarray) nogil
452
+ npy_intp PyArray_NBYTES(ndarray) nogil
453
+
454
+ object PyArray_FROM_O(object)
455
+ object PyArray_FROM_OF(object m, int flags)
456
+ object PyArray_FROM_OT(object m, int type)
457
+ object PyArray_FROM_OTF(object m, int type, int flags)
458
+ object PyArray_FROMANY(object m, int type, int min, int max, int flags)
459
+ object PyArray_ZEROS(int nd, npy_intp* dims, int type, int fortran)
460
+ object PyArray_EMPTY(int nd, npy_intp* dims, int type, int fortran)
461
+ void PyArray_FILLWBYTE(object, int val)
462
+ npy_intp PyArray_REFCOUNT(object)
463
+ object PyArray_ContiguousFromAny(op, int, int min_depth, int max_depth)
464
+ unsigned char PyArray_EquivArrTypes(ndarray a1, ndarray a2)
465
+ bint PyArray_EquivByteorders(int b1, int b2) nogil
466
+ object PyArray_SimpleNew(int nd, npy_intp* dims, int typenum)
467
+ object PyArray_SimpleNewFromData(int nd, npy_intp* dims, int typenum, void* data)
468
+ #object PyArray_SimpleNewFromDescr(int nd, npy_intp* dims, dtype descr)
469
+ object PyArray_ToScalar(void* data, ndarray arr)
470
+
471
+ void* PyArray_GETPTR1(ndarray m, npy_intp i) nogil
472
+ void* PyArray_GETPTR2(ndarray m, npy_intp i, npy_intp j) nogil
473
+ void* PyArray_GETPTR3(ndarray m, npy_intp i, npy_intp j, npy_intp k) nogil
474
+ void* PyArray_GETPTR4(ndarray m, npy_intp i, npy_intp j, npy_intp k, npy_intp l) nogil
475
+
476
+ # Cannot be supported due to out arg
477
+ # void PyArray_DESCR_REPLACE(descr)
478
+
479
+
480
+ object PyArray_Copy(ndarray)
481
+ object PyArray_FromObject(object op, int type, int min_depth, int max_depth)
482
+ object PyArray_ContiguousFromObject(object op, int type, int min_depth, int max_depth)
483
+ object PyArray_CopyFromObject(object op, int type, int min_depth, int max_depth)
484
+
485
+ object PyArray_Cast(ndarray mp, int type_num)
486
+ object PyArray_Take(ndarray ap, object items, int axis)
487
+ object PyArray_Put(ndarray ap, object items, object values)
488
+
489
+ void PyArray_ITER_RESET(flatiter it) nogil
490
+ void PyArray_ITER_NEXT(flatiter it) nogil
491
+ void PyArray_ITER_GOTO(flatiter it, npy_intp* destination) nogil
492
+ void PyArray_ITER_GOTO1D(flatiter it, npy_intp ind) nogil
493
+ void* PyArray_ITER_DATA(flatiter it) nogil
494
+ bint PyArray_ITER_NOTDONE(flatiter it) nogil
495
+
496
+ void PyArray_MultiIter_RESET(broadcast multi) nogil
497
+ void PyArray_MultiIter_NEXT(broadcast multi) nogil
498
+ void PyArray_MultiIter_GOTO(broadcast multi, npy_intp dest) nogil
499
+ void PyArray_MultiIter_GOTO1D(broadcast multi, npy_intp ind) nogil
500
+ void* PyArray_MultiIter_DATA(broadcast multi, npy_intp i) nogil
501
+ void PyArray_MultiIter_NEXTi(broadcast multi, npy_intp i) nogil
502
+ bint PyArray_MultiIter_NOTDONE(broadcast multi) nogil
503
+
504
+ # Functions from __multiarray_api.h
505
+
506
+ # Functions taking dtype and returning object/ndarray are disabled
507
+ # for now as they steal dtype references. I'm conservative and disable
508
+ # more than is probably needed until it can be checked further.
509
+ int PyArray_SetNumericOps (object) except -1
510
+ object PyArray_GetNumericOps ()
511
+ int PyArray_INCREF (ndarray) except * # uses PyArray_Item_INCREF...
512
+ int PyArray_XDECREF (ndarray) except * # uses PyArray_Item_DECREF...
513
+ void PyArray_SetStringFunction (object, int)
514
+ dtype PyArray_DescrFromType (int)
515
+ object PyArray_TypeObjectFromType (int)
516
+ char * PyArray_Zero (ndarray)
517
+ char * PyArray_One (ndarray)
518
+ #object PyArray_CastToType (ndarray, dtype, int)
519
+ int PyArray_CastTo (ndarray, ndarray) except -1
520
+ int PyArray_CastAnyTo (ndarray, ndarray) except -1
521
+ int PyArray_CanCastSafely (int, int) # writes errors
522
+ npy_bool PyArray_CanCastTo (dtype, dtype) # writes errors
523
+ int PyArray_ObjectType (object, int) except 0
524
+ dtype PyArray_DescrFromObject (object, dtype)
525
+ #ndarray* PyArray_ConvertToCommonType (object, int *)
526
+ dtype PyArray_DescrFromScalar (object)
527
+ dtype PyArray_DescrFromTypeObject (object)
528
+ npy_intp PyArray_Size (object)
529
+ #object PyArray_Scalar (void *, dtype, object)
530
+ #object PyArray_FromScalar (object, dtype)
531
+ void PyArray_ScalarAsCtype (object, void *)
532
+ #int PyArray_CastScalarToCtype (object, void *, dtype)
533
+ #int PyArray_CastScalarDirect (object, dtype, void *, int)
534
+ object PyArray_ScalarFromObject (object)
535
+ #PyArray_VectorUnaryFunc * PyArray_GetCastFunc (dtype, int)
536
+ object PyArray_FromDims (int, int *, int)
537
+ #object PyArray_FromDimsAndDataAndDescr (int, int *, dtype, char *)
538
+ #object PyArray_FromAny (object, dtype, int, int, int, object)
539
+ object PyArray_EnsureArray (object)
540
+ object PyArray_EnsureAnyArray (object)
541
+ #object PyArray_FromFile (stdio.FILE *, dtype, npy_intp, char *)
542
+ #object PyArray_FromString (char *, npy_intp, dtype, npy_intp, char *)
543
+ #object PyArray_FromBuffer (object, dtype, npy_intp, npy_intp)
544
+ #object PyArray_FromIter (object, dtype, npy_intp)
545
+ object PyArray_Return (ndarray)
546
+ #object PyArray_GetField (ndarray, dtype, int)
547
+ #int PyArray_SetField (ndarray, dtype, int, object) except -1
548
+ object PyArray_Byteswap (ndarray, npy_bool)
549
+ object PyArray_Resize (ndarray, PyArray_Dims *, int, NPY_ORDER)
550
+ int PyArray_MoveInto (ndarray, ndarray) except -1
551
+ int PyArray_CopyInto (ndarray, ndarray) except -1
552
+ int PyArray_CopyAnyInto (ndarray, ndarray) except -1
553
+ int PyArray_CopyObject (ndarray, object) except -1
554
+ object PyArray_NewCopy (ndarray, NPY_ORDER)
555
+ object PyArray_ToList (ndarray)
556
+ object PyArray_ToString (ndarray, NPY_ORDER)
557
+ int PyArray_ToFile (ndarray, stdio.FILE *, char *, char *) except -1
558
+ int PyArray_Dump (object, object, int) except -1
559
+ object PyArray_Dumps (object, int)
560
+ int PyArray_ValidType (int) # Cannot error
561
+ void PyArray_UpdateFlags (ndarray, int)
562
+ object PyArray_New (type, int, npy_intp *, int, npy_intp *, void *, int, int, object)
563
+ #object PyArray_NewFromDescr (type, dtype, int, npy_intp *, npy_intp *, void *, int, object)
564
+ #dtype PyArray_DescrNew (dtype)
565
+ dtype PyArray_DescrNewFromType (int)
566
+ double PyArray_GetPriority (object, double) # clears errors as of 1.25
567
+ object PyArray_IterNew (object)
568
+ object PyArray_MultiIterNew (int, ...)
569
+
570
+ int PyArray_PyIntAsInt (object) except? -1
571
+ npy_intp PyArray_PyIntAsIntp (object)
572
+ int PyArray_Broadcast (broadcast) except -1
573
+ void PyArray_FillObjectArray (ndarray, object) except *
574
+ int PyArray_FillWithScalar (ndarray, object) except -1
575
+ npy_bool PyArray_CheckStrides (int, int, npy_intp, npy_intp, npy_intp *, npy_intp *)
576
+ dtype PyArray_DescrNewByteorder (dtype, char)
577
+ object PyArray_IterAllButAxis (object, int *)
578
+ #object PyArray_CheckFromAny (object, dtype, int, int, int, object)
579
+ #object PyArray_FromArray (ndarray, dtype, int)
580
+ object PyArray_FromInterface (object)
581
+ object PyArray_FromStructInterface (object)
582
+ #object PyArray_FromArrayAttr (object, dtype, object)
583
+ #NPY_SCALARKIND PyArray_ScalarKind (int, ndarray*)
584
+ int PyArray_CanCoerceScalar (int, int, NPY_SCALARKIND)
585
+ object PyArray_NewFlagsObject (object)
586
+ npy_bool PyArray_CanCastScalar (type, type)
587
+ #int PyArray_CompareUCS4 (npy_ucs4 *, npy_ucs4 *, register size_t)
588
+ int PyArray_RemoveSmallest (broadcast) except -1
589
+ int PyArray_ElementStrides (object)
590
+ void PyArray_Item_INCREF (char *, dtype) except *
591
+ void PyArray_Item_XDECREF (char *, dtype) except *
592
+ object PyArray_FieldNames (object)
593
+ object PyArray_Transpose (ndarray, PyArray_Dims *)
594
+ object PyArray_TakeFrom (ndarray, object, int, ndarray, NPY_CLIPMODE)
595
+ object PyArray_PutTo (ndarray, object, object, NPY_CLIPMODE)
596
+ object PyArray_PutMask (ndarray, object, object)
597
+ object PyArray_Repeat (ndarray, object, int)
598
+ object PyArray_Choose (ndarray, object, ndarray, NPY_CLIPMODE)
599
+ int PyArray_Sort (ndarray, int, NPY_SORTKIND) except -1
600
+ object PyArray_ArgSort (ndarray, int, NPY_SORTKIND)
601
+ object PyArray_SearchSorted (ndarray, object, NPY_SEARCHSIDE, PyObject *)
602
+ object PyArray_ArgMax (ndarray, int, ndarray)
603
+ object PyArray_ArgMin (ndarray, int, ndarray)
604
+ object PyArray_Reshape (ndarray, object)
605
+ object PyArray_Newshape (ndarray, PyArray_Dims *, NPY_ORDER)
606
+ object PyArray_Squeeze (ndarray)
607
+ #object PyArray_View (ndarray, dtype, type)
608
+ object PyArray_SwapAxes (ndarray, int, int)
609
+ object PyArray_Max (ndarray, int, ndarray)
610
+ object PyArray_Min (ndarray, int, ndarray)
611
+ object PyArray_Ptp (ndarray, int, ndarray)
612
+ object PyArray_Mean (ndarray, int, int, ndarray)
613
+ object PyArray_Trace (ndarray, int, int, int, int, ndarray)
614
+ object PyArray_Diagonal (ndarray, int, int, int)
615
+ object PyArray_Clip (ndarray, object, object, ndarray)
616
+ object PyArray_Conjugate (ndarray, ndarray)
617
+ object PyArray_Nonzero (ndarray)
618
+ object PyArray_Std (ndarray, int, int, ndarray, int)
619
+ object PyArray_Sum (ndarray, int, int, ndarray)
620
+ object PyArray_CumSum (ndarray, int, int, ndarray)
621
+ object PyArray_Prod (ndarray, int, int, ndarray)
622
+ object PyArray_CumProd (ndarray, int, int, ndarray)
623
+ object PyArray_All (ndarray, int, ndarray)
624
+ object PyArray_Any (ndarray, int, ndarray)
625
+ object PyArray_Compress (ndarray, object, int, ndarray)
626
+ object PyArray_Flatten (ndarray, NPY_ORDER)
627
+ object PyArray_Ravel (ndarray, NPY_ORDER)
628
+ npy_intp PyArray_MultiplyList (npy_intp *, int)
629
+ int PyArray_MultiplyIntList (int *, int)
630
+ void * PyArray_GetPtr (ndarray, npy_intp*)
631
+ int PyArray_CompareLists (npy_intp *, npy_intp *, int)
632
+ #int PyArray_AsCArray (object*, void *, npy_intp *, int, dtype)
633
+ #int PyArray_As1D (object*, char **, int *, int)
634
+ #int PyArray_As2D (object*, char ***, int *, int *, int)
635
+ int PyArray_Free (object, void *)
636
+ #int PyArray_Converter (object, object*)
637
+ int PyArray_IntpFromSequence (object, npy_intp *, int) except -1
638
+ object PyArray_Concatenate (object, int)
639
+ object PyArray_InnerProduct (object, object)
640
+ object PyArray_MatrixProduct (object, object)
641
+ object PyArray_CopyAndTranspose (object)
642
+ object PyArray_Correlate (object, object, int)
643
+ int PyArray_TypestrConvert (int, int)
644
+ #int PyArray_DescrConverter (object, dtype*) except 0
645
+ #int PyArray_DescrConverter2 (object, dtype*) except 0
646
+ int PyArray_IntpConverter (object, PyArray_Dims *) except 0
647
+ #int PyArray_BufferConverter (object, chunk) except 0
648
+ int PyArray_AxisConverter (object, int *) except 0
649
+ int PyArray_BoolConverter (object, npy_bool *) except 0
650
+ int PyArray_ByteorderConverter (object, char *) except 0
651
+ int PyArray_OrderConverter (object, NPY_ORDER *) except 0
652
+ unsigned char PyArray_EquivTypes (dtype, dtype) # clears errors
653
+ #object PyArray_Zeros (int, npy_intp *, dtype, int)
654
+ #object PyArray_Empty (int, npy_intp *, dtype, int)
655
+ object PyArray_Where (object, object, object)
656
+ object PyArray_Arange (double, double, double, int)
657
+ #object PyArray_ArangeObj (object, object, object, dtype)
658
+ int PyArray_SortkindConverter (object, NPY_SORTKIND *) except 0
659
+ object PyArray_LexSort (object, int)
660
+ object PyArray_Round (ndarray, int, ndarray)
661
+ unsigned char PyArray_EquivTypenums (int, int)
662
+ int PyArray_RegisterDataType (dtype) except -1
663
+ int PyArray_RegisterCastFunc (dtype, int, PyArray_VectorUnaryFunc *) except -1
664
+ int PyArray_RegisterCanCast (dtype, int, NPY_SCALARKIND) except -1
665
+ #void PyArray_InitArrFuncs (PyArray_ArrFuncs *)
666
+ object PyArray_IntTupleFromIntp (int, npy_intp *)
667
+ int PyArray_TypeNumFromName (char *)
668
+ int PyArray_ClipmodeConverter (object, NPY_CLIPMODE *) except 0
669
+ #int PyArray_OutputConverter (object, ndarray*) except 0
670
+ object PyArray_BroadcastToShape (object, npy_intp *, int)
671
+ void _PyArray_SigintHandler (int)
672
+ void* _PyArray_GetSigintBuf ()
673
+ #int PyArray_DescrAlignConverter (object, dtype*) except 0
674
+ #int PyArray_DescrAlignConverter2 (object, dtype*) except 0
675
+ int PyArray_SearchsideConverter (object, void *) except 0
676
+ object PyArray_CheckAxis (ndarray, int *, int)
677
+ npy_intp PyArray_OverflowMultiplyList (npy_intp *, int)
678
+ int PyArray_CompareString (char *, char *, size_t)
679
+ int PyArray_SetBaseObject(ndarray, base) except -1 # NOTE: steals a reference to base! Use "set_array_base()" instead.
680
+
681
+
682
+ # Typedefs that matches the runtime dtype objects in
683
+ # the numpy module.
684
+
685
+ # The ones that are commented out needs an IFDEF function
686
+ # in Cython to enable them only on the right systems.
687
+
688
+ ctypedef npy_int8 int8_t
689
+ ctypedef npy_int16 int16_t
690
+ ctypedef npy_int32 int32_t
691
+ ctypedef npy_int64 int64_t
692
+ #ctypedef npy_int96 int96_t
693
+ #ctypedef npy_int128 int128_t
694
+
695
+ ctypedef npy_uint8 uint8_t
696
+ ctypedef npy_uint16 uint16_t
697
+ ctypedef npy_uint32 uint32_t
698
+ ctypedef npy_uint64 uint64_t
699
+ #ctypedef npy_uint96 uint96_t
700
+ #ctypedef npy_uint128 uint128_t
701
+
702
+ ctypedef npy_float32 float32_t
703
+ ctypedef npy_float64 float64_t
704
+ #ctypedef npy_float80 float80_t
705
+ #ctypedef npy_float128 float128_t
706
+
707
+ ctypedef float complex complex64_t
708
+ ctypedef double complex complex128_t
709
+
710
+ # The int types are mapped a bit surprising --
711
+ # numpy.int corresponds to 'l' and numpy.long to 'q'
712
+ ctypedef npy_long int_t
713
+ ctypedef npy_longlong longlong_t
714
+
715
+ ctypedef npy_ulong uint_t
716
+ ctypedef npy_ulonglong ulonglong_t
717
+
718
+ ctypedef npy_intp intp_t
719
+ ctypedef npy_uintp uintp_t
720
+
721
+ ctypedef npy_double float_t
722
+ ctypedef npy_double double_t
723
+ ctypedef npy_longdouble longdouble_t
724
+
725
+ ctypedef npy_cfloat cfloat_t
726
+ ctypedef npy_cdouble cdouble_t
727
+ ctypedef npy_clongdouble clongdouble_t
728
+
729
+ ctypedef npy_cdouble complex_t
730
+
731
+ cdef inline object PyArray_MultiIterNew1(a):
732
+ return PyArray_MultiIterNew(1, <void*>a)
733
+
734
+ cdef inline object PyArray_MultiIterNew2(a, b):
735
+ return PyArray_MultiIterNew(2, <void*>a, <void*>b)
736
+
737
+ cdef inline object PyArray_MultiIterNew3(a, b, c):
738
+ return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
739
+
740
+ cdef inline object PyArray_MultiIterNew4(a, b, c, d):
741
+ return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
742
+
743
+ cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
744
+ return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
745
+
746
+ cdef inline tuple PyDataType_SHAPE(dtype d):
747
+ if PyDataType_HASSUBARRAY(d):
748
+ return <tuple>d.subarray.shape
749
+ else:
750
+ return ()
751
+
752
+
753
+ cdef extern from "numpy/ndarrayobject.h":
754
+ PyTypeObject PyTimedeltaArrType_Type
755
+ PyTypeObject PyDatetimeArrType_Type
756
+ ctypedef int64_t npy_timedelta
757
+ ctypedef int64_t npy_datetime
758
+
759
+ cdef extern from "numpy/ndarraytypes.h":
760
+ ctypedef struct PyArray_DatetimeMetaData:
761
+ NPY_DATETIMEUNIT base
762
+ int64_t num
763
+
764
+ cdef extern from "numpy/arrayscalars.h":
765
+
766
+ # abstract types
767
+ ctypedef class numpy.generic [object PyObject]:
768
+ pass
769
+ ctypedef class numpy.number [object PyObject]:
770
+ pass
771
+ ctypedef class numpy.integer [object PyObject]:
772
+ pass
773
+ ctypedef class numpy.signedinteger [object PyObject]:
774
+ pass
775
+ ctypedef class numpy.unsignedinteger [object PyObject]:
776
+ pass
777
+ ctypedef class numpy.inexact [object PyObject]:
778
+ pass
779
+ ctypedef class numpy.floating [object PyObject]:
780
+ pass
781
+ ctypedef class numpy.complexfloating [object PyObject]:
782
+ pass
783
+ ctypedef class numpy.flexible [object PyObject]:
784
+ pass
785
+ ctypedef class numpy.character [object PyObject]:
786
+ pass
787
+
788
+ ctypedef struct PyDatetimeScalarObject:
789
+ # PyObject_HEAD
790
+ npy_datetime obval
791
+ PyArray_DatetimeMetaData obmeta
792
+
793
+ ctypedef struct PyTimedeltaScalarObject:
794
+ # PyObject_HEAD
795
+ npy_timedelta obval
796
+ PyArray_DatetimeMetaData obmeta
797
+
798
+ ctypedef enum NPY_DATETIMEUNIT:
799
+ NPY_FR_Y
800
+ NPY_FR_M
801
+ NPY_FR_W
802
+ NPY_FR_D
803
+ NPY_FR_B
804
+ NPY_FR_h
805
+ NPY_FR_m
806
+ NPY_FR_s
807
+ NPY_FR_ms
808
+ NPY_FR_us
809
+ NPY_FR_ns
810
+ NPY_FR_ps
811
+ NPY_FR_fs
812
+ NPY_FR_as
813
+
814
+
815
+ #
816
+ # ufunc API
817
+ #
818
+
819
+ cdef extern from "numpy/ufuncobject.h":
820
+
821
+ ctypedef void (*PyUFuncGenericFunction) (char **, npy_intp *, npy_intp *, void *)
822
+
823
+ ctypedef class numpy.ufunc [object PyUFuncObject, check_size ignore]:
824
+ cdef:
825
+ int nin, nout, nargs
826
+ int identity
827
+ PyUFuncGenericFunction *functions
828
+ void **data
829
+ int ntypes
830
+ int check_return
831
+ char *name
832
+ char *types
833
+ char *doc
834
+ void *ptr
835
+ PyObject *obj
836
+ PyObject *userloops
837
+
838
+ cdef enum:
839
+ PyUFunc_Zero
840
+ PyUFunc_One
841
+ PyUFunc_None
842
+ UFUNC_ERR_IGNORE
843
+ UFUNC_ERR_WARN
844
+ UFUNC_ERR_RAISE
845
+ UFUNC_ERR_CALL
846
+ UFUNC_ERR_PRINT
847
+ UFUNC_ERR_LOG
848
+ UFUNC_MASK_DIVIDEBYZERO
849
+ UFUNC_MASK_OVERFLOW
850
+ UFUNC_MASK_UNDERFLOW
851
+ UFUNC_MASK_INVALID
852
+ UFUNC_SHIFT_DIVIDEBYZERO
853
+ UFUNC_SHIFT_OVERFLOW
854
+ UFUNC_SHIFT_UNDERFLOW
855
+ UFUNC_SHIFT_INVALID
856
+ UFUNC_FPE_DIVIDEBYZERO
857
+ UFUNC_FPE_OVERFLOW
858
+ UFUNC_FPE_UNDERFLOW
859
+ UFUNC_FPE_INVALID
860
+ UFUNC_ERR_DEFAULT
861
+ UFUNC_ERR_DEFAULT2
862
+
863
+ object PyUFunc_FromFuncAndData(PyUFuncGenericFunction *,
864
+ void **, char *, int, int, int, int, char *, char *, int)
865
+ int PyUFunc_RegisterLoopForType(ufunc, int,
866
+ PyUFuncGenericFunction, int *, void *) except -1
867
+ void PyUFunc_f_f_As_d_d \
868
+ (char **, npy_intp *, npy_intp *, void *)
869
+ void PyUFunc_d_d \
870
+ (char **, npy_intp *, npy_intp *, void *)
871
+ void PyUFunc_f_f \
872
+ (char **, npy_intp *, npy_intp *, void *)
873
+ void PyUFunc_g_g \
874
+ (char **, npy_intp *, npy_intp *, void *)
875
+ void PyUFunc_F_F_As_D_D \
876
+ (char **, npy_intp *, npy_intp *, void *)
877
+ void PyUFunc_F_F \
878
+ (char **, npy_intp *, npy_intp *, void *)
879
+ void PyUFunc_D_D \
880
+ (char **, npy_intp *, npy_intp *, void *)
881
+ void PyUFunc_G_G \
882
+ (char **, npy_intp *, npy_intp *, void *)
883
+ void PyUFunc_O_O \
884
+ (char **, npy_intp *, npy_intp *, void *)
885
+ void PyUFunc_ff_f_As_dd_d \
886
+ (char **, npy_intp *, npy_intp *, void *)
887
+ void PyUFunc_ff_f \
888
+ (char **, npy_intp *, npy_intp *, void *)
889
+ void PyUFunc_dd_d \
890
+ (char **, npy_intp *, npy_intp *, void *)
891
+ void PyUFunc_gg_g \
892
+ (char **, npy_intp *, npy_intp *, void *)
893
+ void PyUFunc_FF_F_As_DD_D \
894
+ (char **, npy_intp *, npy_intp *, void *)
895
+ void PyUFunc_DD_D \
896
+ (char **, npy_intp *, npy_intp *, void *)
897
+ void PyUFunc_FF_F \
898
+ (char **, npy_intp *, npy_intp *, void *)
899
+ void PyUFunc_GG_G \
900
+ (char **, npy_intp *, npy_intp *, void *)
901
+ void PyUFunc_OO_O \
902
+ (char **, npy_intp *, npy_intp *, void *)
903
+ void PyUFunc_O_O_method \
904
+ (char **, npy_intp *, npy_intp *, void *)
905
+ void PyUFunc_OO_O_method \
906
+ (char **, npy_intp *, npy_intp *, void *)
907
+ void PyUFunc_On_Om \
908
+ (char **, npy_intp *, npy_intp *, void *)
909
+ int PyUFunc_GetPyValues \
910
+ (char *, int *, int *, PyObject **)
911
+ int PyUFunc_checkfperr \
912
+ (int, PyObject *, int *)
913
+ void PyUFunc_clearfperr()
914
+ int PyUFunc_getfperr()
915
+ int PyUFunc_handlefperr \
916
+ (int, PyObject *, int, int *) except -1
917
+ int PyUFunc_ReplaceLoopBySignature \
918
+ (ufunc, PyUFuncGenericFunction, int *, PyUFuncGenericFunction *)
919
+ object PyUFunc_FromFuncAndDataAndSignature \
920
+ (PyUFuncGenericFunction *, void **, char *, int, int, int,
921
+ int, char *, char *, int, char *)
922
+
923
+ int _import_umath() except -1
924
+
925
+ cdef inline void set_array_base(ndarray arr, object base):
926
+ Py_INCREF(base) # important to do this before stealing the reference below!
927
+ PyArray_SetBaseObject(arr, base)
928
+
929
+ cdef inline object get_array_base(ndarray arr):
930
+ base = PyArray_BASE(arr)
931
+ if base is NULL:
932
+ return None
933
+ return <object>base
934
+
935
+ # Versions of the import_* functions which are more suitable for
936
+ # Cython code.
937
+ cdef inline int import_array() except -1:
938
+ try:
939
+ __pyx_import_array()
940
+ except Exception:
941
+ raise ImportError("numpy.core.multiarray failed to import")
942
+
943
+ cdef inline int import_umath() except -1:
944
+ try:
945
+ _import_umath()
946
+ except Exception:
947
+ raise ImportError("numpy.core.umath failed to import")
948
+
949
+ cdef inline int import_ufunc() except -1:
950
+ try:
951
+ _import_umath()
952
+ except Exception:
953
+ raise ImportError("numpy.core.umath failed to import")
954
+
955
+ cdef extern from *:
956
+ # Leave a marker that the NumPy declarations came from this file
957
+ # See https://github.com/cython/cython/issues/3573
958
+ """
959
+ /* NumPy API declarations from "numpy/__init__.pxd" */
960
+ """
961
+
962
+
963
+ cdef inline bint is_timedelta64_object(object obj):
964
+ """
965
+ Cython equivalent of `isinstance(obj, np.timedelta64)`
966
+
967
+ Parameters
968
+ ----------
969
+ obj : object
970
+
971
+ Returns
972
+ -------
973
+ bool
974
+ """
975
+ return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)
976
+
977
+
978
+ cdef inline bint is_datetime64_object(object obj):
979
+ """
980
+ Cython equivalent of `isinstance(obj, np.datetime64)`
981
+
982
+ Parameters
983
+ ----------
984
+ obj : object
985
+
986
+ Returns
987
+ -------
988
+ bool
989
+ """
990
+ return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)
991
+
992
+
993
+ cdef inline npy_datetime get_datetime64_value(object obj) nogil:
994
+ """
995
+ returns the int64 value underlying scalar numpy datetime64 object
996
+
997
+ Note that to interpret this as a datetime, the corresponding unit is
998
+ also needed. That can be found using `get_datetime64_unit`.
999
+ """
1000
+ return (<PyDatetimeScalarObject*>obj).obval
1001
+
1002
+
1003
+ cdef inline npy_timedelta get_timedelta64_value(object obj) nogil:
1004
+ """
1005
+ returns the int64 value underlying scalar numpy timedelta64 object
1006
+ """
1007
+ return (<PyTimedeltaScalarObject*>obj).obval
1008
+
1009
+
1010
+ cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:
1011
+ """
1012
+ returns the unit part of the dtype for a numpy datetime64 object.
1013
+ """
1014
+ return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base
.venv/lib/python3.11/site-packages/numpy/_pytesttester.py ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Pytest test running.
3
+
4
+ This module implements the ``test()`` function for NumPy modules. The usual
5
+ boiler plate for doing that is to put the following in the module
6
+ ``__init__.py`` file::
7
+
8
+ from numpy._pytesttester import PytestTester
9
+ test = PytestTester(__name__)
10
+ del PytestTester
11
+
12
+
13
+ Warnings filtering and other runtime settings should be dealt with in the
14
+ ``pytest.ini`` file in the numpy repo root. The behavior of the test depends on
15
+ whether or not that file is found as follows:
16
+
17
+ * ``pytest.ini`` is present (develop mode)
18
+ All warnings except those explicitly filtered out are raised as error.
19
+ * ``pytest.ini`` is absent (release mode)
20
+ DeprecationWarnings and PendingDeprecationWarnings are ignored, other
21
+ warnings are passed through.
22
+
23
+ In practice, tests run from the numpy repo are run in develop mode. That
24
+ includes the standard ``python runtests.py`` invocation.
25
+
26
+ This module is imported by every numpy subpackage, so lies at the top level to
27
+ simplify circular import issues. For the same reason, it contains no numpy
28
+ imports at module scope, instead importing numpy within function calls.
29
+ """
30
+ import sys
31
+ import os
32
+
33
+ __all__ = ['PytestTester']
34
+
35
+
36
+ def _show_numpy_info():
37
+ import numpy as np
38
+
39
+ print("NumPy version %s" % np.__version__)
40
+ relaxed_strides = np.ones((10, 1), order="C").flags.f_contiguous
41
+ print("NumPy relaxed strides checking option:", relaxed_strides)
42
+ info = np.lib.utils._opt_info()
43
+ print("NumPy CPU features: ", (info if info else 'nothing enabled'))
44
+
45
+
46
+ class PytestTester:
47
+ """
48
+ Pytest test runner.
49
+
50
+ A test function is typically added to a package's __init__.py like so::
51
+
52
+ from numpy._pytesttester import PytestTester
53
+ test = PytestTester(__name__).test
54
+ del PytestTester
55
+
56
+ Calling this test function finds and runs all tests associated with the
57
+ module and all its sub-modules.
58
+
59
+ Attributes
60
+ ----------
61
+ module_name : str
62
+ Full path to the package to test.
63
+
64
+ Parameters
65
+ ----------
66
+ module_name : module name
67
+ The name of the module to test.
68
+
69
+ Notes
70
+ -----
71
+ Unlike the previous ``nose``-based implementation, this class is not
72
+ publicly exposed as it performs some ``numpy``-specific warning
73
+ suppression.
74
+
75
+ """
76
+ def __init__(self, module_name):
77
+ self.module_name = module_name
78
+
79
+ def __call__(self, label='fast', verbose=1, extra_argv=None,
80
+ doctests=False, coverage=False, durations=-1, tests=None):
81
+ """
82
+ Run tests for module using pytest.
83
+
84
+ Parameters
85
+ ----------
86
+ label : {'fast', 'full'}, optional
87
+ Identifies the tests to run. When set to 'fast', tests decorated
88
+ with `pytest.mark.slow` are skipped, when 'full', the slow marker
89
+ is ignored.
90
+ verbose : int, optional
91
+ Verbosity value for test outputs, in the range 1-3. Default is 1.
92
+ extra_argv : list, optional
93
+ List with any extra arguments to pass to pytests.
94
+ doctests : bool, optional
95
+ .. note:: Not supported
96
+ coverage : bool, optional
97
+ If True, report coverage of NumPy code. Default is False.
98
+ Requires installation of (pip) pytest-cov.
99
+ durations : int, optional
100
+ If < 0, do nothing, If 0, report time of all tests, if > 0,
101
+ report the time of the slowest `timer` tests. Default is -1.
102
+ tests : test or list of tests
103
+ Tests to be executed with pytest '--pyargs'
104
+
105
+ Returns
106
+ -------
107
+ result : bool
108
+ Return True on success, false otherwise.
109
+
110
+ Notes
111
+ -----
112
+ Each NumPy module exposes `test` in its namespace to run all tests for
113
+ it. For example, to run all tests for numpy.lib:
114
+
115
+ >>> np.lib.test() #doctest: +SKIP
116
+
117
+ Examples
118
+ --------
119
+ >>> result = np.lib.test() #doctest: +SKIP
120
+ ...
121
+ 1023 passed, 2 skipped, 6 deselected, 1 xfailed in 10.39 seconds
122
+ >>> result
123
+ True
124
+
125
+ """
126
+ import pytest
127
+ import warnings
128
+
129
+ module = sys.modules[self.module_name]
130
+ module_path = os.path.abspath(module.__path__[0])
131
+
132
+ # setup the pytest arguments
133
+ pytest_args = ["-l"]
134
+
135
+ # offset verbosity. The "-q" cancels a "-v".
136
+ pytest_args += ["-q"]
137
+
138
+ if sys.version_info < (3, 12):
139
+ with warnings.catch_warnings():
140
+ warnings.simplefilter("always")
141
+ # Filter out distutils cpu warnings (could be localized to
142
+ # distutils tests). ASV has problems with top level import,
143
+ # so fetch module for suppression here.
144
+ from numpy.distutils import cpuinfo
145
+
146
+ with warnings.catch_warnings(record=True):
147
+ # Ignore the warning from importing the array_api submodule. This
148
+ # warning is done on import, so it would break pytest collection,
149
+ # but importing it early here prevents the warning from being
150
+ # issued when it imported again.
151
+ import numpy.array_api
152
+
153
+ # Filter out annoying import messages. Want these in both develop and
154
+ # release mode.
155
+ pytest_args += [
156
+ "-W ignore:Not importing directory",
157
+ "-W ignore:numpy.dtype size changed",
158
+ "-W ignore:numpy.ufunc size changed",
159
+ "-W ignore::UserWarning:cpuinfo",
160
+ ]
161
+
162
+ # When testing matrices, ignore their PendingDeprecationWarnings
163
+ pytest_args += [
164
+ "-W ignore:the matrix subclass is not",
165
+ "-W ignore:Importing from numpy.matlib is",
166
+ ]
167
+
168
+ if doctests:
169
+ pytest_args += ["--doctest-modules"]
170
+
171
+ if extra_argv:
172
+ pytest_args += list(extra_argv)
173
+
174
+ if verbose > 1:
175
+ pytest_args += ["-" + "v"*(verbose - 1)]
176
+
177
+ if coverage:
178
+ pytest_args += ["--cov=" + module_path]
179
+
180
+ if label == "fast":
181
+ # not importing at the top level to avoid circular import of module
182
+ from numpy.testing import IS_PYPY
183
+ if IS_PYPY:
184
+ pytest_args += ["-m", "not slow and not slow_pypy"]
185
+ else:
186
+ pytest_args += ["-m", "not slow"]
187
+
188
+ elif label != "full":
189
+ pytest_args += ["-m", label]
190
+
191
+ if durations >= 0:
192
+ pytest_args += ["--durations=%s" % durations]
193
+
194
+ if tests is None:
195
+ tests = [self.module_name]
196
+
197
+ pytest_args += ["--pyargs"] + list(tests)
198
+
199
+ # run tests.
200
+ _show_numpy_info()
201
+
202
+ try:
203
+ code = pytest.main(pytest_args)
204
+ except SystemExit as exc:
205
+ code = exc.code
206
+
207
+ return code == 0
.venv/lib/python3.11/site-packages/numpy/ctypeslib.pyi ADDED
@@ -0,0 +1,251 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NOTE: Numpy's mypy plugin is used for importing the correct
2
+ # platform-specific `ctypes._SimpleCData[int]` sub-type
3
+ from ctypes import c_int64 as _c_intp
4
+
5
+ import os
6
+ import sys
7
+ import ctypes
8
+ from collections.abc import Iterable, Sequence
9
+ from typing import (
10
+ Literal as L,
11
+ Any,
12
+ Union,
13
+ TypeVar,
14
+ Generic,
15
+ overload,
16
+ ClassVar,
17
+ )
18
+
19
+ from numpy import (
20
+ ndarray,
21
+ dtype,
22
+ generic,
23
+ bool_,
24
+ byte,
25
+ short,
26
+ intc,
27
+ int_,
28
+ longlong,
29
+ ubyte,
30
+ ushort,
31
+ uintc,
32
+ uint,
33
+ ulonglong,
34
+ single,
35
+ double,
36
+ longdouble,
37
+ void,
38
+ )
39
+ from numpy.core._internal import _ctypes
40
+ from numpy.core.multiarray import flagsobj
41
+ from numpy._typing import (
42
+ # Arrays
43
+ NDArray,
44
+ _ArrayLike,
45
+
46
+ # Shapes
47
+ _ShapeLike,
48
+
49
+ # DTypes
50
+ DTypeLike,
51
+ _DTypeLike,
52
+ _VoidDTypeLike,
53
+ _BoolCodes,
54
+ _UByteCodes,
55
+ _UShortCodes,
56
+ _UIntCCodes,
57
+ _UIntCodes,
58
+ _ULongLongCodes,
59
+ _ByteCodes,
60
+ _ShortCodes,
61
+ _IntCCodes,
62
+ _IntCodes,
63
+ _LongLongCodes,
64
+ _SingleCodes,
65
+ _DoubleCodes,
66
+ _LongDoubleCodes,
67
+ )
68
+
69
+ # TODO: Add a proper `_Shape` bound once we've got variadic typevars
70
+ _DType = TypeVar("_DType", bound=dtype[Any])
71
+ _DTypeOptional = TypeVar("_DTypeOptional", bound=None | dtype[Any])
72
+ _SCT = TypeVar("_SCT", bound=generic)
73
+
74
+ _FlagsKind = L[
75
+ 'C_CONTIGUOUS', 'CONTIGUOUS', 'C',
76
+ 'F_CONTIGUOUS', 'FORTRAN', 'F',
77
+ 'ALIGNED', 'A',
78
+ 'WRITEABLE', 'W',
79
+ 'OWNDATA', 'O',
80
+ 'WRITEBACKIFCOPY', 'X',
81
+ ]
82
+
83
+ # TODO: Add a shape typevar once we have variadic typevars (PEP 646)
84
+ class _ndptr(ctypes.c_void_p, Generic[_DTypeOptional]):
85
+ # In practice these 4 classvars are defined in the dynamic class
86
+ # returned by `ndpointer`
87
+ _dtype_: ClassVar[_DTypeOptional]
88
+ _shape_: ClassVar[None]
89
+ _ndim_: ClassVar[None | int]
90
+ _flags_: ClassVar[None | list[_FlagsKind]]
91
+
92
+ @overload
93
+ @classmethod
94
+ def from_param(cls: type[_ndptr[None]], obj: ndarray[Any, Any]) -> _ctypes[Any]: ...
95
+ @overload
96
+ @classmethod
97
+ def from_param(cls: type[_ndptr[_DType]], obj: ndarray[Any, _DType]) -> _ctypes[Any]: ...
98
+
99
+ class _concrete_ndptr(_ndptr[_DType]):
100
+ _dtype_: ClassVar[_DType]
101
+ _shape_: ClassVar[tuple[int, ...]]
102
+ @property
103
+ def contents(self) -> ndarray[Any, _DType]: ...
104
+
105
+ def load_library(
106
+ libname: str | bytes | os.PathLike[str] | os.PathLike[bytes],
107
+ loader_path: str | bytes | os.PathLike[str] | os.PathLike[bytes],
108
+ ) -> ctypes.CDLL: ...
109
+
110
+ __all__: list[str]
111
+
112
+ c_intp = _c_intp
113
+
114
+ @overload
115
+ def ndpointer(
116
+ dtype: None = ...,
117
+ ndim: int = ...,
118
+ shape: None | _ShapeLike = ...,
119
+ flags: None | _FlagsKind | Iterable[_FlagsKind] | int | flagsobj = ...,
120
+ ) -> type[_ndptr[None]]: ...
121
+ @overload
122
+ def ndpointer(
123
+ dtype: _DTypeLike[_SCT],
124
+ ndim: int = ...,
125
+ *,
126
+ shape: _ShapeLike,
127
+ flags: None | _FlagsKind | Iterable[_FlagsKind] | int | flagsobj = ...,
128
+ ) -> type[_concrete_ndptr[dtype[_SCT]]]: ...
129
+ @overload
130
+ def ndpointer(
131
+ dtype: DTypeLike,
132
+ ndim: int = ...,
133
+ *,
134
+ shape: _ShapeLike,
135
+ flags: None | _FlagsKind | Iterable[_FlagsKind] | int | flagsobj = ...,
136
+ ) -> type[_concrete_ndptr[dtype[Any]]]: ...
137
+ @overload
138
+ def ndpointer(
139
+ dtype: _DTypeLike[_SCT],
140
+ ndim: int = ...,
141
+ shape: None = ...,
142
+ flags: None | _FlagsKind | Iterable[_FlagsKind] | int | flagsobj = ...,
143
+ ) -> type[_ndptr[dtype[_SCT]]]: ...
144
+ @overload
145
+ def ndpointer(
146
+ dtype: DTypeLike,
147
+ ndim: int = ...,
148
+ shape: None = ...,
149
+ flags: None | _FlagsKind | Iterable[_FlagsKind] | int | flagsobj = ...,
150
+ ) -> type[_ndptr[dtype[Any]]]: ...
151
+
152
+ @overload
153
+ def as_ctypes_type(dtype: _BoolCodes | _DTypeLike[bool_] | type[ctypes.c_bool]) -> type[ctypes.c_bool]: ...
154
+ @overload
155
+ def as_ctypes_type(dtype: _ByteCodes | _DTypeLike[byte] | type[ctypes.c_byte]) -> type[ctypes.c_byte]: ...
156
+ @overload
157
+ def as_ctypes_type(dtype: _ShortCodes | _DTypeLike[short] | type[ctypes.c_short]) -> type[ctypes.c_short]: ...
158
+ @overload
159
+ def as_ctypes_type(dtype: _IntCCodes | _DTypeLike[intc] | type[ctypes.c_int]) -> type[ctypes.c_int]: ...
160
+ @overload
161
+ def as_ctypes_type(dtype: _IntCodes | _DTypeLike[int_] | type[int | ctypes.c_long]) -> type[ctypes.c_long]: ...
162
+ @overload
163
+ def as_ctypes_type(dtype: _LongLongCodes | _DTypeLike[longlong] | type[ctypes.c_longlong]) -> type[ctypes.c_longlong]: ...
164
+ @overload
165
+ def as_ctypes_type(dtype: _UByteCodes | _DTypeLike[ubyte] | type[ctypes.c_ubyte]) -> type[ctypes.c_ubyte]: ...
166
+ @overload
167
+ def as_ctypes_type(dtype: _UShortCodes | _DTypeLike[ushort] | type[ctypes.c_ushort]) -> type[ctypes.c_ushort]: ...
168
+ @overload
169
+ def as_ctypes_type(dtype: _UIntCCodes | _DTypeLike[uintc] | type[ctypes.c_uint]) -> type[ctypes.c_uint]: ...
170
+ @overload
171
+ def as_ctypes_type(dtype: _UIntCodes | _DTypeLike[uint] | type[ctypes.c_ulong]) -> type[ctypes.c_ulong]: ...
172
+ @overload
173
+ def as_ctypes_type(dtype: _ULongLongCodes | _DTypeLike[ulonglong] | type[ctypes.c_ulonglong]) -> type[ctypes.c_ulonglong]: ...
174
+ @overload
175
+ def as_ctypes_type(dtype: _SingleCodes | _DTypeLike[single] | type[ctypes.c_float]) -> type[ctypes.c_float]: ...
176
+ @overload
177
+ def as_ctypes_type(dtype: _DoubleCodes | _DTypeLike[double] | type[float | ctypes.c_double]) -> type[ctypes.c_double]: ...
178
+ @overload
179
+ def as_ctypes_type(dtype: _LongDoubleCodes | _DTypeLike[longdouble] | type[ctypes.c_longdouble]) -> type[ctypes.c_longdouble]: ...
180
+ @overload
181
+ def as_ctypes_type(dtype: _VoidDTypeLike) -> type[Any]: ... # `ctypes.Union` or `ctypes.Structure`
182
+ @overload
183
+ def as_ctypes_type(dtype: str) -> type[Any]: ...
184
+
185
+ @overload
186
+ def as_array(obj: ctypes._PointerLike, shape: Sequence[int]) -> NDArray[Any]: ...
187
+ @overload
188
+ def as_array(obj: _ArrayLike[_SCT], shape: None | _ShapeLike = ...) -> NDArray[_SCT]: ...
189
+ @overload
190
+ def as_array(obj: object, shape: None | _ShapeLike = ...) -> NDArray[Any]: ...
191
+
192
+ @overload
193
+ def as_ctypes(obj: bool_) -> ctypes.c_bool: ...
194
+ @overload
195
+ def as_ctypes(obj: byte) -> ctypes.c_byte: ...
196
+ @overload
197
+ def as_ctypes(obj: short) -> ctypes.c_short: ...
198
+ @overload
199
+ def as_ctypes(obj: intc) -> ctypes.c_int: ...
200
+ @overload
201
+ def as_ctypes(obj: int_) -> ctypes.c_long: ...
202
+ @overload
203
+ def as_ctypes(obj: longlong) -> ctypes.c_longlong: ...
204
+ @overload
205
+ def as_ctypes(obj: ubyte) -> ctypes.c_ubyte: ...
206
+ @overload
207
+ def as_ctypes(obj: ushort) -> ctypes.c_ushort: ...
208
+ @overload
209
+ def as_ctypes(obj: uintc) -> ctypes.c_uint: ...
210
+ @overload
211
+ def as_ctypes(obj: uint) -> ctypes.c_ulong: ...
212
+ @overload
213
+ def as_ctypes(obj: ulonglong) -> ctypes.c_ulonglong: ...
214
+ @overload
215
+ def as_ctypes(obj: single) -> ctypes.c_float: ...
216
+ @overload
217
+ def as_ctypes(obj: double) -> ctypes.c_double: ...
218
+ @overload
219
+ def as_ctypes(obj: longdouble) -> ctypes.c_longdouble: ...
220
+ @overload
221
+ def as_ctypes(obj: void) -> Any: ... # `ctypes.Union` or `ctypes.Structure`
222
+ @overload
223
+ def as_ctypes(obj: NDArray[bool_]) -> ctypes.Array[ctypes.c_bool]: ...
224
+ @overload
225
+ def as_ctypes(obj: NDArray[byte]) -> ctypes.Array[ctypes.c_byte]: ...
226
+ @overload
227
+ def as_ctypes(obj: NDArray[short]) -> ctypes.Array[ctypes.c_short]: ...
228
+ @overload
229
+ def as_ctypes(obj: NDArray[intc]) -> ctypes.Array[ctypes.c_int]: ...
230
+ @overload
231
+ def as_ctypes(obj: NDArray[int_]) -> ctypes.Array[ctypes.c_long]: ...
232
+ @overload
233
+ def as_ctypes(obj: NDArray[longlong]) -> ctypes.Array[ctypes.c_longlong]: ...
234
+ @overload
235
+ def as_ctypes(obj: NDArray[ubyte]) -> ctypes.Array[ctypes.c_ubyte]: ...
236
+ @overload
237
+ def as_ctypes(obj: NDArray[ushort]) -> ctypes.Array[ctypes.c_ushort]: ...
238
+ @overload
239
+ def as_ctypes(obj: NDArray[uintc]) -> ctypes.Array[ctypes.c_uint]: ...
240
+ @overload
241
+ def as_ctypes(obj: NDArray[uint]) -> ctypes.Array[ctypes.c_ulong]: ...
242
+ @overload
243
+ def as_ctypes(obj: NDArray[ulonglong]) -> ctypes.Array[ctypes.c_ulonglong]: ...
244
+ @overload
245
+ def as_ctypes(obj: NDArray[single]) -> ctypes.Array[ctypes.c_float]: ...
246
+ @overload
247
+ def as_ctypes(obj: NDArray[double]) -> ctypes.Array[ctypes.c_double]: ...
248
+ @overload
249
+ def as_ctypes(obj: NDArray[longdouble]) -> ctypes.Array[ctypes.c_longdouble]: ...
250
+ @overload
251
+ def as_ctypes(obj: NDArray[void]) -> ctypes.Array[Any]: ... # `ctypes.Union` or `ctypes.Structure`
.venv/lib/python3.11/site-packages/numpy/linalg/__init__.py ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ ``numpy.linalg``
3
+ ================
4
+
5
+ The NumPy linear algebra functions rely on BLAS and LAPACK to provide efficient
6
+ low level implementations of standard linear algebra algorithms. Those
7
+ libraries may be provided by NumPy itself using C versions of a subset of their
8
+ reference implementations but, when possible, highly optimized libraries that
9
+ take advantage of specialized processor functionality are preferred. Examples
10
+ of such libraries are OpenBLAS, MKL (TM), and ATLAS. Because those libraries
11
+ are multithreaded and processor dependent, environmental variables and external
12
+ packages such as threadpoolctl may be needed to control the number of threads
13
+ or specify the processor architecture.
14
+
15
+ - OpenBLAS: https://www.openblas.net/
16
+ - threadpoolctl: https://github.com/joblib/threadpoolctl
17
+
18
+ Please note that the most-used linear algebra functions in NumPy are present in
19
+ the main ``numpy`` namespace rather than in ``numpy.linalg``. There are:
20
+ ``dot``, ``vdot``, ``inner``, ``outer``, ``matmul``, ``tensordot``, ``einsum``,
21
+ ``einsum_path`` and ``kron``.
22
+
23
+ Functions present in numpy.linalg are listed below.
24
+
25
+
26
+ Matrix and vector products
27
+ --------------------------
28
+
29
+ multi_dot
30
+ matrix_power
31
+
32
+ Decompositions
33
+ --------------
34
+
35
+ cholesky
36
+ qr
37
+ svd
38
+
39
+ Matrix eigenvalues
40
+ ------------------
41
+
42
+ eig
43
+ eigh
44
+ eigvals
45
+ eigvalsh
46
+
47
+ Norms and other numbers
48
+ -----------------------
49
+
50
+ norm
51
+ cond
52
+ det
53
+ matrix_rank
54
+ slogdet
55
+
56
+ Solving equations and inverting matrices
57
+ ----------------------------------------
58
+
59
+ solve
60
+ tensorsolve
61
+ lstsq
62
+ inv
63
+ pinv
64
+ tensorinv
65
+
66
+ Exceptions
67
+ ----------
68
+
69
+ LinAlgError
70
+
71
+ """
72
+ # To get sub-modules
73
+ from . import linalg
74
+ from .linalg import *
75
+
76
+ __all__ = linalg.__all__.copy()
77
+
78
+ from numpy._pytesttester import PytestTester
79
+ test = PytestTester(__name__)
80
+ del PytestTester
.venv/lib/python3.11/site-packages/numpy/matlib.py ADDED
@@ -0,0 +1,378 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import warnings
2
+
3
+ # 2018-05-29, PendingDeprecationWarning added to matrix.__new__
4
+ # 2020-01-23, numpy 1.19.0 PendingDeprecatonWarning
5
+ warnings.warn("Importing from numpy.matlib is deprecated since 1.19.0. "
6
+ "The matrix subclass is not the recommended way to represent "
7
+ "matrices or deal with linear algebra (see "
8
+ "https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). "
9
+ "Please adjust your code to use regular ndarray. ",
10
+ PendingDeprecationWarning, stacklevel=2)
11
+
12
+ import numpy as np
13
+ from numpy.matrixlib.defmatrix import matrix, asmatrix
14
+ # Matlib.py contains all functions in the numpy namespace with a few
15
+ # replacements. See doc/source/reference/routines.matlib.rst for details.
16
+ # Need * as we're copying the numpy namespace.
17
+ from numpy import * # noqa: F403
18
+
19
+ __version__ = np.__version__
20
+
21
+ __all__ = np.__all__[:] # copy numpy namespace
22
+ __all__ += ['rand', 'randn', 'repmat']
23
+
24
+ def empty(shape, dtype=None, order='C'):
25
+ """Return a new matrix of given shape and type, without initializing entries.
26
+
27
+ Parameters
28
+ ----------
29
+ shape : int or tuple of int
30
+ Shape of the empty matrix.
31
+ dtype : data-type, optional
32
+ Desired output data-type.
33
+ order : {'C', 'F'}, optional
34
+ Whether to store multi-dimensional data in row-major
35
+ (C-style) or column-major (Fortran-style) order in
36
+ memory.
37
+
38
+ See Also
39
+ --------
40
+ empty_like, zeros
41
+
42
+ Notes
43
+ -----
44
+ `empty`, unlike `zeros`, does not set the matrix values to zero,
45
+ and may therefore be marginally faster. On the other hand, it requires
46
+ the user to manually set all the values in the array, and should be
47
+ used with caution.
48
+
49
+ Examples
50
+ --------
51
+ >>> import numpy.matlib
52
+ >>> np.matlib.empty((2, 2)) # filled with random data
53
+ matrix([[ 6.76425276e-320, 9.79033856e-307], # random
54
+ [ 7.39337286e-309, 3.22135945e-309]])
55
+ >>> np.matlib.empty((2, 2), dtype=int)
56
+ matrix([[ 6600475, 0], # random
57
+ [ 6586976, 22740995]])
58
+
59
+ """
60
+ return ndarray.__new__(matrix, shape, dtype, order=order)
61
+
62
+ def ones(shape, dtype=None, order='C'):
63
+ """
64
+ Matrix of ones.
65
+
66
+ Return a matrix of given shape and type, filled with ones.
67
+
68
+ Parameters
69
+ ----------
70
+ shape : {sequence of ints, int}
71
+ Shape of the matrix
72
+ dtype : data-type, optional
73
+ The desired data-type for the matrix, default is np.float64.
74
+ order : {'C', 'F'}, optional
75
+ Whether to store matrix in C- or Fortran-contiguous order,
76
+ default is 'C'.
77
+
78
+ Returns
79
+ -------
80
+ out : matrix
81
+ Matrix of ones of given shape, dtype, and order.
82
+
83
+ See Also
84
+ --------
85
+ ones : Array of ones.
86
+ matlib.zeros : Zero matrix.
87
+
88
+ Notes
89
+ -----
90
+ If `shape` has length one i.e. ``(N,)``, or is a scalar ``N``,
91
+ `out` becomes a single row matrix of shape ``(1,N)``.
92
+
93
+ Examples
94
+ --------
95
+ >>> np.matlib.ones((2,3))
96
+ matrix([[1., 1., 1.],
97
+ [1., 1., 1.]])
98
+
99
+ >>> np.matlib.ones(2)
100
+ matrix([[1., 1.]])
101
+
102
+ """
103
+ a = ndarray.__new__(matrix, shape, dtype, order=order)
104
+ a.fill(1)
105
+ return a
106
+
107
+ def zeros(shape, dtype=None, order='C'):
108
+ """
109
+ Return a matrix of given shape and type, filled with zeros.
110
+
111
+ Parameters
112
+ ----------
113
+ shape : int or sequence of ints
114
+ Shape of the matrix
115
+ dtype : data-type, optional
116
+ The desired data-type for the matrix, default is float.
117
+ order : {'C', 'F'}, optional
118
+ Whether to store the result in C- or Fortran-contiguous order,
119
+ default is 'C'.
120
+
121
+ Returns
122
+ -------
123
+ out : matrix
124
+ Zero matrix of given shape, dtype, and order.
125
+
126
+ See Also
127
+ --------
128
+ numpy.zeros : Equivalent array function.
129
+ matlib.ones : Return a matrix of ones.
130
+
131
+ Notes
132
+ -----
133
+ If `shape` has length one i.e. ``(N,)``, or is a scalar ``N``,
134
+ `out` becomes a single row matrix of shape ``(1,N)``.
135
+
136
+ Examples
137
+ --------
138
+ >>> import numpy.matlib
139
+ >>> np.matlib.zeros((2, 3))
140
+ matrix([[0., 0., 0.],
141
+ [0., 0., 0.]])
142
+
143
+ >>> np.matlib.zeros(2)
144
+ matrix([[0., 0.]])
145
+
146
+ """
147
+ a = ndarray.__new__(matrix, shape, dtype, order=order)
148
+ a.fill(0)
149
+ return a
150
+
151
+ def identity(n,dtype=None):
152
+ """
153
+ Returns the square identity matrix of given size.
154
+
155
+ Parameters
156
+ ----------
157
+ n : int
158
+ Size of the returned identity matrix.
159
+ dtype : data-type, optional
160
+ Data-type of the output. Defaults to ``float``.
161
+
162
+ Returns
163
+ -------
164
+ out : matrix
165
+ `n` x `n` matrix with its main diagonal set to one,
166
+ and all other elements zero.
167
+
168
+ See Also
169
+ --------
170
+ numpy.identity : Equivalent array function.
171
+ matlib.eye : More general matrix identity function.
172
+
173
+ Examples
174
+ --------
175
+ >>> import numpy.matlib
176
+ >>> np.matlib.identity(3, dtype=int)
177
+ matrix([[1, 0, 0],
178
+ [0, 1, 0],
179
+ [0, 0, 1]])
180
+
181
+ """
182
+ a = array([1]+n*[0], dtype=dtype)
183
+ b = empty((n, n), dtype=dtype)
184
+ b.flat = a
185
+ return b
186
+
187
+ def eye(n,M=None, k=0, dtype=float, order='C'):
188
+ """
189
+ Return a matrix with ones on the diagonal and zeros elsewhere.
190
+
191
+ Parameters
192
+ ----------
193
+ n : int
194
+ Number of rows in the output.
195
+ M : int, optional
196
+ Number of columns in the output, defaults to `n`.
197
+ k : int, optional
198
+ Index of the diagonal: 0 refers to the main diagonal,
199
+ a positive value refers to an upper diagonal,
200
+ and a negative value to a lower diagonal.
201
+ dtype : dtype, optional
202
+ Data-type of the returned matrix.
203
+ order : {'C', 'F'}, optional
204
+ Whether the output should be stored in row-major (C-style) or
205
+ column-major (Fortran-style) order in memory.
206
+
207
+ .. versionadded:: 1.14.0
208
+
209
+ Returns
210
+ -------
211
+ I : matrix
212
+ A `n` x `M` matrix where all elements are equal to zero,
213
+ except for the `k`-th diagonal, whose values are equal to one.
214
+
215
+ See Also
216
+ --------
217
+ numpy.eye : Equivalent array function.
218
+ identity : Square identity matrix.
219
+
220
+ Examples
221
+ --------
222
+ >>> import numpy.matlib
223
+ >>> np.matlib.eye(3, k=1, dtype=float)
224
+ matrix([[0., 1., 0.],
225
+ [0., 0., 1.],
226
+ [0., 0., 0.]])
227
+
228
+ """
229
+ return asmatrix(np.eye(n, M=M, k=k, dtype=dtype, order=order))
230
+
231
+ def rand(*args):
232
+ """
233
+ Return a matrix of random values with given shape.
234
+
235
+ Create a matrix of the given shape and propagate it with
236
+ random samples from a uniform distribution over ``[0, 1)``.
237
+
238
+ Parameters
239
+ ----------
240
+ \\*args : Arguments
241
+ Shape of the output.
242
+ If given as N integers, each integer specifies the size of one
243
+ dimension.
244
+ If given as a tuple, this tuple gives the complete shape.
245
+
246
+ Returns
247
+ -------
248
+ out : ndarray
249
+ The matrix of random values with shape given by `\\*args`.
250
+
251
+ See Also
252
+ --------
253
+ randn, numpy.random.RandomState.rand
254
+
255
+ Examples
256
+ --------
257
+ >>> np.random.seed(123)
258
+ >>> import numpy.matlib
259
+ >>> np.matlib.rand(2, 3)
260
+ matrix([[0.69646919, 0.28613933, 0.22685145],
261
+ [0.55131477, 0.71946897, 0.42310646]])
262
+ >>> np.matlib.rand((2, 3))
263
+ matrix([[0.9807642 , 0.68482974, 0.4809319 ],
264
+ [0.39211752, 0.34317802, 0.72904971]])
265
+
266
+ If the first argument is a tuple, other arguments are ignored:
267
+
268
+ >>> np.matlib.rand((2, 3), 4)
269
+ matrix([[0.43857224, 0.0596779 , 0.39804426],
270
+ [0.73799541, 0.18249173, 0.17545176]])
271
+
272
+ """
273
+ if isinstance(args[0], tuple):
274
+ args = args[0]
275
+ return asmatrix(np.random.rand(*args))
276
+
277
+ def randn(*args):
278
+ """
279
+ Return a random matrix with data from the "standard normal" distribution.
280
+
281
+ `randn` generates a matrix filled with random floats sampled from a
282
+ univariate "normal" (Gaussian) distribution of mean 0 and variance 1.
283
+
284
+ Parameters
285
+ ----------
286
+ \\*args : Arguments
287
+ Shape of the output.
288
+ If given as N integers, each integer specifies the size of one
289
+ dimension. If given as a tuple, this tuple gives the complete shape.
290
+
291
+ Returns
292
+ -------
293
+ Z : matrix of floats
294
+ A matrix of floating-point samples drawn from the standard normal
295
+ distribution.
296
+
297
+ See Also
298
+ --------
299
+ rand, numpy.random.RandomState.randn
300
+
301
+ Notes
302
+ -----
303
+ For random samples from the normal distribution with mean ``mu`` and
304
+ standard deviation ``sigma``, use::
305
+
306
+ sigma * np.matlib.randn(...) + mu
307
+
308
+ Examples
309
+ --------
310
+ >>> np.random.seed(123)
311
+ >>> import numpy.matlib
312
+ >>> np.matlib.randn(1)
313
+ matrix([[-1.0856306]])
314
+ >>> np.matlib.randn(1, 2, 3)
315
+ matrix([[ 0.99734545, 0.2829785 , -1.50629471],
316
+ [-0.57860025, 1.65143654, -2.42667924]])
317
+
318
+ Two-by-four matrix of samples from the normal distribution with
319
+ mean 3 and standard deviation 2.5:
320
+
321
+ >>> 2.5 * np.matlib.randn((2, 4)) + 3
322
+ matrix([[1.92771843, 6.16484065, 0.83314899, 1.30278462],
323
+ [2.76322758, 6.72847407, 1.40274501, 1.8900451 ]])
324
+
325
+ """
326
+ if isinstance(args[0], tuple):
327
+ args = args[0]
328
+ return asmatrix(np.random.randn(*args))
329
+
330
+ def repmat(a, m, n):
331
+ """
332
+ Repeat a 0-D to 2-D array or matrix MxN times.
333
+
334
+ Parameters
335
+ ----------
336
+ a : array_like
337
+ The array or matrix to be repeated.
338
+ m, n : int
339
+ The number of times `a` is repeated along the first and second axes.
340
+
341
+ Returns
342
+ -------
343
+ out : ndarray
344
+ The result of repeating `a`.
345
+
346
+ Examples
347
+ --------
348
+ >>> import numpy.matlib
349
+ >>> a0 = np.array(1)
350
+ >>> np.matlib.repmat(a0, 2, 3)
351
+ array([[1, 1, 1],
352
+ [1, 1, 1]])
353
+
354
+ >>> a1 = np.arange(4)
355
+ >>> np.matlib.repmat(a1, 2, 2)
356
+ array([[0, 1, 2, 3, 0, 1, 2, 3],
357
+ [0, 1, 2, 3, 0, 1, 2, 3]])
358
+
359
+ >>> a2 = np.asmatrix(np.arange(6).reshape(2, 3))
360
+ >>> np.matlib.repmat(a2, 2, 3)
361
+ matrix([[0, 1, 2, 0, 1, 2, 0, 1, 2],
362
+ [3, 4, 5, 3, 4, 5, 3, 4, 5],
363
+ [0, 1, 2, 0, 1, 2, 0, 1, 2],
364
+ [3, 4, 5, 3, 4, 5, 3, 4, 5]])
365
+
366
+ """
367
+ a = asanyarray(a)
368
+ ndim = a.ndim
369
+ if ndim == 0:
370
+ origrows, origcols = (1, 1)
371
+ elif ndim == 1:
372
+ origrows, origcols = (1, a.shape[0])
373
+ else:
374
+ origrows, origcols = a.shape
375
+ rows = origrows * m
376
+ cols = origcols * n
377
+ c = a.reshape(1, a.size).repeat(m, 0).reshape(rows, origcols).repeat(n, 0)
378
+ return c.reshape(rows, cols)
.venv/lib/python3.11/site-packages/retrying.py ADDED
@@ -0,0 +1,346 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2013-2014 Ray Holder
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ import logging
15
+ import random
16
+ import sys
17
+ import time
18
+ import traceback
19
+ from functools import wraps
20
+
21
+ # sys.maxint / 2, since Python 3.2 doesn't have a sys.maxint...
22
+ MAX_WAIT = 1073741823
23
+
24
+
25
+ def _retry_if_exception_of_type(retryable_types):
26
+ def _retry_if_exception_these_types(exception):
27
+ return isinstance(exception, retryable_types)
28
+
29
+ return _retry_if_exception_these_types
30
+
31
+
32
+ def retry(*dargs, **dkw):
33
+ """
34
+ Decorator function that instantiates the Retrying object
35
+ @param *dargs: positional arguments passed to Retrying object
36
+ @param **dkw: keyword arguments passed to the Retrying object
37
+ """
38
+ # support both @retry and @retry() as valid syntax
39
+ if len(dargs) == 1 and callable(dargs[0]):
40
+
41
+ def wrap_simple(f):
42
+ @wraps(f)
43
+ def wrapped_f(*args, **kw):
44
+ return Retrying().call(f, *args, **kw)
45
+
46
+ return wrapped_f
47
+
48
+ return wrap_simple(dargs[0])
49
+
50
+ else:
51
+
52
+ def wrap(f):
53
+ @wraps(f)
54
+ def wrapped_f(*args, **kw):
55
+ return Retrying(*dargs, **dkw).call(f, *args, **kw)
56
+
57
+ return wrapped_f
58
+
59
+ return wrap
60
+
61
+ _default_logger = None
62
+ _configured_null_logger = False
63
+
64
+ def _pick_logger(logger=None):
65
+ # Factor this logic out into a smaller function so that `global` only needs to be here,
66
+ # not the large __init__ function.
67
+ global _default_logger, _configured_null_logger
68
+
69
+ if logger in (True, None):
70
+ if _default_logger is None:
71
+ _default_logger = logging.getLogger(__name__)
72
+ # Only add the null handler once, not every time we get the logger
73
+ if logger is None and not _configured_null_logger:
74
+ _configured_null_logger = True
75
+ _default_logger.addHandler(logging.NullHandler())
76
+ _default_logger.propagate = False
77
+ return _default_logger
78
+ else: # Not None (and not True) -> must have supplied a logger. Just use that.
79
+ return logger
80
+
81
+
82
+ class Retrying(object):
83
+ def __init__(
84
+ self,
85
+ stop=None,
86
+ wait=None,
87
+ stop_max_attempt_number=None,
88
+ stop_max_delay=None,
89
+ wait_fixed=None,
90
+ wait_random_min=None,
91
+ wait_random_max=None,
92
+ wait_incrementing_start=None,
93
+ wait_incrementing_increment=None,
94
+ wait_incrementing_max=None,
95
+ wait_exponential_multiplier=None,
96
+ wait_exponential_max=None,
97
+ retry_on_exception=None,
98
+ retry_on_result=None,
99
+ wrap_exception=False,
100
+ stop_func=None,
101
+ wait_func=None,
102
+ wait_jitter_max=None,
103
+ before_attempts=None,
104
+ after_attempts=None,
105
+ logger=None,
106
+ ):
107
+
108
+ self._stop_max_attempt_number = (
109
+ 5 if stop_max_attempt_number is None else stop_max_attempt_number
110
+ )
111
+ self._stop_max_delay = 100 if stop_max_delay is None else stop_max_delay
112
+ self._wait_fixed = 1000 if wait_fixed is None else wait_fixed
113
+ self._wait_random_min = 0 if wait_random_min is None else wait_random_min
114
+ self._wait_random_max = 1000 if wait_random_max is None else wait_random_max
115
+ self._wait_incrementing_start = (
116
+ 0 if wait_incrementing_start is None else wait_incrementing_start
117
+ )
118
+ self._wait_incrementing_increment = (
119
+ 100 if wait_incrementing_increment is None else wait_incrementing_increment
120
+ )
121
+ self._wait_exponential_multiplier = (
122
+ 1 if wait_exponential_multiplier is None else wait_exponential_multiplier
123
+ )
124
+ self._wait_exponential_max = (
125
+ MAX_WAIT if wait_exponential_max is None else wait_exponential_max
126
+ )
127
+ self._wait_incrementing_max = (
128
+ MAX_WAIT if wait_incrementing_max is None else wait_incrementing_max
129
+ )
130
+ self._wait_jitter_max = 0 if wait_jitter_max is None else wait_jitter_max
131
+ self._before_attempts = before_attempts
132
+ self._after_attempts = after_attempts
133
+
134
+ self._logger = _pick_logger(logger)
135
+
136
+ # TODO add chaining of stop behaviors
137
+ # stop behavior
138
+ stop_funcs = []
139
+ if stop_max_attempt_number is not None:
140
+ stop_funcs.append(self.stop_after_attempt)
141
+
142
+ if stop_max_delay is not None:
143
+ stop_funcs.append(self.stop_after_delay)
144
+
145
+ if stop_func is not None:
146
+ self.stop = stop_func
147
+
148
+ elif stop is None:
149
+ self.stop = lambda attempts, delay: any(
150
+ f(attempts, delay) for f in stop_funcs
151
+ )
152
+
153
+ else:
154
+ self.stop = getattr(self, stop)
155
+
156
+ # TODO add chaining of wait behaviors
157
+ # wait behavior
158
+ wait_funcs = [lambda *args, **kwargs: 0]
159
+ if wait_fixed is not None:
160
+ wait_funcs.append(self.fixed_sleep)
161
+
162
+ if wait_random_min is not None or wait_random_max is not None:
163
+ wait_funcs.append(self.random_sleep)
164
+
165
+ if (
166
+ wait_incrementing_start is not None
167
+ or wait_incrementing_increment is not None
168
+ ):
169
+ wait_funcs.append(self.incrementing_sleep)
170
+
171
+ if wait_exponential_multiplier is not None or wait_exponential_max is not None:
172
+ wait_funcs.append(self.exponential_sleep)
173
+
174
+ if wait_func is not None:
175
+ self.wait = wait_func
176
+
177
+ elif wait is None:
178
+ self.wait = lambda attempts, delay: max(
179
+ f(attempts, delay) for f in wait_funcs
180
+ )
181
+
182
+ else:
183
+ self.wait = getattr(self, wait)
184
+
185
+ # retry on exception filter
186
+ if retry_on_exception is None:
187
+ self._retry_on_exception = self.always_reject
188
+ else:
189
+ # this allows for providing a tuple of exception types that
190
+ # should be allowed to retry on, and avoids having to create
191
+ # a callback that does the same thing
192
+ if isinstance(retry_on_exception, (tuple, Exception)):
193
+ retry_on_exception = _retry_if_exception_of_type(retry_on_exception)
194
+ self._retry_on_exception = retry_on_exception
195
+
196
+ # retry on result filter
197
+ if retry_on_result is None:
198
+ self._retry_on_result = self.never_reject
199
+ else:
200
+ self._retry_on_result = retry_on_result
201
+
202
+ self._wrap_exception = wrap_exception
203
+
204
+ def stop_after_attempt(self, previous_attempt_number, delay_since_first_attempt_ms):
205
+ """Stop after the previous attempt >= stop_max_attempt_number."""
206
+ return previous_attempt_number >= self._stop_max_attempt_number
207
+
208
+ def stop_after_delay(self, previous_attempt_number, delay_since_first_attempt_ms):
209
+ """Stop after the time from the first attempt >= stop_max_delay."""
210
+ return delay_since_first_attempt_ms >= self._stop_max_delay
211
+
212
+ @staticmethod
213
+ def no_sleep(previous_attempt_number, delay_since_first_attempt_ms):
214
+ """Don't sleep at all before retrying."""
215
+ return 0
216
+
217
+ def fixed_sleep(self, previous_attempt_number, delay_since_first_attempt_ms):
218
+ """Sleep a fixed amount of time between each retry."""
219
+ return self._wait_fixed
220
+
221
+ def random_sleep(self, previous_attempt_number, delay_since_first_attempt_ms):
222
+ """Sleep a random amount of time between wait_random_min and wait_random_max"""
223
+ return random.randint(self._wait_random_min, self._wait_random_max)
224
+
225
+ def incrementing_sleep(self, previous_attempt_number, delay_since_first_attempt_ms):
226
+ """
227
+ Sleep an incremental amount of time after each attempt, starting at
228
+ wait_incrementing_start and incrementing by wait_incrementing_increment
229
+ """
230
+ result = self._wait_incrementing_start + (
231
+ self._wait_incrementing_increment * (previous_attempt_number - 1)
232
+ )
233
+ if result > self._wait_incrementing_max:
234
+ result = self._wait_incrementing_max
235
+ if result < 0:
236
+ result = 0
237
+ return result
238
+
239
+ def exponential_sleep(self, previous_attempt_number, delay_since_first_attempt_ms):
240
+ exp = 2**previous_attempt_number
241
+ result = self._wait_exponential_multiplier * exp
242
+ if result > self._wait_exponential_max:
243
+ result = self._wait_exponential_max
244
+ if result < 0:
245
+ result = 0
246
+ return result
247
+
248
+ @staticmethod
249
+ def never_reject(result):
250
+ return False
251
+
252
+ @staticmethod
253
+ def always_reject(result):
254
+ return True
255
+
256
+ def should_reject(self, attempt):
257
+ reject = False
258
+ if attempt.has_exception:
259
+ reject |= self._retry_on_exception(attempt.value[1])
260
+ else:
261
+ reject |= self._retry_on_result(attempt.value)
262
+
263
+ return reject
264
+
265
+ def call(self, fn, *args, **kwargs):
266
+ start_time = int(round(time.time() * 1000))
267
+ attempt_number = 1
268
+ while True:
269
+ if self._before_attempts:
270
+ self._before_attempts(attempt_number)
271
+
272
+ try:
273
+ attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
274
+ except Exception:
275
+ tb = sys.exc_info()
276
+ attempt = Attempt(tb, attempt_number, True)
277
+
278
+ if not self.should_reject(attempt):
279
+ return attempt.get(self._wrap_exception)
280
+
281
+ self._logger.warning(attempt)
282
+ if self._after_attempts:
283
+ self._after_attempts(attempt_number)
284
+
285
+ delay_since_first_attempt_ms = int(round(time.time() * 1000)) - start_time
286
+ if self.stop(attempt_number, delay_since_first_attempt_ms):
287
+ if not self._wrap_exception and attempt.has_exception:
288
+ # get() on an attempt with an exception should cause it to be raised, but raise just in case
289
+ raise attempt.get()
290
+ else:
291
+ raise RetryError(attempt)
292
+ else:
293
+ sleep = self.wait(attempt_number, delay_since_first_attempt_ms)
294
+ if self._wait_jitter_max:
295
+ jitter = random.random() * self._wait_jitter_max
296
+ sleep = sleep + max(0, jitter)
297
+ self._logger.info(f"Retrying in {sleep / 1000.0:.2f} seconds.")
298
+ time.sleep(sleep / 1000.0)
299
+
300
+ attempt_number += 1
301
+
302
+
303
+ class Attempt(object):
304
+ """
305
+ An Attempt encapsulates a call to a target function that may end as a
306
+ normal return value from the function or an Exception depending on what
307
+ occurred during the execution.
308
+ """
309
+
310
+ def __init__(self, value, attempt_number, has_exception):
311
+ self.value = value
312
+ self.attempt_number = attempt_number
313
+ self.has_exception = has_exception
314
+
315
+ def get(self, wrap_exception=False):
316
+ """
317
+ Return the return value of this Attempt instance or raise an Exception.
318
+ If wrap_exception is true, this Attempt is wrapped inside of a
319
+ RetryError before being raised.
320
+ """
321
+ if self.has_exception:
322
+ if wrap_exception:
323
+ raise RetryError(self)
324
+ else:
325
+ exc_type, exc, tb = self.value
326
+ raise exc.with_traceback(tb)
327
+ else:
328
+ return self.value
329
+
330
+ def __repr__(self):
331
+ if self.has_exception:
332
+ return f"Attempts: {self.attempt_number}, Error:\n{''.join(traceback.format_tb(self.value[2]))}"
333
+ else:
334
+ return f"Attempts: {self.attempt_number}, Value: {self.value}"
335
+
336
+
337
+ class RetryError(Exception):
338
+ """
339
+ A RetryError encapsulates the last Attempt instance right before giving up.
340
+ """
341
+
342
+ def __init__(self, last_attempt):
343
+ self.last_attempt = last_attempt
344
+
345
+ def __str__(self):
346
+ return f"RetryError[{self.last_attempt}]"
.venv/lib/python3.11/site-packages/six.py ADDED
@@ -0,0 +1,1003 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) 2010-2024 Benjamin Peterson
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+ #
10
+ # The above copyright notice and this permission notice shall be included in all
11
+ # copies or substantial portions of the Software.
12
+ #
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ # SOFTWARE.
20
+
21
+ """Utilities for writing code that runs on Python 2 and 3"""
22
+
23
+ from __future__ import absolute_import
24
+
25
+ import functools
26
+ import itertools
27
+ import operator
28
+ import sys
29
+ import types
30
+
31
+ __author__ = "Benjamin Peterson <benjamin@python.org>"
32
+ __version__ = "1.17.0"
33
+
34
+
35
+ # Useful for very coarse version differentiation.
36
+ PY2 = sys.version_info[0] == 2
37
+ PY3 = sys.version_info[0] == 3
38
+ PY34 = sys.version_info[0:2] >= (3, 4)
39
+
40
+ if PY3:
41
+ string_types = str,
42
+ integer_types = int,
43
+ class_types = type,
44
+ text_type = str
45
+ binary_type = bytes
46
+
47
+ MAXSIZE = sys.maxsize
48
+ else:
49
+ string_types = basestring,
50
+ integer_types = (int, long)
51
+ class_types = (type, types.ClassType)
52
+ text_type = unicode
53
+ binary_type = str
54
+
55
+ if sys.platform.startswith("java"):
56
+ # Jython always uses 32 bits.
57
+ MAXSIZE = int((1 << 31) - 1)
58
+ else:
59
+ # It's possible to have sizeof(long) != sizeof(Py_ssize_t).
60
+ class X(object):
61
+
62
+ def __len__(self):
63
+ return 1 << 31
64
+ try:
65
+ len(X())
66
+ except OverflowError:
67
+ # 32-bit
68
+ MAXSIZE = int((1 << 31) - 1)
69
+ else:
70
+ # 64-bit
71
+ MAXSIZE = int((1 << 63) - 1)
72
+ del X
73
+
74
+ if PY34:
75
+ from importlib.util import spec_from_loader
76
+ else:
77
+ spec_from_loader = None
78
+
79
+
80
+ def _add_doc(func, doc):
81
+ """Add documentation to a function."""
82
+ func.__doc__ = doc
83
+
84
+
85
+ def _import_module(name):
86
+ """Import module, returning the module after the last dot."""
87
+ __import__(name)
88
+ return sys.modules[name]
89
+
90
+
91
+ class _LazyDescr(object):
92
+
93
+ def __init__(self, name):
94
+ self.name = name
95
+
96
+ def __get__(self, obj, tp):
97
+ result = self._resolve()
98
+ setattr(obj, self.name, result) # Invokes __set__.
99
+ try:
100
+ # This is a bit ugly, but it avoids running this again by
101
+ # removing this descriptor.
102
+ delattr(obj.__class__, self.name)
103
+ except AttributeError:
104
+ pass
105
+ return result
106
+
107
+
108
+ class MovedModule(_LazyDescr):
109
+
110
+ def __init__(self, name, old, new=None):
111
+ super(MovedModule, self).__init__(name)
112
+ if PY3:
113
+ if new is None:
114
+ new = name
115
+ self.mod = new
116
+ else:
117
+ self.mod = old
118
+
119
+ def _resolve(self):
120
+ return _import_module(self.mod)
121
+
122
+ def __getattr__(self, attr):
123
+ _module = self._resolve()
124
+ value = getattr(_module, attr)
125
+ setattr(self, attr, value)
126
+ return value
127
+
128
+
129
+ class _LazyModule(types.ModuleType):
130
+
131
+ def __init__(self, name):
132
+ super(_LazyModule, self).__init__(name)
133
+ self.__doc__ = self.__class__.__doc__
134
+
135
+ def __dir__(self):
136
+ attrs = ["__doc__", "__name__"]
137
+ attrs += [attr.name for attr in self._moved_attributes]
138
+ return attrs
139
+
140
+ # Subclasses should override this
141
+ _moved_attributes = []
142
+
143
+
144
+ class MovedAttribute(_LazyDescr):
145
+
146
+ def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None):
147
+ super(MovedAttribute, self).__init__(name)
148
+ if PY3:
149
+ if new_mod is None:
150
+ new_mod = name
151
+ self.mod = new_mod
152
+ if new_attr is None:
153
+ if old_attr is None:
154
+ new_attr = name
155
+ else:
156
+ new_attr = old_attr
157
+ self.attr = new_attr
158
+ else:
159
+ self.mod = old_mod
160
+ if old_attr is None:
161
+ old_attr = name
162
+ self.attr = old_attr
163
+
164
+ def _resolve(self):
165
+ module = _import_module(self.mod)
166
+ return getattr(module, self.attr)
167
+
168
+
169
+ class _SixMetaPathImporter(object):
170
+
171
+ """
172
+ A meta path importer to import six.moves and its submodules.
173
+
174
+ This class implements a PEP302 finder and loader. It should be compatible
175
+ with Python 2.5 and all existing versions of Python3
176
+ """
177
+
178
+ def __init__(self, six_module_name):
179
+ self.name = six_module_name
180
+ self.known_modules = {}
181
+
182
+ def _add_module(self, mod, *fullnames):
183
+ for fullname in fullnames:
184
+ self.known_modules[self.name + "." + fullname] = mod
185
+
186
+ def _get_module(self, fullname):
187
+ return self.known_modules[self.name + "." + fullname]
188
+
189
+ def find_module(self, fullname, path=None):
190
+ if fullname in self.known_modules:
191
+ return self
192
+ return None
193
+
194
+ def find_spec(self, fullname, path, target=None):
195
+ if fullname in self.known_modules:
196
+ return spec_from_loader(fullname, self)
197
+ return None
198
+
199
+ def __get_module(self, fullname):
200
+ try:
201
+ return self.known_modules[fullname]
202
+ except KeyError:
203
+ raise ImportError("This loader does not know module " + fullname)
204
+
205
+ def load_module(self, fullname):
206
+ try:
207
+ # in case of a reload
208
+ return sys.modules[fullname]
209
+ except KeyError:
210
+ pass
211
+ mod = self.__get_module(fullname)
212
+ if isinstance(mod, MovedModule):
213
+ mod = mod._resolve()
214
+ else:
215
+ mod.__loader__ = self
216
+ sys.modules[fullname] = mod
217
+ return mod
218
+
219
+ def is_package(self, fullname):
220
+ """
221
+ Return true, if the named module is a package.
222
+
223
+ We need this method to get correct spec objects with
224
+ Python 3.4 (see PEP451)
225
+ """
226
+ return hasattr(self.__get_module(fullname), "__path__")
227
+
228
+ def get_code(self, fullname):
229
+ """Return None
230
+
231
+ Required, if is_package is implemented"""
232
+ self.__get_module(fullname) # eventually raises ImportError
233
+ return None
234
+ get_source = get_code # same as get_code
235
+
236
+ def create_module(self, spec):
237
+ return self.load_module(spec.name)
238
+
239
+ def exec_module(self, module):
240
+ pass
241
+
242
+ _importer = _SixMetaPathImporter(__name__)
243
+
244
+
245
+ class _MovedItems(_LazyModule):
246
+
247
+ """Lazy loading of moved objects"""
248
+ __path__ = [] # mark as package
249
+
250
+
251
+ _moved_attributes = [
252
+ MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"),
253
+ MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"),
254
+ MovedAttribute("filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"),
255
+ MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"),
256
+ MovedAttribute("intern", "__builtin__", "sys"),
257
+ MovedAttribute("map", "itertools", "builtins", "imap", "map"),
258
+ MovedAttribute("getcwd", "os", "os", "getcwdu", "getcwd"),
259
+ MovedAttribute("getcwdb", "os", "os", "getcwd", "getcwdb"),
260
+ MovedAttribute("getoutput", "commands", "subprocess"),
261
+ MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"),
262
+ MovedAttribute("reload_module", "__builtin__", "importlib" if PY34 else "imp", "reload"),
263
+ MovedAttribute("reduce", "__builtin__", "functools"),
264
+ MovedAttribute("shlex_quote", "pipes", "shlex", "quote"),
265
+ MovedAttribute("StringIO", "StringIO", "io"),
266
+ MovedAttribute("UserDict", "UserDict", "collections", "IterableUserDict", "UserDict"),
267
+ MovedAttribute("UserList", "UserList", "collections"),
268
+ MovedAttribute("UserString", "UserString", "collections"),
269
+ MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"),
270
+ MovedAttribute("zip", "itertools", "builtins", "izip", "zip"),
271
+ MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"),
272
+ MovedModule("builtins", "__builtin__"),
273
+ MovedModule("configparser", "ConfigParser"),
274
+ MovedModule("collections_abc", "collections", "collections.abc" if sys.version_info >= (3, 3) else "collections"),
275
+ MovedModule("copyreg", "copy_reg"),
276
+ MovedModule("dbm_gnu", "gdbm", "dbm.gnu"),
277
+ MovedModule("dbm_ndbm", "dbm", "dbm.ndbm"),
278
+ MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread" if sys.version_info < (3, 9) else "_thread"),
279
+ MovedModule("http_cookiejar", "cookielib", "http.cookiejar"),
280
+ MovedModule("http_cookies", "Cookie", "http.cookies"),
281
+ MovedModule("html_entities", "htmlentitydefs", "html.entities"),
282
+ MovedModule("html_parser", "HTMLParser", "html.parser"),
283
+ MovedModule("http_client", "httplib", "http.client"),
284
+ MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"),
285
+ MovedModule("email_mime_image", "email.MIMEImage", "email.mime.image"),
286
+ MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"),
287
+ MovedModule("email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"),
288
+ MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"),
289
+ MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"),
290
+ MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"),
291
+ MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"),
292
+ MovedModule("cPickle", "cPickle", "pickle"),
293
+ MovedModule("queue", "Queue"),
294
+ MovedModule("reprlib", "repr"),
295
+ MovedModule("socketserver", "SocketServer"),
296
+ MovedModule("_thread", "thread", "_thread"),
297
+ MovedModule("tkinter", "Tkinter"),
298
+ MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"),
299
+ MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"),
300
+ MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"),
301
+ MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"),
302
+ MovedModule("tkinter_tix", "Tix", "tkinter.tix"),
303
+ MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"),
304
+ MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"),
305
+ MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"),
306
+ MovedModule("tkinter_colorchooser", "tkColorChooser",
307
+ "tkinter.colorchooser"),
308
+ MovedModule("tkinter_commondialog", "tkCommonDialog",
309
+ "tkinter.commondialog"),
310
+ MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"),
311
+ MovedModule("tkinter_font", "tkFont", "tkinter.font"),
312
+ MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"),
313
+ MovedModule("tkinter_tksimpledialog", "tkSimpleDialog",
314
+ "tkinter.simpledialog"),
315
+ MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"),
316
+ MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"),
317
+ MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"),
318
+ MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"),
319
+ MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"),
320
+ MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"),
321
+ ]
322
+ # Add windows specific modules.
323
+ if sys.platform == "win32":
324
+ _moved_attributes += [
325
+ MovedModule("winreg", "_winreg"),
326
+ ]
327
+
328
+ for attr in _moved_attributes:
329
+ setattr(_MovedItems, attr.name, attr)
330
+ if isinstance(attr, MovedModule):
331
+ _importer._add_module(attr, "moves." + attr.name)
332
+ del attr
333
+
334
+ _MovedItems._moved_attributes = _moved_attributes
335
+
336
+ moves = _MovedItems(__name__ + ".moves")
337
+ _importer._add_module(moves, "moves")
338
+
339
+
340
+ class Module_six_moves_urllib_parse(_LazyModule):
341
+
342
+ """Lazy loading of moved objects in six.moves.urllib_parse"""
343
+
344
+
345
+ _urllib_parse_moved_attributes = [
346
+ MovedAttribute("ParseResult", "urlparse", "urllib.parse"),
347
+ MovedAttribute("SplitResult", "urlparse", "urllib.parse"),
348
+ MovedAttribute("parse_qs", "urlparse", "urllib.parse"),
349
+ MovedAttribute("parse_qsl", "urlparse", "urllib.parse"),
350
+ MovedAttribute("urldefrag", "urlparse", "urllib.parse"),
351
+ MovedAttribute("urljoin", "urlparse", "urllib.parse"),
352
+ MovedAttribute("urlparse", "urlparse", "urllib.parse"),
353
+ MovedAttribute("urlsplit", "urlparse", "urllib.parse"),
354
+ MovedAttribute("urlunparse", "urlparse", "urllib.parse"),
355
+ MovedAttribute("urlunsplit", "urlparse", "urllib.parse"),
356
+ MovedAttribute("quote", "urllib", "urllib.parse"),
357
+ MovedAttribute("quote_plus", "urllib", "urllib.parse"),
358
+ MovedAttribute("unquote", "urllib", "urllib.parse"),
359
+ MovedAttribute("unquote_plus", "urllib", "urllib.parse"),
360
+ MovedAttribute("unquote_to_bytes", "urllib", "urllib.parse", "unquote", "unquote_to_bytes"),
361
+ MovedAttribute("urlencode", "urllib", "urllib.parse"),
362
+ MovedAttribute("splitquery", "urllib", "urllib.parse"),
363
+ MovedAttribute("splittag", "urllib", "urllib.parse"),
364
+ MovedAttribute("splituser", "urllib", "urllib.parse"),
365
+ MovedAttribute("splitvalue", "urllib", "urllib.parse"),
366
+ MovedAttribute("uses_fragment", "urlparse", "urllib.parse"),
367
+ MovedAttribute("uses_netloc", "urlparse", "urllib.parse"),
368
+ MovedAttribute("uses_params", "urlparse", "urllib.parse"),
369
+ MovedAttribute("uses_query", "urlparse", "urllib.parse"),
370
+ MovedAttribute("uses_relative", "urlparse", "urllib.parse"),
371
+ ]
372
+ for attr in _urllib_parse_moved_attributes:
373
+ setattr(Module_six_moves_urllib_parse, attr.name, attr)
374
+ del attr
375
+
376
+ Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes
377
+
378
+ _importer._add_module(Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse"),
379
+ "moves.urllib_parse", "moves.urllib.parse")
380
+
381
+
382
+ class Module_six_moves_urllib_error(_LazyModule):
383
+
384
+ """Lazy loading of moved objects in six.moves.urllib_error"""
385
+
386
+
387
+ _urllib_error_moved_attributes = [
388
+ MovedAttribute("URLError", "urllib2", "urllib.error"),
389
+ MovedAttribute("HTTPError", "urllib2", "urllib.error"),
390
+ MovedAttribute("ContentTooShortError", "urllib", "urllib.error"),
391
+ ]
392
+ for attr in _urllib_error_moved_attributes:
393
+ setattr(Module_six_moves_urllib_error, attr.name, attr)
394
+ del attr
395
+
396
+ Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes
397
+
398
+ _importer._add_module(Module_six_moves_urllib_error(__name__ + ".moves.urllib.error"),
399
+ "moves.urllib_error", "moves.urllib.error")
400
+
401
+
402
+ class Module_six_moves_urllib_request(_LazyModule):
403
+
404
+ """Lazy loading of moved objects in six.moves.urllib_request"""
405
+
406
+
407
+ _urllib_request_moved_attributes = [
408
+ MovedAttribute("urlopen", "urllib2", "urllib.request"),
409
+ MovedAttribute("install_opener", "urllib2", "urllib.request"),
410
+ MovedAttribute("build_opener", "urllib2", "urllib.request"),
411
+ MovedAttribute("pathname2url", "urllib", "urllib.request"),
412
+ MovedAttribute("url2pathname", "urllib", "urllib.request"),
413
+ MovedAttribute("getproxies", "urllib", "urllib.request"),
414
+ MovedAttribute("Request", "urllib2", "urllib.request"),
415
+ MovedAttribute("OpenerDirector", "urllib2", "urllib.request"),
416
+ MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"),
417
+ MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"),
418
+ MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"),
419
+ MovedAttribute("ProxyHandler", "urllib2", "urllib.request"),
420
+ MovedAttribute("BaseHandler", "urllib2", "urllib.request"),
421
+ MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"),
422
+ MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"),
423
+ MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"),
424
+ MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"),
425
+ MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"),
426
+ MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"),
427
+ MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"),
428
+ MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"),
429
+ MovedAttribute("HTTPHandler", "urllib2", "urllib.request"),
430
+ MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"),
431
+ MovedAttribute("FileHandler", "urllib2", "urllib.request"),
432
+ MovedAttribute("FTPHandler", "urllib2", "urllib.request"),
433
+ MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"),
434
+ MovedAttribute("UnknownHandler", "urllib2", "urllib.request"),
435
+ MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"),
436
+ MovedAttribute("urlretrieve", "urllib", "urllib.request"),
437
+ MovedAttribute("urlcleanup", "urllib", "urllib.request"),
438
+ MovedAttribute("proxy_bypass", "urllib", "urllib.request"),
439
+ MovedAttribute("parse_http_list", "urllib2", "urllib.request"),
440
+ MovedAttribute("parse_keqv_list", "urllib2", "urllib.request"),
441
+ ]
442
+ if sys.version_info[:2] < (3, 14):
443
+ _urllib_request_moved_attributes.extend(
444
+ [
445
+ MovedAttribute("URLopener", "urllib", "urllib.request"),
446
+ MovedAttribute("FancyURLopener", "urllib", "urllib.request"),
447
+ ]
448
+ )
449
+ for attr in _urllib_request_moved_attributes:
450
+ setattr(Module_six_moves_urllib_request, attr.name, attr)
451
+ del attr
452
+
453
+ Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes
454
+
455
+ _importer._add_module(Module_six_moves_urllib_request(__name__ + ".moves.urllib.request"),
456
+ "moves.urllib_request", "moves.urllib.request")
457
+
458
+
459
+ class Module_six_moves_urllib_response(_LazyModule):
460
+
461
+ """Lazy loading of moved objects in six.moves.urllib_response"""
462
+
463
+
464
+ _urllib_response_moved_attributes = [
465
+ MovedAttribute("addbase", "urllib", "urllib.response"),
466
+ MovedAttribute("addclosehook", "urllib", "urllib.response"),
467
+ MovedAttribute("addinfo", "urllib", "urllib.response"),
468
+ MovedAttribute("addinfourl", "urllib", "urllib.response"),
469
+ ]
470
+ for attr in _urllib_response_moved_attributes:
471
+ setattr(Module_six_moves_urllib_response, attr.name, attr)
472
+ del attr
473
+
474
+ Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes
475
+
476
+ _importer._add_module(Module_six_moves_urllib_response(__name__ + ".moves.urllib.response"),
477
+ "moves.urllib_response", "moves.urllib.response")
478
+
479
+
480
+ class Module_six_moves_urllib_robotparser(_LazyModule):
481
+
482
+ """Lazy loading of moved objects in six.moves.urllib_robotparser"""
483
+
484
+
485
+ _urllib_robotparser_moved_attributes = [
486
+ MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"),
487
+ ]
488
+ for attr in _urllib_robotparser_moved_attributes:
489
+ setattr(Module_six_moves_urllib_robotparser, attr.name, attr)
490
+ del attr
491
+
492
+ Module_six_moves_urllib_robotparser._moved_attributes = _urllib_robotparser_moved_attributes
493
+
494
+ _importer._add_module(Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser"),
495
+ "moves.urllib_robotparser", "moves.urllib.robotparser")
496
+
497
+
498
+ class Module_six_moves_urllib(types.ModuleType):
499
+
500
+ """Create a six.moves.urllib namespace that resembles the Python 3 namespace"""
501
+ __path__ = [] # mark as package
502
+ parse = _importer._get_module("moves.urllib_parse")
503
+ error = _importer._get_module("moves.urllib_error")
504
+ request = _importer._get_module("moves.urllib_request")
505
+ response = _importer._get_module("moves.urllib_response")
506
+ robotparser = _importer._get_module("moves.urllib_robotparser")
507
+
508
+ def __dir__(self):
509
+ return ['parse', 'error', 'request', 'response', 'robotparser']
510
+
511
+ _importer._add_module(Module_six_moves_urllib(__name__ + ".moves.urllib"),
512
+ "moves.urllib")
513
+
514
+
515
+ def add_move(move):
516
+ """Add an item to six.moves."""
517
+ setattr(_MovedItems, move.name, move)
518
+
519
+
520
+ def remove_move(name):
521
+ """Remove item from six.moves."""
522
+ try:
523
+ delattr(_MovedItems, name)
524
+ except AttributeError:
525
+ try:
526
+ del moves.__dict__[name]
527
+ except KeyError:
528
+ raise AttributeError("no such move, %r" % (name,))
529
+
530
+
531
+ if PY3:
532
+ _meth_func = "__func__"
533
+ _meth_self = "__self__"
534
+
535
+ _func_closure = "__closure__"
536
+ _func_code = "__code__"
537
+ _func_defaults = "__defaults__"
538
+ _func_globals = "__globals__"
539
+ else:
540
+ _meth_func = "im_func"
541
+ _meth_self = "im_self"
542
+
543
+ _func_closure = "func_closure"
544
+ _func_code = "func_code"
545
+ _func_defaults = "func_defaults"
546
+ _func_globals = "func_globals"
547
+
548
+
549
+ try:
550
+ advance_iterator = next
551
+ except NameError:
552
+ def advance_iterator(it):
553
+ return it.next()
554
+ next = advance_iterator
555
+
556
+
557
+ try:
558
+ callable = callable
559
+ except NameError:
560
+ def callable(obj):
561
+ return any("__call__" in klass.__dict__ for klass in type(obj).__mro__)
562
+
563
+
564
+ if PY3:
565
+ def get_unbound_function(unbound):
566
+ return unbound
567
+
568
+ create_bound_method = types.MethodType
569
+
570
+ def create_unbound_method(func, cls):
571
+ return func
572
+
573
+ Iterator = object
574
+ else:
575
+ def get_unbound_function(unbound):
576
+ return unbound.im_func
577
+
578
+ def create_bound_method(func, obj):
579
+ return types.MethodType(func, obj, obj.__class__)
580
+
581
+ def create_unbound_method(func, cls):
582
+ return types.MethodType(func, None, cls)
583
+
584
+ class Iterator(object):
585
+
586
+ def next(self):
587
+ return type(self).__next__(self)
588
+
589
+ callable = callable
590
+ _add_doc(get_unbound_function,
591
+ """Get the function out of a possibly unbound function""")
592
+
593
+
594
+ get_method_function = operator.attrgetter(_meth_func)
595
+ get_method_self = operator.attrgetter(_meth_self)
596
+ get_function_closure = operator.attrgetter(_func_closure)
597
+ get_function_code = operator.attrgetter(_func_code)
598
+ get_function_defaults = operator.attrgetter(_func_defaults)
599
+ get_function_globals = operator.attrgetter(_func_globals)
600
+
601
+
602
+ if PY3:
603
+ def iterkeys(d, **kw):
604
+ return iter(d.keys(**kw))
605
+
606
+ def itervalues(d, **kw):
607
+ return iter(d.values(**kw))
608
+
609
+ def iteritems(d, **kw):
610
+ return iter(d.items(**kw))
611
+
612
+ def iterlists(d, **kw):
613
+ return iter(d.lists(**kw))
614
+
615
+ viewkeys = operator.methodcaller("keys")
616
+
617
+ viewvalues = operator.methodcaller("values")
618
+
619
+ viewitems = operator.methodcaller("items")
620
+ else:
621
+ def iterkeys(d, **kw):
622
+ return d.iterkeys(**kw)
623
+
624
+ def itervalues(d, **kw):
625
+ return d.itervalues(**kw)
626
+
627
+ def iteritems(d, **kw):
628
+ return d.iteritems(**kw)
629
+
630
+ def iterlists(d, **kw):
631
+ return d.iterlists(**kw)
632
+
633
+ viewkeys = operator.methodcaller("viewkeys")
634
+
635
+ viewvalues = operator.methodcaller("viewvalues")
636
+
637
+ viewitems = operator.methodcaller("viewitems")
638
+
639
+ _add_doc(iterkeys, "Return an iterator over the keys of a dictionary.")
640
+ _add_doc(itervalues, "Return an iterator over the values of a dictionary.")
641
+ _add_doc(iteritems,
642
+ "Return an iterator over the (key, value) pairs of a dictionary.")
643
+ _add_doc(iterlists,
644
+ "Return an iterator over the (key, [values]) pairs of a dictionary.")
645
+
646
+
647
+ if PY3:
648
+ def b(s):
649
+ return s.encode("latin-1")
650
+
651
+ def u(s):
652
+ return s
653
+ unichr = chr
654
+ import struct
655
+ int2byte = struct.Struct(">B").pack
656
+ del struct
657
+ byte2int = operator.itemgetter(0)
658
+ indexbytes = operator.getitem
659
+ iterbytes = iter
660
+ import io
661
+ StringIO = io.StringIO
662
+ BytesIO = io.BytesIO
663
+ del io
664
+ _assertCountEqual = "assertCountEqual"
665
+ if sys.version_info[1] <= 1:
666
+ _assertRaisesRegex = "assertRaisesRegexp"
667
+ _assertRegex = "assertRegexpMatches"
668
+ _assertNotRegex = "assertNotRegexpMatches"
669
+ else:
670
+ _assertRaisesRegex = "assertRaisesRegex"
671
+ _assertRegex = "assertRegex"
672
+ _assertNotRegex = "assertNotRegex"
673
+ else:
674
+ def b(s):
675
+ return s
676
+ # Workaround for standalone backslash
677
+
678
+ def u(s):
679
+ return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape")
680
+ unichr = unichr
681
+ int2byte = chr
682
+
683
+ def byte2int(bs):
684
+ return ord(bs[0])
685
+
686
+ def indexbytes(buf, i):
687
+ return ord(buf[i])
688
+ iterbytes = functools.partial(itertools.imap, ord)
689
+ import StringIO
690
+ StringIO = BytesIO = StringIO.StringIO
691
+ _assertCountEqual = "assertItemsEqual"
692
+ _assertRaisesRegex = "assertRaisesRegexp"
693
+ _assertRegex = "assertRegexpMatches"
694
+ _assertNotRegex = "assertNotRegexpMatches"
695
+ _add_doc(b, """Byte literal""")
696
+ _add_doc(u, """Text literal""")
697
+
698
+
699
+ def assertCountEqual(self, *args, **kwargs):
700
+ return getattr(self, _assertCountEqual)(*args, **kwargs)
701
+
702
+
703
+ def assertRaisesRegex(self, *args, **kwargs):
704
+ return getattr(self, _assertRaisesRegex)(*args, **kwargs)
705
+
706
+
707
+ def assertRegex(self, *args, **kwargs):
708
+ return getattr(self, _assertRegex)(*args, **kwargs)
709
+
710
+
711
+ def assertNotRegex(self, *args, **kwargs):
712
+ return getattr(self, _assertNotRegex)(*args, **kwargs)
713
+
714
+
715
+ if PY3:
716
+ exec_ = getattr(moves.builtins, "exec")
717
+
718
+ def reraise(tp, value, tb=None):
719
+ try:
720
+ if value is None:
721
+ value = tp()
722
+ if value.__traceback__ is not tb:
723
+ raise value.with_traceback(tb)
724
+ raise value
725
+ finally:
726
+ value = None
727
+ tb = None
728
+
729
+ else:
730
+ def exec_(_code_, _globs_=None, _locs_=None):
731
+ """Execute code in a namespace."""
732
+ if _globs_ is None:
733
+ frame = sys._getframe(1)
734
+ _globs_ = frame.f_globals
735
+ if _locs_ is None:
736
+ _locs_ = frame.f_locals
737
+ del frame
738
+ elif _locs_ is None:
739
+ _locs_ = _globs_
740
+ exec("""exec _code_ in _globs_, _locs_""")
741
+
742
+ exec_("""def reraise(tp, value, tb=None):
743
+ try:
744
+ raise tp, value, tb
745
+ finally:
746
+ tb = None
747
+ """)
748
+
749
+
750
+ if sys.version_info[:2] > (3,):
751
+ exec_("""def raise_from(value, from_value):
752
+ try:
753
+ raise value from from_value
754
+ finally:
755
+ value = None
756
+ """)
757
+ else:
758
+ def raise_from(value, from_value):
759
+ raise value
760
+
761
+
762
+ print_ = getattr(moves.builtins, "print", None)
763
+ if print_ is None:
764
+ def print_(*args, **kwargs):
765
+ """The new-style print function for Python 2.4 and 2.5."""
766
+ fp = kwargs.pop("file", sys.stdout)
767
+ if fp is None:
768
+ return
769
+
770
+ def write(data):
771
+ if not isinstance(data, basestring):
772
+ data = str(data)
773
+ # If the file has an encoding, encode unicode with it.
774
+ if (isinstance(fp, file) and
775
+ isinstance(data, unicode) and
776
+ fp.encoding is not None):
777
+ errors = getattr(fp, "errors", None)
778
+ if errors is None:
779
+ errors = "strict"
780
+ data = data.encode(fp.encoding, errors)
781
+ fp.write(data)
782
+ want_unicode = False
783
+ sep = kwargs.pop("sep", None)
784
+ if sep is not None:
785
+ if isinstance(sep, unicode):
786
+ want_unicode = True
787
+ elif not isinstance(sep, str):
788
+ raise TypeError("sep must be None or a string")
789
+ end = kwargs.pop("end", None)
790
+ if end is not None:
791
+ if isinstance(end, unicode):
792
+ want_unicode = True
793
+ elif not isinstance(end, str):
794
+ raise TypeError("end must be None or a string")
795
+ if kwargs:
796
+ raise TypeError("invalid keyword arguments to print()")
797
+ if not want_unicode:
798
+ for arg in args:
799
+ if isinstance(arg, unicode):
800
+ want_unicode = True
801
+ break
802
+ if want_unicode:
803
+ newline = unicode("\n")
804
+ space = unicode(" ")
805
+ else:
806
+ newline = "\n"
807
+ space = " "
808
+ if sep is None:
809
+ sep = space
810
+ if end is None:
811
+ end = newline
812
+ for i, arg in enumerate(args):
813
+ if i:
814
+ write(sep)
815
+ write(arg)
816
+ write(end)
817
+ if sys.version_info[:2] < (3, 3):
818
+ _print = print_
819
+
820
+ def print_(*args, **kwargs):
821
+ fp = kwargs.get("file", sys.stdout)
822
+ flush = kwargs.pop("flush", False)
823
+ _print(*args, **kwargs)
824
+ if flush and fp is not None:
825
+ fp.flush()
826
+
827
+ _add_doc(reraise, """Reraise an exception.""")
828
+
829
+ if sys.version_info[0:2] < (3, 4):
830
+ # This does exactly the same what the :func:`py3:functools.update_wrapper`
831
+ # function does on Python versions after 3.2. It sets the ``__wrapped__``
832
+ # attribute on ``wrapper`` object and it doesn't raise an error if any of
833
+ # the attributes mentioned in ``assigned`` and ``updated`` are missing on
834
+ # ``wrapped`` object.
835
+ def _update_wrapper(wrapper, wrapped,
836
+ assigned=functools.WRAPPER_ASSIGNMENTS,
837
+ updated=functools.WRAPPER_UPDATES):
838
+ for attr in assigned:
839
+ try:
840
+ value = getattr(wrapped, attr)
841
+ except AttributeError:
842
+ continue
843
+ else:
844
+ setattr(wrapper, attr, value)
845
+ for attr in updated:
846
+ getattr(wrapper, attr).update(getattr(wrapped, attr, {}))
847
+ wrapper.__wrapped__ = wrapped
848
+ return wrapper
849
+ _update_wrapper.__doc__ = functools.update_wrapper.__doc__
850
+
851
+ def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS,
852
+ updated=functools.WRAPPER_UPDATES):
853
+ return functools.partial(_update_wrapper, wrapped=wrapped,
854
+ assigned=assigned, updated=updated)
855
+ wraps.__doc__ = functools.wraps.__doc__
856
+
857
+ else:
858
+ wraps = functools.wraps
859
+
860
+
861
+ def with_metaclass(meta, *bases):
862
+ """Create a base class with a metaclass."""
863
+ # This requires a bit of explanation: the basic idea is to make a dummy
864
+ # metaclass for one level of class instantiation that replaces itself with
865
+ # the actual metaclass.
866
+ class metaclass(type):
867
+
868
+ def __new__(cls, name, this_bases, d):
869
+ if sys.version_info[:2] >= (3, 7):
870
+ # This version introduced PEP 560 that requires a bit
871
+ # of extra care (we mimic what is done by __build_class__).
872
+ resolved_bases = types.resolve_bases(bases)
873
+ if resolved_bases is not bases:
874
+ d['__orig_bases__'] = bases
875
+ else:
876
+ resolved_bases = bases
877
+ return meta(name, resolved_bases, d)
878
+
879
+ @classmethod
880
+ def __prepare__(cls, name, this_bases):
881
+ return meta.__prepare__(name, bases)
882
+ return type.__new__(metaclass, 'temporary_class', (), {})
883
+
884
+
885
+ def add_metaclass(metaclass):
886
+ """Class decorator for creating a class with a metaclass."""
887
+ def wrapper(cls):
888
+ orig_vars = cls.__dict__.copy()
889
+ slots = orig_vars.get('__slots__')
890
+ if slots is not None:
891
+ if isinstance(slots, str):
892
+ slots = [slots]
893
+ for slots_var in slots:
894
+ orig_vars.pop(slots_var)
895
+ orig_vars.pop('__dict__', None)
896
+ orig_vars.pop('__weakref__', None)
897
+ if hasattr(cls, '__qualname__'):
898
+ orig_vars['__qualname__'] = cls.__qualname__
899
+ return metaclass(cls.__name__, cls.__bases__, orig_vars)
900
+ return wrapper
901
+
902
+
903
+ def ensure_binary(s, encoding='utf-8', errors='strict'):
904
+ """Coerce **s** to six.binary_type.
905
+
906
+ For Python 2:
907
+ - `unicode` -> encoded to `str`
908
+ - `str` -> `str`
909
+
910
+ For Python 3:
911
+ - `str` -> encoded to `bytes`
912
+ - `bytes` -> `bytes`
913
+ """
914
+ if isinstance(s, binary_type):
915
+ return s
916
+ if isinstance(s, text_type):
917
+ return s.encode(encoding, errors)
918
+ raise TypeError("not expecting type '%s'" % type(s))
919
+
920
+
921
+ def ensure_str(s, encoding='utf-8', errors='strict'):
922
+ """Coerce *s* to `str`.
923
+
924
+ For Python 2:
925
+ - `unicode` -> encoded to `str`
926
+ - `str` -> `str`
927
+
928
+ For Python 3:
929
+ - `str` -> `str`
930
+ - `bytes` -> decoded to `str`
931
+ """
932
+ # Optimization: Fast return for the common case.
933
+ if type(s) is str:
934
+ return s
935
+ if PY2 and isinstance(s, text_type):
936
+ return s.encode(encoding, errors)
937
+ elif PY3 and isinstance(s, binary_type):
938
+ return s.decode(encoding, errors)
939
+ elif not isinstance(s, (text_type, binary_type)):
940
+ raise TypeError("not expecting type '%s'" % type(s))
941
+ return s
942
+
943
+
944
+ def ensure_text(s, encoding='utf-8', errors='strict'):
945
+ """Coerce *s* to six.text_type.
946
+
947
+ For Python 2:
948
+ - `unicode` -> `unicode`
949
+ - `str` -> `unicode`
950
+
951
+ For Python 3:
952
+ - `str` -> `str`
953
+ - `bytes` -> decoded to `str`
954
+ """
955
+ if isinstance(s, binary_type):
956
+ return s.decode(encoding, errors)
957
+ elif isinstance(s, text_type):
958
+ return s
959
+ else:
960
+ raise TypeError("not expecting type '%s'" % type(s))
961
+
962
+
963
+ def python_2_unicode_compatible(klass):
964
+ """
965
+ A class decorator that defines __unicode__ and __str__ methods under Python 2.
966
+ Under Python 3 it does nothing.
967
+
968
+ To support Python 2 and 3 with a single code base, define a __str__ method
969
+ returning text and apply this decorator to the class.
970
+ """
971
+ if PY2:
972
+ if '__str__' not in klass.__dict__:
973
+ raise ValueError("@python_2_unicode_compatible cannot be applied "
974
+ "to %s because it doesn't define __str__()." %
975
+ klass.__name__)
976
+ klass.__unicode__ = klass.__str__
977
+ klass.__str__ = lambda self: self.__unicode__().encode('utf-8')
978
+ return klass
979
+
980
+
981
+ # Complete the moves implementation.
982
+ # This code is at the end of this module to speed up module loading.
983
+ # Turn this module into a package.
984
+ __path__ = [] # required for PEP 302 and PEP 451
985
+ __package__ = __name__ # see PEP 366 @ReservedAssignment
986
+ if globals().get("__spec__") is not None:
987
+ __spec__.submodule_search_locations = [] # PEP 451 @UndefinedVariable
988
+ # Remove other six meta path importers, since they cause problems. This can
989
+ # happen if six is removed from sys.modules and then reloaded. (Setuptools does
990
+ # this for some reason.)
991
+ if sys.meta_path:
992
+ for i, importer in enumerate(sys.meta_path):
993
+ # Here's some real nastiness: Another "instance" of the six module might
994
+ # be floating around. Therefore, we can't use isinstance() to check for
995
+ # the six meta path importer, since the other six instance will have
996
+ # inserted an importer with different class.
997
+ if (type(importer).__name__ == "_SixMetaPathImporter" and
998
+ importer.name == __name__):
999
+ del sys.meta_path[i]
1000
+ break
1001
+ del i, importer
1002
+ # Finally, add the importer to the meta path import hook.
1003
+ sys.meta_path.append(_importer)
.venv/lib/python3.11/site-packages/threadpoolctl.py ADDED
@@ -0,0 +1,1292 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """threadpoolctl
2
+
3
+ This module provides utilities to introspect native libraries that relies on
4
+ thread pools (notably BLAS and OpenMP implementations) and dynamically set the
5
+ maximal number of threads they can use.
6
+ """
7
+
8
+ # License: BSD 3-Clause
9
+
10
+ # The code to introspect dynamically loaded libraries on POSIX systems is
11
+ # adapted from code by Intel developer @anton-malakhov available at
12
+ # https://github.com/IntelPython/smp (Copyright (c) 2017, Intel Corporation)
13
+ # and also published under the BSD 3-Clause license
14
+ import os
15
+ import re
16
+ import sys
17
+ import ctypes
18
+ import itertools
19
+ import textwrap
20
+ from typing import final
21
+ import warnings
22
+ from ctypes.util import find_library
23
+ from abc import ABC, abstractmethod
24
+ from functools import lru_cache
25
+ from contextlib import ContextDecorator
26
+
27
+ __version__ = "3.6.0"
28
+ __all__ = [
29
+ "threadpool_limits",
30
+ "threadpool_info",
31
+ "ThreadpoolController",
32
+ "LibController",
33
+ "register",
34
+ ]
35
+
36
+
37
+ # One can get runtime errors or even segfaults due to multiple OpenMP libraries
38
+ # loaded simultaneously which can happen easily in Python when importing and
39
+ # using compiled extensions built with different compilers and therefore
40
+ # different OpenMP runtimes in the same program. In particular libiomp (used by
41
+ # Intel ICC) and libomp used by clang/llvm tend to crash. This can happen for
42
+ # instance when calling BLAS inside a prange. Setting the following environment
43
+ # variable allows multiple OpenMP libraries to be loaded. It should not degrade
44
+ # performances since we manually take care of potential over-subscription
45
+ # performance issues, in sections of the code where nested OpenMP loops can
46
+ # happen, by dynamically reconfiguring the inner OpenMP runtime to temporarily
47
+ # disable it while under the scope of the outer OpenMP parallel section.
48
+ os.environ.setdefault("KMP_DUPLICATE_LIB_OK", "True")
49
+
50
+ # Structure to cast the info on dynamically loaded library. See
51
+ # https://linux.die.net/man/3/dl_iterate_phdr for more details.
52
+ _SYSTEM_UINT = ctypes.c_uint64 if sys.maxsize > 2**32 else ctypes.c_uint32
53
+ _SYSTEM_UINT_HALF = ctypes.c_uint32 if sys.maxsize > 2**32 else ctypes.c_uint16
54
+
55
+
56
+ class _dl_phdr_info(ctypes.Structure):
57
+ _fields_ = [
58
+ ("dlpi_addr", _SYSTEM_UINT), # Base address of object
59
+ ("dlpi_name", ctypes.c_char_p), # path to the library
60
+ ("dlpi_phdr", ctypes.c_void_p), # pointer on dlpi_headers
61
+ ("dlpi_phnum", _SYSTEM_UINT_HALF), # number of elements in dlpi_phdr
62
+ ]
63
+
64
+
65
+ # The RTLD_NOLOAD flag for loading shared libraries is not defined on Windows.
66
+ try:
67
+ _RTLD_NOLOAD = os.RTLD_NOLOAD
68
+ except AttributeError:
69
+ _RTLD_NOLOAD = ctypes.DEFAULT_MODE
70
+
71
+
72
+ class LibController(ABC):
73
+ """Abstract base class for the individual library controllers
74
+
75
+ A library controller must expose the following class attributes:
76
+ - user_api : str
77
+ Usually the name of the library or generic specification the library
78
+ implements, e.g. "blas" is a specification with different implementations.
79
+ - internal_api : str
80
+ Usually the name of the library or concrete implementation of some
81
+ specification, e.g. "openblas" is an implementation of the "blas"
82
+ specification.
83
+ - filename_prefixes : tuple
84
+ Possible prefixes of the shared library's filename that allow to
85
+ identify the library. e.g. "libopenblas" for libopenblas.so.
86
+
87
+ and implement the following methods: `get_num_threads`, `set_num_threads` and
88
+ `get_version`.
89
+
90
+ Threadpoolctl loops through all the loaded shared libraries and tries to match
91
+ the filename of each library with the `filename_prefixes`. If a match is found, a
92
+ controller is instantiated and a handler to the library is stored in the `dynlib`
93
+ attribute as a `ctypes.CDLL` object. It can be used to access the necessary symbols
94
+ of the shared library to implement the above methods.
95
+
96
+ The following information will be exposed in the info dictionary:
97
+ - user_api : standardized API, if any, or a copy of internal_api.
98
+ - internal_api : implementation-specific API.
99
+ - num_threads : the current thread limit.
100
+ - prefix : prefix of the shared library's filename.
101
+ - filepath : path to the loaded shared library.
102
+ - version : version of the library (if available).
103
+
104
+ In addition, each library controller may expose internal API specific entries. They
105
+ must be set as attributes in the `set_additional_attributes` method.
106
+ """
107
+
108
+ @final
109
+ def __init__(self, *, filepath=None, prefix=None, parent=None):
110
+ """This is not meant to be overriden by subclasses."""
111
+ self.parent = parent
112
+ self.prefix = prefix
113
+ self.filepath = filepath
114
+ self.dynlib = ctypes.CDLL(filepath, mode=_RTLD_NOLOAD)
115
+ self._symbol_prefix, self._symbol_suffix = self._find_affixes()
116
+ self.version = self.get_version()
117
+ self.set_additional_attributes()
118
+
119
+ def info(self):
120
+ """Return relevant info wrapped in a dict"""
121
+ hidden_attrs = ("dynlib", "parent", "_symbol_prefix", "_symbol_suffix")
122
+ return {
123
+ "user_api": self.user_api,
124
+ "internal_api": self.internal_api,
125
+ "num_threads": self.num_threads,
126
+ **{k: v for k, v in vars(self).items() if k not in hidden_attrs},
127
+ }
128
+
129
+ def set_additional_attributes(self):
130
+ """Set additional attributes meant to be exposed in the info dict"""
131
+
132
+ @property
133
+ def num_threads(self):
134
+ """Exposes the current thread limit as a dynamic property
135
+
136
+ This is not meant to be used or overriden by subclasses.
137
+ """
138
+ return self.get_num_threads()
139
+
140
+ @abstractmethod
141
+ def get_num_threads(self):
142
+ """Return the maximum number of threads available to use"""
143
+
144
+ @abstractmethod
145
+ def set_num_threads(self, num_threads):
146
+ """Set the maximum number of threads to use"""
147
+
148
+ @abstractmethod
149
+ def get_version(self):
150
+ """Return the version of the shared library"""
151
+
152
+ def _find_affixes(self):
153
+ """Return the affixes for the symbols of the shared library"""
154
+ return "", ""
155
+
156
+ def _get_symbol(self, name):
157
+ """Return the symbol of the shared library accounding for the affixes"""
158
+ return getattr(
159
+ self.dynlib, f"{self._symbol_prefix}{name}{self._symbol_suffix}", None
160
+ )
161
+
162
+
163
+ class OpenBLASController(LibController):
164
+ """Controller class for OpenBLAS"""
165
+
166
+ user_api = "blas"
167
+ internal_api = "openblas"
168
+ filename_prefixes = ("libopenblas", "libblas", "libscipy_openblas")
169
+
170
+ _symbol_prefixes = ("", "scipy_")
171
+ _symbol_suffixes = ("", "64_", "_64")
172
+
173
+ # All variations of "openblas_get_num_threads", accounting for the affixes
174
+ check_symbols = tuple(
175
+ f"{prefix}openblas_get_num_threads{suffix}"
176
+ for prefix, suffix in itertools.product(_symbol_prefixes, _symbol_suffixes)
177
+ )
178
+
179
+ def _find_affixes(self):
180
+ for prefix, suffix in itertools.product(
181
+ self._symbol_prefixes, self._symbol_suffixes
182
+ ):
183
+ if hasattr(self.dynlib, f"{prefix}openblas_get_num_threads{suffix}"):
184
+ return prefix, suffix
185
+
186
+ def set_additional_attributes(self):
187
+ self.threading_layer = self._get_threading_layer()
188
+ self.architecture = self._get_architecture()
189
+
190
+ def get_num_threads(self):
191
+ get_num_threads_func = self._get_symbol("openblas_get_num_threads")
192
+ if get_num_threads_func is not None:
193
+ return get_num_threads_func()
194
+ return None
195
+
196
+ def set_num_threads(self, num_threads):
197
+ set_num_threads_func = self._get_symbol("openblas_set_num_threads")
198
+ if set_num_threads_func is not None:
199
+ return set_num_threads_func(num_threads)
200
+ return None
201
+
202
+ def get_version(self):
203
+ # None means OpenBLAS is not loaded or version < 0.3.4, since OpenBLAS
204
+ # did not expose its version before that.
205
+ get_version_func = self._get_symbol("openblas_get_config")
206
+ if get_version_func is not None:
207
+ get_version_func.restype = ctypes.c_char_p
208
+ config = get_version_func().split()
209
+ if config[0] == b"OpenBLAS":
210
+ return config[1].decode("utf-8")
211
+ return None
212
+ return None
213
+
214
+ def _get_threading_layer(self):
215
+ """Return the threading layer of OpenBLAS"""
216
+ get_threading_layer_func = self._get_symbol("openblas_get_parallel")
217
+ if get_threading_layer_func is not None:
218
+ threading_layer = get_threading_layer_func()
219
+ if threading_layer == 2:
220
+ return "openmp"
221
+ elif threading_layer == 1:
222
+ return "pthreads"
223
+ return "disabled"
224
+ return "unknown"
225
+
226
+ def _get_architecture(self):
227
+ """Return the architecture detected by OpenBLAS"""
228
+ get_architecture_func = self._get_symbol("openblas_get_corename")
229
+ if get_architecture_func is not None:
230
+ get_architecture_func.restype = ctypes.c_char_p
231
+ return get_architecture_func().decode("utf-8")
232
+ return None
233
+
234
+
235
+ class BLISController(LibController):
236
+ """Controller class for BLIS"""
237
+
238
+ user_api = "blas"
239
+ internal_api = "blis"
240
+ filename_prefixes = ("libblis", "libblas")
241
+ check_symbols = (
242
+ "bli_thread_get_num_threads",
243
+ "bli_thread_set_num_threads",
244
+ "bli_info_get_version_str",
245
+ "bli_info_get_enable_openmp",
246
+ "bli_info_get_enable_pthreads",
247
+ "bli_arch_query_id",
248
+ "bli_arch_string",
249
+ )
250
+
251
+ def set_additional_attributes(self):
252
+ self.threading_layer = self._get_threading_layer()
253
+ self.architecture = self._get_architecture()
254
+
255
+ def get_num_threads(self):
256
+ get_func = getattr(self.dynlib, "bli_thread_get_num_threads", lambda: None)
257
+ num_threads = get_func()
258
+ # by default BLIS is single-threaded and get_num_threads
259
+ # returns -1. We map it to 1 for consistency with other libraries.
260
+ return 1 if num_threads == -1 else num_threads
261
+
262
+ def set_num_threads(self, num_threads):
263
+ set_func = getattr(
264
+ self.dynlib, "bli_thread_set_num_threads", lambda num_threads: None
265
+ )
266
+ return set_func(num_threads)
267
+
268
+ def get_version(self):
269
+ get_version_ = getattr(self.dynlib, "bli_info_get_version_str", None)
270
+ if get_version_ is None:
271
+ return None
272
+
273
+ get_version_.restype = ctypes.c_char_p
274
+ return get_version_().decode("utf-8")
275
+
276
+ def _get_threading_layer(self):
277
+ """Return the threading layer of BLIS"""
278
+ if getattr(self.dynlib, "bli_info_get_enable_openmp", lambda: False)():
279
+ return "openmp"
280
+ elif getattr(self.dynlib, "bli_info_get_enable_pthreads", lambda: False)():
281
+ return "pthreads"
282
+ return "disabled"
283
+
284
+ def _get_architecture(self):
285
+ """Return the architecture detected by BLIS"""
286
+ bli_arch_query_id = getattr(self.dynlib, "bli_arch_query_id", None)
287
+ bli_arch_string = getattr(self.dynlib, "bli_arch_string", None)
288
+ if bli_arch_query_id is None or bli_arch_string is None:
289
+ return None
290
+
291
+ # the true restype should be BLIS' arch_t (enum) but int should work
292
+ # for us:
293
+ bli_arch_query_id.restype = ctypes.c_int
294
+ bli_arch_string.restype = ctypes.c_char_p
295
+ return bli_arch_string(bli_arch_query_id()).decode("utf-8")
296
+
297
+
298
+ class FlexiBLASController(LibController):
299
+ """Controller class for FlexiBLAS"""
300
+
301
+ user_api = "blas"
302
+ internal_api = "flexiblas"
303
+ filename_prefixes = ("libflexiblas",)
304
+ check_symbols = (
305
+ "flexiblas_get_num_threads",
306
+ "flexiblas_set_num_threads",
307
+ "flexiblas_get_version",
308
+ "flexiblas_list",
309
+ "flexiblas_list_loaded",
310
+ "flexiblas_current_backend",
311
+ )
312
+
313
+ @property
314
+ def loaded_backends(self):
315
+ return self._get_backend_list(loaded=True)
316
+
317
+ @property
318
+ def current_backend(self):
319
+ return self._get_current_backend()
320
+
321
+ def info(self):
322
+ """Return relevant info wrapped in a dict"""
323
+ # We override the info method because the loaded and current backends
324
+ # are dynamic properties
325
+ exposed_attrs = super().info()
326
+ exposed_attrs["loaded_backends"] = self.loaded_backends
327
+ exposed_attrs["current_backend"] = self.current_backend
328
+
329
+ return exposed_attrs
330
+
331
+ def set_additional_attributes(self):
332
+ self.available_backends = self._get_backend_list(loaded=False)
333
+
334
+ def get_num_threads(self):
335
+ get_func = getattr(self.dynlib, "flexiblas_get_num_threads", lambda: None)
336
+ num_threads = get_func()
337
+ # by default BLIS is single-threaded and get_num_threads
338
+ # returns -1. We map it to 1 for consistency with other libraries.
339
+ return 1 if num_threads == -1 else num_threads
340
+
341
+ def set_num_threads(self, num_threads):
342
+ set_func = getattr(
343
+ self.dynlib, "flexiblas_set_num_threads", lambda num_threads: None
344
+ )
345
+ return set_func(num_threads)
346
+
347
+ def get_version(self):
348
+ get_version_ = getattr(self.dynlib, "flexiblas_get_version", None)
349
+ if get_version_ is None:
350
+ return None
351
+
352
+ major = ctypes.c_int()
353
+ minor = ctypes.c_int()
354
+ patch = ctypes.c_int()
355
+ get_version_(ctypes.byref(major), ctypes.byref(minor), ctypes.byref(patch))
356
+ return f"{major.value}.{minor.value}.{patch.value}"
357
+
358
+ def _get_backend_list(self, loaded=False):
359
+ """Return the list of available backends for FlexiBLAS.
360
+
361
+ If loaded is False, return the list of available backends from the FlexiBLAS
362
+ configuration. If loaded is True, return the list of actually loaded backends.
363
+ """
364
+ func_name = f"flexiblas_list{'_loaded' if loaded else ''}"
365
+ get_backend_list_ = getattr(self.dynlib, func_name, None)
366
+ if get_backend_list_ is None:
367
+ return None
368
+
369
+ n_backends = get_backend_list_(None, 0, 0)
370
+
371
+ backends = []
372
+ for i in range(n_backends):
373
+ backend_name = ctypes.create_string_buffer(1024)
374
+ get_backend_list_(backend_name, 1024, i)
375
+ if backend_name.value.decode("utf-8") != "__FALLBACK__":
376
+ # We don't know when to expect __FALLBACK__ but it is not a real
377
+ # backend and does not show up when running flexiblas list.
378
+ backends.append(backend_name.value.decode("utf-8"))
379
+ return backends
380
+
381
+ def _get_current_backend(self):
382
+ """Return the backend of FlexiBLAS"""
383
+ get_backend_ = getattr(self.dynlib, "flexiblas_current_backend", None)
384
+ if get_backend_ is None:
385
+ return None
386
+
387
+ backend = ctypes.create_string_buffer(1024)
388
+ get_backend_(backend, ctypes.sizeof(backend))
389
+ return backend.value.decode("utf-8")
390
+
391
+ def switch_backend(self, backend):
392
+ """Switch the backend of FlexiBLAS
393
+
394
+ Parameters
395
+ ----------
396
+ backend : str
397
+ The name or the path to the shared library of the backend to switch to. If
398
+ the backend is not already loaded, it will be loaded first.
399
+ """
400
+ if backend not in self.loaded_backends:
401
+ if backend in self.available_backends:
402
+ load_func = getattr(self.dynlib, "flexiblas_load_backend", lambda _: -1)
403
+ else: # assume backend is a path to a shared library
404
+ load_func = getattr(
405
+ self.dynlib, "flexiblas_load_backend_library", lambda _: -1
406
+ )
407
+ res = load_func(str(backend).encode("utf-8"))
408
+ if res == -1:
409
+ raise RuntimeError(
410
+ f"Failed to load backend {backend!r}. It must either be the name of"
411
+ " a backend available in the FlexiBLAS configuration "
412
+ f"{self.available_backends} or the path to a valid shared library."
413
+ )
414
+
415
+ # Trigger a new search of loaded shared libraries since loading a new
416
+ # backend caused a dlopen.
417
+ self.parent._load_libraries()
418
+
419
+ switch_func = getattr(self.dynlib, "flexiblas_switch", lambda _: -1)
420
+ idx = self.loaded_backends.index(backend)
421
+ res = switch_func(idx)
422
+ if res == -1:
423
+ raise RuntimeError(f"Failed to switch to backend {backend!r}.")
424
+
425
+
426
+ class MKLController(LibController):
427
+ """Controller class for MKL"""
428
+
429
+ user_api = "blas"
430
+ internal_api = "mkl"
431
+ filename_prefixes = ("libmkl_rt", "mkl_rt", "libblas")
432
+ check_symbols = (
433
+ "MKL_Get_Max_Threads",
434
+ "MKL_Set_Num_Threads",
435
+ "MKL_Get_Version_String",
436
+ "MKL_Set_Threading_Layer",
437
+ )
438
+
439
+ def set_additional_attributes(self):
440
+ self.threading_layer = self._get_threading_layer()
441
+
442
+ def get_num_threads(self):
443
+ get_func = getattr(self.dynlib, "MKL_Get_Max_Threads", lambda: None)
444
+ return get_func()
445
+
446
+ def set_num_threads(self, num_threads):
447
+ set_func = getattr(self.dynlib, "MKL_Set_Num_Threads", lambda num_threads: None)
448
+ return set_func(num_threads)
449
+
450
+ def get_version(self):
451
+ if not hasattr(self.dynlib, "MKL_Get_Version_String"):
452
+ return None
453
+
454
+ res = ctypes.create_string_buffer(200)
455
+ self.dynlib.MKL_Get_Version_String(res, 200)
456
+
457
+ version = res.value.decode("utf-8")
458
+ group = re.search(r"Version ([^ ]+) ", version)
459
+ if group is not None:
460
+ version = group.groups()[0]
461
+ return version.strip()
462
+
463
+ def _get_threading_layer(self):
464
+ """Return the threading layer of MKL"""
465
+ # The function mkl_set_threading_layer returns the current threading
466
+ # layer. Calling it with an invalid threading layer allows us to safely
467
+ # get the threading layer
468
+ set_threading_layer = getattr(
469
+ self.dynlib, "MKL_Set_Threading_Layer", lambda layer: -1
470
+ )
471
+ layer_map = {
472
+ 0: "intel",
473
+ 1: "sequential",
474
+ 2: "pgi",
475
+ 3: "gnu",
476
+ 4: "tbb",
477
+ -1: "not specified",
478
+ }
479
+ return layer_map[set_threading_layer(-1)]
480
+
481
+
482
+ class OpenMPController(LibController):
483
+ """Controller class for OpenMP"""
484
+
485
+ user_api = "openmp"
486
+ internal_api = "openmp"
487
+ filename_prefixes = ("libiomp", "libgomp", "libomp", "vcomp")
488
+ check_symbols = (
489
+ "omp_get_max_threads",
490
+ "omp_get_num_threads",
491
+ )
492
+
493
+ def get_num_threads(self):
494
+ get_func = getattr(self.dynlib, "omp_get_max_threads", lambda: None)
495
+ return get_func()
496
+
497
+ def set_num_threads(self, num_threads):
498
+ set_func = getattr(self.dynlib, "omp_set_num_threads", lambda num_threads: None)
499
+ return set_func(num_threads)
500
+
501
+ def get_version(self):
502
+ # There is no way to get the version number programmatically in OpenMP.
503
+ return None
504
+
505
+
506
+ # Controllers for the libraries that we'll look for in the loaded libraries.
507
+ # Third party libraries can register their own controllers.
508
+ _ALL_CONTROLLERS = [
509
+ OpenBLASController,
510
+ BLISController,
511
+ MKLController,
512
+ OpenMPController,
513
+ FlexiBLASController,
514
+ ]
515
+
516
+ # Helpers for the doc and test names
517
+ _ALL_USER_APIS = list(set(lib.user_api for lib in _ALL_CONTROLLERS))
518
+ _ALL_INTERNAL_APIS = [lib.internal_api for lib in _ALL_CONTROLLERS]
519
+ _ALL_PREFIXES = list(
520
+ set(prefix for lib in _ALL_CONTROLLERS for prefix in lib.filename_prefixes)
521
+ )
522
+ _ALL_BLAS_LIBRARIES = [
523
+ lib.internal_api for lib in _ALL_CONTROLLERS if lib.user_api == "blas"
524
+ ]
525
+ _ALL_OPENMP_LIBRARIES = OpenMPController.filename_prefixes
526
+
527
+
528
+ def register(controller):
529
+ """Register a new controller"""
530
+ _ALL_CONTROLLERS.append(controller)
531
+ _ALL_USER_APIS.append(controller.user_api)
532
+ _ALL_INTERNAL_APIS.append(controller.internal_api)
533
+ _ALL_PREFIXES.extend(controller.filename_prefixes)
534
+
535
+
536
+ def _format_docstring(*args, **kwargs):
537
+ def decorator(o):
538
+ if o.__doc__ is not None:
539
+ o.__doc__ = o.__doc__.format(*args, **kwargs)
540
+ return o
541
+
542
+ return decorator
543
+
544
+
545
+ @lru_cache(maxsize=10000)
546
+ def _realpath(filepath):
547
+ """Small caching wrapper around os.path.realpath to limit system calls"""
548
+ return os.path.realpath(filepath)
549
+
550
+
551
+ @_format_docstring(USER_APIS=list(_ALL_USER_APIS), INTERNAL_APIS=_ALL_INTERNAL_APIS)
552
+ def threadpool_info():
553
+ """Return the maximal number of threads for each detected library.
554
+
555
+ Return a list with all the supported libraries that have been found. Each
556
+ library is represented by a dict with the following information:
557
+
558
+ - "user_api" : user API. Possible values are {USER_APIS}.
559
+ - "internal_api": internal API. Possible values are {INTERNAL_APIS}.
560
+ - "prefix" : filename prefix of the specific implementation.
561
+ - "filepath": path to the loaded library.
562
+ - "version": version of the library (if available).
563
+ - "num_threads": the current thread limit.
564
+
565
+ In addition, each library may contain internal_api specific entries.
566
+ """
567
+ return ThreadpoolController().info()
568
+
569
+
570
+ class _ThreadpoolLimiter:
571
+ """The guts of ThreadpoolController.limit
572
+
573
+ Refer to the docstring of ThreadpoolController.limit for more details.
574
+
575
+ It will only act on the library controllers held by the provided `controller`.
576
+ Using the default constructor sets the limits right away such that it can be used as
577
+ a callable. Setting the limits can be delayed by using the `wrap` class method such
578
+ that it can be used as a decorator.
579
+ """
580
+
581
+ def __init__(self, controller, *, limits=None, user_api=None):
582
+ self._controller = controller
583
+ self._limits, self._user_api, self._prefixes = self._check_params(
584
+ limits, user_api
585
+ )
586
+ self._original_info = self._controller.info()
587
+ self._set_threadpool_limits()
588
+
589
+ def __enter__(self):
590
+ return self
591
+
592
+ def __exit__(self, type, value, traceback):
593
+ self.restore_original_limits()
594
+
595
+ @classmethod
596
+ def wrap(cls, controller, *, limits=None, user_api=None):
597
+ """Return an instance of this class that can be used as a decorator"""
598
+ return _ThreadpoolLimiterDecorator(
599
+ controller=controller, limits=limits, user_api=user_api
600
+ )
601
+
602
+ def restore_original_limits(self):
603
+ """Set the limits back to their original values"""
604
+ for lib_controller, original_info in zip(
605
+ self._controller.lib_controllers, self._original_info
606
+ ):
607
+ lib_controller.set_num_threads(original_info["num_threads"])
608
+
609
+ # Alias of `restore_original_limits` for backward compatibility
610
+ unregister = restore_original_limits
611
+
612
+ def get_original_num_threads(self):
613
+ """Original num_threads from before calling threadpool_limits
614
+
615
+ Return a dict `{user_api: num_threads}`.
616
+ """
617
+ num_threads = {}
618
+ warning_apis = []
619
+
620
+ for user_api in self._user_api:
621
+ limits = [
622
+ lib_info["num_threads"]
623
+ for lib_info in self._original_info
624
+ if lib_info["user_api"] == user_api
625
+ ]
626
+ limits = set(limits)
627
+ n_limits = len(limits)
628
+
629
+ if n_limits == 1:
630
+ limit = limits.pop()
631
+ elif n_limits == 0:
632
+ limit = None
633
+ else:
634
+ limit = min(limits)
635
+ warning_apis.append(user_api)
636
+
637
+ num_threads[user_api] = limit
638
+
639
+ if warning_apis:
640
+ warnings.warn(
641
+ "Multiple value possible for following user apis: "
642
+ + ", ".join(warning_apis)
643
+ + ". Returning the minimum."
644
+ )
645
+
646
+ return num_threads
647
+
648
+ def _check_params(self, limits, user_api):
649
+ """Suitable values for the _limits, _user_api and _prefixes attributes"""
650
+
651
+ if isinstance(limits, str) and limits == "sequential_blas_under_openmp":
652
+ (
653
+ limits,
654
+ user_api,
655
+ ) = self._controller._get_params_for_sequential_blas_under_openmp().values()
656
+
657
+ if limits is None or isinstance(limits, int):
658
+ if user_api is None:
659
+ user_api = _ALL_USER_APIS
660
+ elif user_api in _ALL_USER_APIS:
661
+ user_api = [user_api]
662
+ else:
663
+ raise ValueError(
664
+ f"user_api must be either in {_ALL_USER_APIS} or None. Got "
665
+ f"{user_api} instead."
666
+ )
667
+
668
+ if limits is not None:
669
+ limits = {api: limits for api in user_api}
670
+ prefixes = []
671
+ else:
672
+ if isinstance(limits, list):
673
+ # This should be a list of dicts of library info, for
674
+ # compatibility with the result from threadpool_info.
675
+ limits = {
676
+ lib_info["prefix"]: lib_info["num_threads"] for lib_info in limits
677
+ }
678
+ elif isinstance(limits, ThreadpoolController):
679
+ # To set the limits from the library controllers of a
680
+ # ThreadpoolController object.
681
+ limits = {
682
+ lib_controller.prefix: lib_controller.num_threads
683
+ for lib_controller in limits.lib_controllers
684
+ }
685
+
686
+ if not isinstance(limits, dict):
687
+ raise TypeError(
688
+ "limits must either be an int, a list, a dict, or "
689
+ f"'sequential_blas_under_openmp'. Got {type(limits)} instead"
690
+ )
691
+
692
+ # With a dictionary, can set both specific limit for given
693
+ # libraries and global limit for user_api. Fetch each separately.
694
+ prefixes = [prefix for prefix in limits if prefix in _ALL_PREFIXES]
695
+ user_api = [api for api in limits if api in _ALL_USER_APIS]
696
+
697
+ return limits, user_api, prefixes
698
+
699
+ def _set_threadpool_limits(self):
700
+ """Change the maximal number of threads in selected thread pools.
701
+
702
+ Return a list with all the supported libraries that have been found
703
+ matching `self._prefixes` and `self._user_api`.
704
+ """
705
+ if self._limits is None:
706
+ return
707
+
708
+ for lib_controller in self._controller.lib_controllers:
709
+ # self._limits is a dict {key: num_threads} where key is either
710
+ # a prefix or a user_api. If a library matches both, the limit
711
+ # corresponding to the prefix is chosen.
712
+ if lib_controller.prefix in self._limits:
713
+ num_threads = self._limits[lib_controller.prefix]
714
+ elif lib_controller.user_api in self._limits:
715
+ num_threads = self._limits[lib_controller.user_api]
716
+ else:
717
+ continue
718
+
719
+ if num_threads is not None:
720
+ lib_controller.set_num_threads(num_threads)
721
+
722
+
723
+ class _ThreadpoolLimiterDecorator(_ThreadpoolLimiter, ContextDecorator):
724
+ """Same as _ThreadpoolLimiter but to be used as a decorator"""
725
+
726
+ def __init__(self, controller, *, limits=None, user_api=None):
727
+ self._limits, self._user_api, self._prefixes = self._check_params(
728
+ limits, user_api
729
+ )
730
+ self._controller = controller
731
+
732
+ def __enter__(self):
733
+ # we need to set the limits here and not in the __init__ because we want the
734
+ # limits to be set when calling the decorated function, not when creating the
735
+ # decorator.
736
+ self._original_info = self._controller.info()
737
+ self._set_threadpool_limits()
738
+ return self
739
+
740
+
741
+ @_format_docstring(
742
+ USER_APIS=", ".join(f'"{api}"' for api in _ALL_USER_APIS),
743
+ BLAS_LIBS=", ".join(_ALL_BLAS_LIBRARIES),
744
+ OPENMP_LIBS=", ".join(_ALL_OPENMP_LIBRARIES),
745
+ )
746
+ class threadpool_limits(_ThreadpoolLimiter):
747
+ """Change the maximal number of threads that can be used in thread pools.
748
+
749
+ This object can be used either as a callable (the construction of this object
750
+ limits the number of threads), as a context manager in a `with` block to
751
+ automatically restore the original state of the controlled libraries when exiting
752
+ the block, or as a decorator through its `wrap` method.
753
+
754
+ Set the maximal number of threads that can be used in thread pools used in
755
+ the supported libraries to `limit`. This function works for libraries that
756
+ are already loaded in the interpreter and can be changed dynamically.
757
+
758
+ This effect is global and impacts the whole Python process. There is no thread level
759
+ isolation as these libraries do not offer thread-local APIs to configure the number
760
+ of threads to use in nested parallel calls.
761
+
762
+ Parameters
763
+ ----------
764
+ limits : int, dict, 'sequential_blas_under_openmp' or None (default=None)
765
+ The maximal number of threads that can be used in thread pools
766
+
767
+ - If int, sets the maximum number of threads to `limits` for each
768
+ library selected by `user_api`.
769
+
770
+ - If it is a dictionary `{{key: max_threads}}`, this function sets a
771
+ custom maximum number of threads for each `key` which can be either a
772
+ `user_api` or a `prefix` for a specific library.
773
+
774
+ - If 'sequential_blas_under_openmp', it will chose the appropriate `limits`
775
+ and `user_api` parameters for the specific use case of sequential BLAS
776
+ calls within an OpenMP parallel region. The `user_api` parameter is
777
+ ignored.
778
+
779
+ - If None, this function does not do anything.
780
+
781
+ user_api : {USER_APIS} or None (default=None)
782
+ APIs of libraries to limit. Used only if `limits` is an int.
783
+
784
+ - If "blas", it will only limit BLAS supported libraries ({BLAS_LIBS}).
785
+
786
+ - If "openmp", it will only limit OpenMP supported libraries
787
+ ({OPENMP_LIBS}). Note that it can affect the number of threads used
788
+ by the BLAS libraries if they rely on OpenMP.
789
+
790
+ - If None, this function will apply to all supported libraries.
791
+ """
792
+
793
+ def __init__(self, limits=None, user_api=None):
794
+ super().__init__(ThreadpoolController(), limits=limits, user_api=user_api)
795
+
796
+ @classmethod
797
+ def wrap(cls, limits=None, user_api=None):
798
+ return super().wrap(ThreadpoolController(), limits=limits, user_api=user_api)
799
+
800
+
801
+ class ThreadpoolController:
802
+ """Collection of LibController objects for all loaded supported libraries
803
+
804
+ Attributes
805
+ ----------
806
+ lib_controllers : list of `LibController` objects
807
+ The list of library controllers of all loaded supported libraries.
808
+ """
809
+
810
+ # Cache for libc under POSIX and a few system libraries under Windows.
811
+ # We use a class level cache instead of an instance level cache because
812
+ # it's very unlikely that a shared library will be unloaded and reloaded
813
+ # during the lifetime of a program.
814
+ _system_libraries = dict()
815
+
816
+ def __init__(self):
817
+ self.lib_controllers = []
818
+ self._load_libraries()
819
+ self._warn_if_incompatible_openmp()
820
+
821
+ @classmethod
822
+ def _from_controllers(cls, lib_controllers):
823
+ new_controller = cls.__new__(cls)
824
+ new_controller.lib_controllers = lib_controllers
825
+ return new_controller
826
+
827
+ def info(self):
828
+ """Return lib_controllers info as a list of dicts"""
829
+ return [lib_controller.info() for lib_controller in self.lib_controllers]
830
+
831
+ def select(self, **kwargs):
832
+ """Return a ThreadpoolController containing a subset of its current
833
+ library controllers
834
+
835
+ It will select all libraries matching at least one pair (key, value) from kwargs
836
+ where key is an entry of the library info dict (like "user_api", "internal_api",
837
+ "prefix", ...) and value is the value or a list of acceptable values for that
838
+ entry.
839
+
840
+ For instance, `ThreadpoolController().select(internal_api=["blis", "openblas"])`
841
+ will select all library controllers whose internal_api is either "blis" or
842
+ "openblas".
843
+ """
844
+ for key, vals in kwargs.items():
845
+ kwargs[key] = [vals] if not isinstance(vals, list) else vals
846
+
847
+ lib_controllers = [
848
+ lib_controller
849
+ for lib_controller in self.lib_controllers
850
+ if any(
851
+ getattr(lib_controller, key, None) in vals
852
+ for key, vals in kwargs.items()
853
+ )
854
+ ]
855
+
856
+ return ThreadpoolController._from_controllers(lib_controllers)
857
+
858
+ def _get_params_for_sequential_blas_under_openmp(self):
859
+ """Return appropriate params to use for a sequential BLAS call in an OpenMP loop
860
+
861
+ This function takes into account the unexpected behavior of OpenBLAS with the
862
+ OpenMP threading layer.
863
+ """
864
+ if self.select(
865
+ internal_api="openblas", threading_layer="openmp"
866
+ ).lib_controllers:
867
+ return {"limits": None, "user_api": None}
868
+ return {"limits": 1, "user_api": "blas"}
869
+
870
+ @_format_docstring(
871
+ USER_APIS=", ".join('"{}"'.format(api) for api in _ALL_USER_APIS),
872
+ BLAS_LIBS=", ".join(_ALL_BLAS_LIBRARIES),
873
+ OPENMP_LIBS=", ".join(_ALL_OPENMP_LIBRARIES),
874
+ )
875
+ def limit(self, *, limits=None, user_api=None):
876
+ """Change the maximal number of threads that can be used in thread pools.
877
+
878
+ This function returns an object that can be used either as a callable (the
879
+ construction of this object limits the number of threads) or as a context
880
+ manager, in a `with` block to automatically restore the original state of the
881
+ controlled libraries when exiting the block.
882
+
883
+ Set the maximal number of threads that can be used in thread pools used in
884
+ the supported libraries to `limits`. This function works for libraries that
885
+ are already loaded in the interpreter and can be changed dynamically.
886
+
887
+ This effect is global and impacts the whole Python process. There is no thread
888
+ level isolation as these libraries do not offer thread-local APIs to configure
889
+ the number of threads to use in nested parallel calls.
890
+
891
+ Parameters
892
+ ----------
893
+ limits : int, dict, 'sequential_blas_under_openmp' or None (default=None)
894
+ The maximal number of threads that can be used in thread pools
895
+
896
+ - If int, sets the maximum number of threads to `limits` for each
897
+ library selected by `user_api`.
898
+
899
+ - If it is a dictionary `{{key: max_threads}}`, this function sets a
900
+ custom maximum number of threads for each `key` which can be either a
901
+ `user_api` or a `prefix` for a specific library.
902
+
903
+ - If 'sequential_blas_under_openmp', it will chose the appropriate `limits`
904
+ and `user_api` parameters for the specific use case of sequential BLAS
905
+ calls within an OpenMP parallel region. The `user_api` parameter is
906
+ ignored.
907
+
908
+ - If None, this function does not do anything.
909
+
910
+ user_api : {USER_APIS} or None (default=None)
911
+ APIs of libraries to limit. Used only if `limits` is an int.
912
+
913
+ - If "blas", it will only limit BLAS supported libraries ({BLAS_LIBS}).
914
+
915
+ - If "openmp", it will only limit OpenMP supported libraries
916
+ ({OPENMP_LIBS}). Note that it can affect the number of threads used
917
+ by the BLAS libraries if they rely on OpenMP.
918
+
919
+ - If None, this function will apply to all supported libraries.
920
+ """
921
+ return _ThreadpoolLimiter(self, limits=limits, user_api=user_api)
922
+
923
+ @_format_docstring(
924
+ USER_APIS=", ".join('"{}"'.format(api) for api in _ALL_USER_APIS),
925
+ BLAS_LIBS=", ".join(_ALL_BLAS_LIBRARIES),
926
+ OPENMP_LIBS=", ".join(_ALL_OPENMP_LIBRARIES),
927
+ )
928
+ def wrap(self, *, limits=None, user_api=None):
929
+ """Change the maximal number of threads that can be used in thread pools.
930
+
931
+ This function returns an object that can be used as a decorator.
932
+
933
+ Set the maximal number of threads that can be used in thread pools used in
934
+ the supported libraries to `limits`. This function works for libraries that
935
+ are already loaded in the interpreter and can be changed dynamically.
936
+
937
+ Parameters
938
+ ----------
939
+ limits : int, dict or None (default=None)
940
+ The maximal number of threads that can be used in thread pools
941
+
942
+ - If int, sets the maximum number of threads to `limits` for each
943
+ library selected by `user_api`.
944
+
945
+ - If it is a dictionary `{{key: max_threads}}`, this function sets a
946
+ custom maximum number of threads for each `key` which can be either a
947
+ `user_api` or a `prefix` for a specific library.
948
+
949
+ - If None, this function does not do anything.
950
+
951
+ user_api : {USER_APIS} or None (default=None)
952
+ APIs of libraries to limit. Used only if `limits` is an int.
953
+
954
+ - If "blas", it will only limit BLAS supported libraries ({BLAS_LIBS}).
955
+
956
+ - If "openmp", it will only limit OpenMP supported libraries
957
+ ({OPENMP_LIBS}). Note that it can affect the number of threads used
958
+ by the BLAS libraries if they rely on OpenMP.
959
+
960
+ - If None, this function will apply to all supported libraries.
961
+ """
962
+ return _ThreadpoolLimiter.wrap(self, limits=limits, user_api=user_api)
963
+
964
+ def __len__(self):
965
+ return len(self.lib_controllers)
966
+
967
+ def _load_libraries(self):
968
+ """Loop through loaded shared libraries and store the supported ones"""
969
+ if sys.platform == "darwin":
970
+ self._find_libraries_with_dyld()
971
+ elif sys.platform == "win32":
972
+ self._find_libraries_with_enum_process_module_ex()
973
+ elif "pyodide" in sys.modules:
974
+ self._find_libraries_pyodide()
975
+ else:
976
+ self._find_libraries_with_dl_iterate_phdr()
977
+
978
+ def _find_libraries_with_dl_iterate_phdr(self):
979
+ """Loop through loaded libraries and return binders on supported ones
980
+
981
+ This function is expected to work on POSIX system only.
982
+ This code is adapted from code by Intel developer @anton-malakhov
983
+ available at https://github.com/IntelPython/smp
984
+
985
+ Copyright (c) 2017, Intel Corporation published under the BSD 3-Clause
986
+ license
987
+ """
988
+ libc = self._get_libc()
989
+ if not hasattr(libc, "dl_iterate_phdr"): # pragma: no cover
990
+ warnings.warn(
991
+ "Could not find dl_iterate_phdr in the C standard library.",
992
+ RuntimeWarning,
993
+ )
994
+ return []
995
+
996
+ # Callback function for `dl_iterate_phdr` which is called for every
997
+ # library loaded in the current process until it returns 1.
998
+ def match_library_callback(info, size, data):
999
+ # Get the path of the current library
1000
+ filepath = info.contents.dlpi_name
1001
+ if filepath:
1002
+ filepath = filepath.decode("utf-8")
1003
+
1004
+ # Store the library controller if it is supported and selected
1005
+ self._make_controller_from_path(filepath)
1006
+ return 0
1007
+
1008
+ c_func_signature = ctypes.CFUNCTYPE(
1009
+ ctypes.c_int, # Return type
1010
+ ctypes.POINTER(_dl_phdr_info),
1011
+ ctypes.c_size_t,
1012
+ ctypes.c_char_p,
1013
+ )
1014
+ c_match_library_callback = c_func_signature(match_library_callback)
1015
+
1016
+ data = ctypes.c_char_p(b"")
1017
+ libc.dl_iterate_phdr(c_match_library_callback, data)
1018
+
1019
+ def _find_libraries_with_dyld(self):
1020
+ """Loop through loaded libraries and return binders on supported ones
1021
+
1022
+ This function is expected to work on OSX system only
1023
+ """
1024
+ libc = self._get_libc()
1025
+ if not hasattr(libc, "_dyld_image_count"): # pragma: no cover
1026
+ warnings.warn(
1027
+ "Could not find _dyld_image_count in the C standard library.",
1028
+ RuntimeWarning,
1029
+ )
1030
+ return []
1031
+
1032
+ n_dyld = libc._dyld_image_count()
1033
+ libc._dyld_get_image_name.restype = ctypes.c_char_p
1034
+
1035
+ for i in range(n_dyld):
1036
+ filepath = ctypes.string_at(libc._dyld_get_image_name(i))
1037
+ filepath = filepath.decode("utf-8")
1038
+
1039
+ # Store the library controller if it is supported and selected
1040
+ self._make_controller_from_path(filepath)
1041
+
1042
+ def _find_libraries_with_enum_process_module_ex(self):
1043
+ """Loop through loaded libraries and return binders on supported ones
1044
+
1045
+ This function is expected to work on windows system only.
1046
+ This code is adapted from code by Philipp Hagemeister @phihag available
1047
+ at https://stackoverflow.com/questions/17474574
1048
+ """
1049
+ from ctypes.wintypes import DWORD, HMODULE, MAX_PATH
1050
+
1051
+ PROCESS_QUERY_INFORMATION = 0x0400
1052
+ PROCESS_VM_READ = 0x0010
1053
+
1054
+ LIST_LIBRARIES_ALL = 0x03
1055
+
1056
+ ps_api = self._get_windll("Psapi")
1057
+ kernel_32 = self._get_windll("kernel32")
1058
+
1059
+ h_process = kernel_32.OpenProcess(
1060
+ PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, False, os.getpid()
1061
+ )
1062
+ if not h_process: # pragma: no cover
1063
+ raise OSError(f"Could not open PID {os.getpid()}")
1064
+
1065
+ try:
1066
+ buf_count = 256
1067
+ needed = DWORD()
1068
+ # Grow the buffer until it becomes large enough to hold all the
1069
+ # module headers
1070
+ while True:
1071
+ buf = (HMODULE * buf_count)()
1072
+ buf_size = ctypes.sizeof(buf)
1073
+ if not ps_api.EnumProcessModulesEx(
1074
+ h_process,
1075
+ ctypes.byref(buf),
1076
+ buf_size,
1077
+ ctypes.byref(needed),
1078
+ LIST_LIBRARIES_ALL,
1079
+ ):
1080
+ raise OSError("EnumProcessModulesEx failed")
1081
+ if buf_size >= needed.value:
1082
+ break
1083
+ buf_count = needed.value // (buf_size // buf_count)
1084
+
1085
+ count = needed.value // (buf_size // buf_count)
1086
+ h_modules = map(HMODULE, buf[:count])
1087
+
1088
+ # Loop through all the module headers and get the library path
1089
+ # Allocate a buffer for the path 10 times the size of MAX_PATH to take
1090
+ # into account long path names.
1091
+ max_path = 10 * MAX_PATH
1092
+ buf = ctypes.create_unicode_buffer(max_path)
1093
+ n_size = DWORD()
1094
+ for h_module in h_modules:
1095
+ # Get the path of the current module
1096
+ if not ps_api.GetModuleFileNameExW(
1097
+ h_process, h_module, ctypes.byref(buf), ctypes.byref(n_size)
1098
+ ):
1099
+ raise OSError("GetModuleFileNameEx failed")
1100
+ filepath = buf.value
1101
+
1102
+ if len(filepath) == max_path: # pragma: no cover
1103
+ warnings.warn(
1104
+ "Could not get the full path of a dynamic library (path too "
1105
+ "long). This library will be ignored and threadpoolctl might "
1106
+ "not be able to control or display information about all "
1107
+ f"loaded libraries. Here's the truncated path: {filepath!r}",
1108
+ RuntimeWarning,
1109
+ )
1110
+ else:
1111
+ # Store the library controller if it is supported and selected
1112
+ self._make_controller_from_path(filepath)
1113
+ finally:
1114
+ kernel_32.CloseHandle(h_process)
1115
+
1116
+ def _find_libraries_pyodide(self):
1117
+ """Pyodide specific implementation for finding loaded libraries.
1118
+
1119
+ Adapted from suggestion in https://github.com/joblib/threadpoolctl/pull/169#issuecomment-1946696449.
1120
+
1121
+ One day, we may have a simpler solution. libc dl_iterate_phdr needs to
1122
+ be implemented in Emscripten and exposed in Pyodide, see
1123
+ https://github.com/emscripten-core/emscripten/issues/21354 for more
1124
+ details.
1125
+ """
1126
+ try:
1127
+ from pyodide_js._module import LDSO
1128
+ except ImportError:
1129
+ warnings.warn(
1130
+ "Unable to import LDSO from pyodide_js._module. This should never "
1131
+ "happen."
1132
+ )
1133
+ return
1134
+
1135
+ for filepath in LDSO.loadedLibsByName.as_object_map():
1136
+ # Some libraries are duplicated by Pyodide and do not exist in the
1137
+ # filesystem, so we first check for the existence of the file. For
1138
+ # more details, see
1139
+ # https://github.com/joblib/threadpoolctl/pull/169#issuecomment-1947946728
1140
+ if os.path.exists(filepath):
1141
+ self._make_controller_from_path(filepath)
1142
+
1143
+ def _make_controller_from_path(self, filepath):
1144
+ """Store a library controller if it is supported and selected"""
1145
+ # Required to resolve symlinks
1146
+ filepath = _realpath(filepath)
1147
+ # `lower` required to take account of OpenMP dll case on Windows
1148
+ # (vcomp, VCOMP, Vcomp, ...)
1149
+ filename = os.path.basename(filepath).lower()
1150
+
1151
+ # Loop through supported libraries to find if this filename corresponds
1152
+ # to a supported one.
1153
+ for controller_class in _ALL_CONTROLLERS:
1154
+ # check if filename matches a supported prefix
1155
+ prefix = self._check_prefix(filename, controller_class.filename_prefixes)
1156
+
1157
+ # filename does not match any of the prefixes of the candidate
1158
+ # library. move to next library.
1159
+ if prefix is None:
1160
+ continue
1161
+
1162
+ # workaround for BLAS libraries packaged by conda-forge on windows, which
1163
+ # are all renamed "libblas.dll". We thus have to check to which BLAS
1164
+ # implementation it actually corresponds looking for implementation
1165
+ # specific symbols.
1166
+ if prefix == "libblas":
1167
+ if filename.endswith(".dll"):
1168
+ libblas = ctypes.CDLL(filepath, _RTLD_NOLOAD)
1169
+ if not any(
1170
+ hasattr(libblas, func)
1171
+ for func in controller_class.check_symbols
1172
+ ):
1173
+ continue
1174
+ else:
1175
+ # We ignore libblas on other platforms than windows because there
1176
+ # might be a libblas dso comming with openblas for instance that
1177
+ # can't be used to instantiate a pertinent LibController (many
1178
+ # symbols are missing) and would create confusion by making a
1179
+ # duplicate entry in threadpool_info.
1180
+ continue
1181
+
1182
+ # filename matches a prefix. Now we check if the library has the symbols we
1183
+ # are looking for. If none of the symbols exists, it's very likely not the
1184
+ # expected library (e.g. a library having a common prefix with one of the
1185
+ # our supported libraries). Otherwise, create and store the library
1186
+ # controller.
1187
+ lib_controller = controller_class(
1188
+ filepath=filepath, prefix=prefix, parent=self
1189
+ )
1190
+
1191
+ if filepath in (lib.filepath for lib in self.lib_controllers):
1192
+ # We already have a controller for this library.
1193
+ continue
1194
+
1195
+ if not hasattr(controller_class, "check_symbols") or any(
1196
+ hasattr(lib_controller.dynlib, func)
1197
+ for func in controller_class.check_symbols
1198
+ ):
1199
+ self.lib_controllers.append(lib_controller)
1200
+
1201
+ def _check_prefix(self, library_basename, filename_prefixes):
1202
+ """Return the prefix library_basename starts with
1203
+
1204
+ Return None if none matches.
1205
+ """
1206
+ for prefix in filename_prefixes:
1207
+ if library_basename.startswith(prefix):
1208
+ return prefix
1209
+ return None
1210
+
1211
+ def _warn_if_incompatible_openmp(self):
1212
+ """Raise a warning if llvm-OpenMP and intel-OpenMP are both loaded"""
1213
+ prefixes = [lib_controller.prefix for lib_controller in self.lib_controllers]
1214
+ msg = textwrap.dedent(
1215
+ """
1216
+ Found Intel OpenMP ('libiomp') and LLVM OpenMP ('libomp') loaded at
1217
+ the same time. Both libraries are known to be incompatible and this
1218
+ can cause random crashes or deadlocks on Linux when loaded in the
1219
+ same Python program.
1220
+ Using threadpoolctl may cause crashes or deadlocks. For more
1221
+ information and possible workarounds, please see
1222
+ https://github.com/joblib/threadpoolctl/blob/master/multiple_openmp.md
1223
+ """
1224
+ )
1225
+ if "libomp" in prefixes and "libiomp" in prefixes:
1226
+ warnings.warn(msg, RuntimeWarning)
1227
+
1228
+ @classmethod
1229
+ def _get_libc(cls):
1230
+ """Load the lib-C for unix systems."""
1231
+ libc = cls._system_libraries.get("libc")
1232
+ if libc is None:
1233
+ # Remark: If libc is statically linked or if Python is linked against an
1234
+ # alternative implementation of libc like musl, find_library will return
1235
+ # None and CDLL will load the main program itself which should contain the
1236
+ # libc symbols. We still name it libc for convenience.
1237
+ # If the main program does not contain the libc symbols, it's ok because
1238
+ # we check their presence later anyway.
1239
+ libc = ctypes.CDLL(find_library("c"), mode=_RTLD_NOLOAD)
1240
+ cls._system_libraries["libc"] = libc
1241
+ return libc
1242
+
1243
+ @classmethod
1244
+ def _get_windll(cls, dll_name):
1245
+ """Load a windows DLL"""
1246
+ dll = cls._system_libraries.get(dll_name)
1247
+ if dll is None:
1248
+ dll = ctypes.WinDLL(f"{dll_name}.dll")
1249
+ cls._system_libraries[dll_name] = dll
1250
+ return dll
1251
+
1252
+
1253
+ def _main():
1254
+ """Commandline interface to display thread-pool information and exit."""
1255
+ import argparse
1256
+ import importlib
1257
+ import json
1258
+ import sys
1259
+
1260
+ parser = argparse.ArgumentParser(
1261
+ usage="python -m threadpoolctl -i numpy scipy.linalg xgboost",
1262
+ description="Display thread-pool information and exit.",
1263
+ )
1264
+ parser.add_argument(
1265
+ "-i",
1266
+ "--import",
1267
+ dest="modules",
1268
+ nargs="*",
1269
+ default=(),
1270
+ help="Python modules to import before introspecting thread-pools.",
1271
+ )
1272
+ parser.add_argument(
1273
+ "-c",
1274
+ "--command",
1275
+ help="a Python statement to execute before introspecting thread-pools.",
1276
+ )
1277
+
1278
+ options = parser.parse_args(sys.argv[1:])
1279
+ for module in options.modules:
1280
+ try:
1281
+ importlib.import_module(module, package=None)
1282
+ except ImportError:
1283
+ print("WARNING: could not import", module, file=sys.stderr)
1284
+
1285
+ if options.command:
1286
+ exec(options.command)
1287
+
1288
+ print(json.dumps(threadpool_info(), indent=2))
1289
+
1290
+
1291
+ if __name__ == "__main__":
1292
+ _main()
.venv/lib/python3.11/site-packages/typing_extensions.py ADDED
The diff for this file is too large to render. See raw diff
 
.venv/pyvenv.cfg ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ home = /usr/bin
2
+ include-system-site-packages = true
3
+ version = 3.11.10
4
+ executable = /usr/bin/python3.11
5
+ command = /usr/bin/python3 -m venv --system-site-packages /workspace/.venv
.venv/share/jupyter/nbextensions/jupyter-js-widgets/extension.js ADDED
The diff for this file is too large to render. See raw diff
 
.venv/share/jupyter/nbextensions/jupyter-js-widgets/extension.js.LICENSE.txt ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
3
+ *
4
+ * Copyright (c) 2014-2017, Jon Schlinkert.
5
+ * Released under the MIT License.
6
+ */
7
+
8
+ /*!
9
+ * jQuery JavaScript Library v3.7.1
10
+ * https://jquery.com/
11
+ *
12
+ * Copyright OpenJS Foundation and other contributors
13
+ * Released under the MIT license
14
+ * https://jquery.org/license
15
+ *
16
+ * Date: 2023-08-28T13:37Z
17
+ */
.venv/share/jupyter/nbextensions/jupyter-js-widgets/extension.js.map ADDED
The diff for this file is too large to render. See raw diff
 
data/spatial codes/42899461.json ADDED
The diff for this file is too large to render. See raw diff
 
encoder/adapters.py CHANGED
@@ -193,39 +193,20 @@ def adapt_da3_sam3(root=None, da3_path=None, sam3_path=None, **_):
193
 
194
 
195
  # ==========================================================================================
196
- # SegVGGT -- expects one deliberately boring NPZ export. SegVGGT's own query/pose decoding
197
- # stays in its runner; this adapter only groups already-world-space points by instance mask.
198
  # ==========================================================================================
199
 
200
 
201
- def adapt_segvggt(
202
- root=None,
203
- path=None,
204
- video_path=None,
205
- model_root=None,
206
- checkpoint=None,
207
- frame_count=32,
208
- rebuild=False,
209
- **_,
210
- ):
211
- """Run SegVGGT if needed, then translate its raw NPZ to canonical geometry."""
212
  path = path or root
213
  if path is None:
214
  raise ValueError("SegVGGT cache path is required")
215
  if os.path.isdir(path):
216
  path = os.path.join(path, "geometry.npz")
217
- if rebuild or not os.path.exists(path):
218
- if not video_path:
219
- raise FileNotFoundError(f"SegVGGT raw cache does not exist: {path}")
220
- from segvggt_runner import run_segvggt
221
-
222
- run_segvggt(
223
- video_path=video_path,
224
- output_path=path,
225
- model_root=model_root,
226
- checkpoint=checkpoint,
227
- frame_count=frame_count,
228
- )
229
  d = np.load(path, allow_pickle=True)
230
  world, masks = (
231
  np.asarray(d["world_points"], np.float32),
 
193
 
194
 
195
  # ==========================================================================================
196
+ # SegVGGT -- reads one deliberately boring NPZ export and groups already-world-space
197
+ # points by instance mask. Model inference is intentionally outside the encoder package.
198
  # ==========================================================================================
199
 
200
 
201
+ def adapt_segvggt(root=None, path=None, **_):
202
+ """Translate an existing SegVGGT NPZ export to canonical geometry."""
 
 
 
 
 
 
 
 
 
203
  path = path or root
204
  if path is None:
205
  raise ValueError("SegVGGT cache path is required")
206
  if os.path.isdir(path):
207
  path = os.path.join(path, "geometry.npz")
208
+ if not os.path.exists(path):
209
+ raise FileNotFoundError(f"SegVGGT raw cache does not exist: {path}")
 
 
 
 
 
 
 
 
 
 
210
  d = np.load(path, allow_pickle=True)
211
  world, masks = (
212
  np.asarray(d["world_points"], np.float32),
encoder/config.py CHANGED
@@ -14,13 +14,6 @@ VSI_ROOT = Path(os.environ.get("VSI_ROOT", "/root/data/VSI-Bench"))
14
  JSONL = Path(os.environ.get("VSI_JSONL", VSI_ROOT / "test.jsonl"))
15
  CACHE_ROOT = Path(os.environ.get("VSI_CACHE_ROOT", DATA_ROOT / "caches"))
16
  CODES_ROOT = Path(os.environ.get("VSI_CODES", DATA_ROOT / "spatial codes"))
17
- SEGVGGT_ROOT = Path(os.environ.get("VSI_SEGVGGT_ROOT", "/root/models/SegVGGT"))
18
- SEGVGGT_CHECKPOINT = Path(
19
- os.environ.get(
20
- "VSI_SEGVGGT_CHECKPOINT", SEGVGGT_ROOT / "checkpoint/segvggt_scannet200.pt"
21
- )
22
- )
23
-
24
  VIDEO_DATASETS = ("scannet", "scannetpp", "arkitscenes")
25
 
26
  ADAPTERS = {
 
14
  JSONL = Path(os.environ.get("VSI_JSONL", VSI_ROOT / "test.jsonl"))
15
  CACHE_ROOT = Path(os.environ.get("VSI_CACHE_ROOT", DATA_ROOT / "caches"))
16
  CODES_ROOT = Path(os.environ.get("VSI_CODES", DATA_ROOT / "spatial codes"))
 
 
 
 
 
 
 
17
  VIDEO_DATASETS = ("scannet", "scannetpp", "arkitscenes")
18
 
19
  ADAPTERS = {
encoder/run.py CHANGED
@@ -12,25 +12,15 @@ import config as C
12
 
13
 
14
  def _adapter_kwargs(scene: str, model: str) -> dict:
15
- common = {
16
- "scene": scene,
17
- "video_path": C.video_path(scene),
18
- "frame_count": C.FRAMES_PER_VIDEO,
19
- }
20
  if model == "segvggt":
21
- return {
22
- **common,
23
- "path": C.segvggt_cache_file(scene, model),
24
- "model_root": str(C.SEGVGGT_ROOT),
25
- "checkpoint": str(C.SEGVGGT_CHECKPOINT),
26
- }
27
  if model == "da3_sam3":
28
  return {
29
- **common,
30
  "da3_path": C.da3_cache_file(scene, model),
31
  "sam3_path": C.sam3_cache_file(scene, model),
32
  }
33
- return {**common, "root": C.model_cache_dir(model)}
34
 
35
 
36
  def cache_or_load(scene: str, model: str | None = None, rebuild: bool = False):
 
12
 
13
 
14
  def _adapter_kwargs(scene: str, model: str) -> dict:
 
 
 
 
 
15
  if model == "segvggt":
16
+ return {"scene": scene, "path": C.segvggt_cache_file(scene, model)}
 
 
 
 
 
17
  if model == "da3_sam3":
18
  return {
19
+ "scene": scene,
20
  "da3_path": C.da3_cache_file(scene, model),
21
  "sam3_path": C.sam3_cache_file(scene, model),
22
  }
23
+ return {"scene": scene, "root": C.model_cache_dir(model)}
24
 
25
 
26
  def cache_or_load(scene: str, model: str | None = None, rebuild: bool = False):
inference/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ """Model inference that produces raw geometry caches for the encoder."""
inference/adapters.py ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Model-specific inference adapters that write encoder-compatible raw caches."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from abc import ABC, abstractmethod
6
+ import os
7
+ from pathlib import Path
8
+ import sys
9
+
10
+ import numpy as np
11
+
12
+
13
+ class InferenceAdapter(ABC):
14
+ """Common interface implemented by every inference backend."""
15
+
16
+ output_suffix = ".npz"
17
+
18
+ @abstractmethod
19
+ def load_model(self, device: str) -> None:
20
+ """Load model state once for repeated scene inference."""
21
+
22
+ @abstractmethod
23
+ def run_scene(self, video_path: str, output_path: str, frame_count: int) -> None:
24
+ """Run one video and atomically write a raw encoder cache."""
25
+
26
+
27
+ class SegVGGTAdapter(InferenceAdapter):
28
+ """SegVGGT inference producing the NPZ fields consumed by encoder/adapters.py."""
29
+
30
+ classes = """wall|floor|chair|table|door|couch|cabinet|shelf|desk|office chair|bed|pillow|sink|picture|window|toilet|bookshelf|monitor|curtain|book|armchair|coffee table|box|refrigerator|lamp|kitchen cabinet|towel|clothes|tv|nightstand|counter|dresser|stool|cushion|plant|ceiling|bathtub|end table|dining table|keyboard|bag|backpack|toilet paper|printer|tv stand|whiteboard|blanket|shower curtain|trash can|closet|stairs|microwave|stove|shoe|computer tower|bottle|bin|ottoman|bench|board|washing machine|mirror|copier|basket|sofa chair|file cabinet|fan|laptop|shower|paper|person|paper towel dispenser|oven|blinds|rack|plate|blackboard|piano|suitcase|rail|radiator|recycling bin|container|wardrobe|soap dispenser|telephone""".split(
31
+ "|"
32
+ )
33
+
34
+ def __init__(self, model_root=None, checkpoint=None):
35
+ self.model_root = Path(
36
+ model_root or os.environ.get("VSI_SEGVGGT_ROOT", "/root/models/SegVGGT")
37
+ )
38
+ self.checkpoint = Path(
39
+ checkpoint
40
+ or os.environ.get(
41
+ "VSI_SEGVGGT_CHECKPOINT",
42
+ self.model_root / "checkpoint/segvggt_scannet200.pt",
43
+ )
44
+ )
45
+ self.model = self.device = self.dtype = self.runtime = None
46
+
47
+ def load_model(self, device: str) -> None:
48
+ if not self.model_root.is_dir():
49
+ raise FileNotFoundError(f"SegVGGT repository not found: {self.model_root}")
50
+ if not self.checkpoint.is_file():
51
+ raise FileNotFoundError(f"SegVGGT checkpoint not found: {self.checkpoint}")
52
+ sys.path.insert(0, str(self.model_root))
53
+ try:
54
+ import torch
55
+ import torch.nn.functional as functional
56
+ from eval.instance_eval_common import predict_by_feat_instance
57
+ from hydra import compose, initialize_config_dir
58
+ from hydra.utils import instantiate
59
+ from segvggt.utils.geometry import (
60
+ closed_form_inverse_se3,
61
+ unproject_depth_map_to_point_map,
62
+ )
63
+ from segvggt.utils.pose_enc import pose_encoding_to_extri_intri
64
+ except ImportError as exc:
65
+ raise RuntimeError(
66
+ f"missing SegVGGT dependency ({exc}); install {self.model_root}/requirements.txt"
67
+ ) from exc
68
+ self.device = torch.device(device)
69
+ if self.device.type == "cuda" and not torch.cuda.is_available():
70
+ raise RuntimeError("CUDA worker requested but CUDA is unavailable")
71
+ self.dtype = (
72
+ torch.bfloat16
73
+ if self.device.type == "cpu"
74
+ or torch.cuda.get_device_capability(self.device)[0] >= 8
75
+ else torch.float16
76
+ )
77
+ with initialize_config_dir(
78
+ version_base=None, config_dir=str(self.model_root / "configs/eval")
79
+ ):
80
+ config = compose(config_name="segvggt_scannet200")
81
+ model = instantiate(config.model, _recursive_=False)
82
+ state = torch.load(self.checkpoint, map_location="cpu")
83
+ model.load_state_dict(
84
+ state["model"] if "model" in state else state, strict=False
85
+ )
86
+ self.model = model.to(self.device).to(self.dtype).eval()
87
+ self.runtime = (
88
+ torch,
89
+ functional,
90
+ predict_by_feat_instance,
91
+ unproject_depth_map_to_point_map,
92
+ closed_form_inverse_se3,
93
+ pose_encoding_to_extri_intri,
94
+ )
95
+
96
+ @staticmethod
97
+ def _read_video(path, frame_count):
98
+ import cv2
99
+
100
+ capture = cv2.VideoCapture(path)
101
+ if not capture.isOpened():
102
+ raise RuntimeError(f"cannot open video: {path}")
103
+ try:
104
+ fps = capture.get(cv2.CAP_PROP_FPS) or 1.0
105
+ total = int(capture.get(cv2.CAP_PROP_FRAME_COUNT))
106
+ if total < frame_count:
107
+ raise ValueError(
108
+ f"{path} has {total} frames; {frame_count} are required"
109
+ )
110
+ indices = np.linspace(0, total - 1, frame_count, dtype=int)
111
+ frames = []
112
+ for index in indices:
113
+ capture.set(cv2.CAP_PROP_POS_FRAMES, int(index))
114
+ ok, frame = capture.read()
115
+ if not ok:
116
+ raise RuntimeError(f"failed reading frame {index} from {path}")
117
+ frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
118
+ height, width = frame.shape[:2]
119
+ new_height = max(14, round(height * 518 / width / 14) * 14)
120
+ frame = cv2.resize(
121
+ frame, (518, new_height), interpolation=cv2.INTER_LANCZOS4
122
+ )
123
+ if new_height > 518:
124
+ offset = (new_height - 518) // 2
125
+ frame = frame[offset : offset + 518]
126
+ frames.append(frame)
127
+ finally:
128
+ capture.release()
129
+ return np.stack(frames), indices.astype(np.float32) / fps
130
+
131
+ def run_scene(self, video_path, output_path, frame_count):
132
+ if self.model is None or self.runtime is None:
133
+ raise RuntimeError("load_model() must be called before run_scene()")
134
+ torch, functional, predict, unproject, inverse, decode_pose = self.runtime
135
+ frames, times = self._read_video(video_path, frame_count)
136
+ images = (
137
+ torch.from_numpy(frames)
138
+ .permute(0, 3, 1, 2)
139
+ .float()
140
+ .div_(255)
141
+ .unsqueeze(0)
142
+ .to(self.device)
143
+ )
144
+ with (
145
+ torch.no_grad(),
146
+ torch.autocast(device_type=self.device.type, dtype=self.dtype),
147
+ ):
148
+ prediction = self.model(images)
149
+ logits = prediction["instance_maps"][0]
150
+ query_count, frame_total, height, width = logits.shape
151
+ masks, labels, _ = predict(
152
+ prediction["instance_labels"][0],
153
+ logits.reshape(query_count, -1),
154
+ mask_thr=float(os.environ.get("VSI_MASK_THR", "0.4")),
155
+ npoint_thr=1,
156
+ )
157
+ masks = masks.reshape(-1, frame_total, height, width).detach().cpu().numpy()
158
+ labels = labels.detach().cpu().numpy()
159
+ depth = prediction["depth"][0].float().cpu()
160
+ extrinsics, intrinsics = decode_pose(
161
+ prediction["pose_enc"].float(), depth.shape[1:3]
162
+ )
163
+ extrinsics = extrinsics[0].detach().cpu().numpy()
164
+ intrinsics = intrinsics[0].detach().cpu().numpy()
165
+ world = unproject(depth.numpy(), extrinsics, intrinsics)
166
+ world = (
167
+ functional.interpolate(
168
+ torch.from_numpy(world).permute(0, 3, 1, 2),
169
+ (height, width),
170
+ mode="nearest",
171
+ )
172
+ .permute(0, 2, 3, 1)
173
+ .numpy()
174
+ )
175
+ cameras = inverse(extrinsics)[:, :3, 3]
176
+ keep = [index for index, label in enumerate(labels) if int(label) >= 2]
177
+ names = np.asarray(
178
+ [
179
+ self.classes[int(labels[index])]
180
+ if int(labels[index]) < len(self.classes)
181
+ else f"class {int(labels[index])}"
182
+ for index in keep
183
+ ],
184
+ dtype=object,
185
+ )
186
+ output = Path(output_path)
187
+ output.parent.mkdir(parents=True, exist_ok=True)
188
+ temporary = output.with_suffix(output.suffix + ".tmp.npz")
189
+ np.savez_compressed(
190
+ temporary,
191
+ world_points=world.astype(np.float32),
192
+ instance_masks=masks[keep].astype(bool),
193
+ labels=names,
194
+ frame_times=times,
195
+ camera_positions=cameras.astype(np.float32),
196
+ )
197
+ os.replace(temporary, output)
198
+
199
+
200
+ _ADAPTERS = {"segvggt": SegVGGTAdapter}
201
+
202
+
203
+ def available_models():
204
+ """Return registered model names in stable order."""
205
+ return tuple(sorted(_ADAPTERS))
206
+
207
+
208
+ def get_adapter(model, **config):
209
+ """Create one unloaded adapter for ``model``."""
210
+ adapter_type = _ADAPTERS.get(model)
211
+ if adapter_type is None:
212
+ raise KeyError(
213
+ f"unknown inference model {model!r}; expected one of {available_models()}"
214
+ )
215
+ return adapter_type(**config)
inference/launch.py ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Keep every visible GPU busy with persistent model-inference workers."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+ import importlib.util
7
+ import json
8
+ import multiprocessing as mp
9
+ import os
10
+ from pathlib import Path
11
+ import subprocess
12
+ import sys
13
+ import traceback
14
+
15
+ HERE = Path(__file__).resolve().parent
16
+ WORKSPACE_ROOT = HERE.parent
17
+ ENCODER_ROOT = WORKSPACE_ROOT / "encoder"
18
+ for path in (WORKSPACE_ROOT, ENCODER_ROOT):
19
+ if str(path) not in sys.path:
20
+ sys.path.insert(0, str(path))
21
+
22
+ from inference import adapters # noqa: E402
23
+ import config as encoder_config # noqa: E402
24
+
25
+
26
+ def _load_run_module():
27
+ spec = importlib.util.spec_from_file_location("_inference_run", HERE / "run.py")
28
+ module = importlib.util.module_from_spec(spec)
29
+ sys.modules[spec.name] = module
30
+ spec.loader.exec_module(module)
31
+ return module
32
+
33
+
34
+ def scenes():
35
+ """Return unique manifest scenes in their original order."""
36
+ with open(encoder_config.JSONL) as manifest:
37
+ return list(
38
+ dict.fromkeys(str(json.loads(line)["scene_name"]) for line in manifest)
39
+ )
40
+
41
+
42
+ def visible_gpus():
43
+ """Return configured or hardware-discovered GPU identifiers."""
44
+ configured = os.environ.get("CUDA_VISIBLE_DEVICES")
45
+ if configured is not None:
46
+ return [
47
+ value.strip()
48
+ for value in configured.split(",")
49
+ if value.strip() and value.strip() != "-1"
50
+ ]
51
+ try:
52
+ output = subprocess.check_output(
53
+ ["nvidia-smi", "--query-gpu=index", "--format=csv,noheader"],
54
+ text=True,
55
+ stderr=subprocess.DEVNULL,
56
+ )
57
+ return [line.strip() for line in output.splitlines() if line.strip()]
58
+ except (FileNotFoundError, subprocess.SubprocessError):
59
+ return []
60
+
61
+
62
+ def _worker(tasks, results, model, frame_count, rebuild, gpu, cpu_threads):
63
+ if gpu is not None:
64
+ os.environ["CUDA_VISIBLE_DEVICES"] = str(gpu)
65
+ for variable in ("OMP_NUM_THREADS", "MKL_NUM_THREADS", "OPENBLAS_NUM_THREADS"):
66
+ os.environ[variable] = str(cpu_threads)
67
+ run = _load_run_module()
68
+ adapter = None
69
+ load_error = None
70
+ try:
71
+ adapter = adapters.get_adapter(model)
72
+ adapter.load_model("cuda:0" if gpu is not None else "cpu")
73
+ except Exception:
74
+ load_error = traceback.format_exc()
75
+ while True:
76
+ scene = tasks.get()
77
+ if scene is None:
78
+ return
79
+ if load_error is not None:
80
+ results.put((scene, False, load_error))
81
+ continue
82
+ try:
83
+ status, path = run.run_scene(
84
+ scene, model, frame_count, rebuild, adapter=adapter
85
+ )
86
+ results.put((scene, True, f"{status} -> {path}"))
87
+ except Exception:
88
+ results.put((scene, False, traceback.format_exc()))
89
+
90
+
91
+ def main():
92
+ parser = argparse.ArgumentParser()
93
+ parser.add_argument("scene", nargs="?")
94
+ parser.add_argument(
95
+ "--model", default="segvggt", choices=adapters.available_models()
96
+ )
97
+ parser.add_argument("--frames", type=int, default=encoder_config.FRAMES_PER_VIDEO)
98
+ parser.add_argument("--rebuild", action="store_true")
99
+ args = parser.parse_args()
100
+ selected = [args.scene] if args.scene else scenes()
101
+ pending = [
102
+ scene
103
+ for scene in selected
104
+ if args.rebuild
105
+ or not Path(_load_run_module().output_path(scene, args.model)).is_file()
106
+ ]
107
+ skipped = len(selected) - len(pending)
108
+ if not pending:
109
+ print(f"DONE: 0 built, {skipped} skipped, 0 failed")
110
+ return
111
+ gpus = visible_gpus()
112
+ worker_count = min(len(pending), len(gpus) if gpus else 1)
113
+ assignments = gpus[:worker_count] if gpus else [None]
114
+ cpu_threads = max(1, (os.cpu_count() or 1) // worker_count)
115
+ print(
116
+ f"starting {worker_count} persistent worker(s); GPUs={assignments}; CPU threads={cpu_threads}"
117
+ )
118
+ context = mp.get_context("spawn")
119
+ tasks, results = context.Queue(), context.Queue()
120
+ for scene in pending:
121
+ tasks.put(scene)
122
+ for _ in range(worker_count):
123
+ tasks.put(None)
124
+ workers = [
125
+ context.Process(
126
+ target=_worker,
127
+ args=(
128
+ tasks,
129
+ results,
130
+ args.model,
131
+ args.frames,
132
+ args.rebuild,
133
+ gpu,
134
+ cpu_threads,
135
+ ),
136
+ )
137
+ for gpu in assignments
138
+ ]
139
+ for worker in workers:
140
+ worker.start()
141
+ failed = []
142
+ for completed in range(1, len(pending) + 1):
143
+ scene, ok, detail = results.get()
144
+ if not ok:
145
+ failed.append(scene)
146
+ print(
147
+ f"[{completed}/{len(pending)}] {scene}: {'done' if ok else 'FAILED'}\n{detail}",
148
+ flush=True,
149
+ )
150
+ for worker in workers:
151
+ worker.join()
152
+ print(
153
+ f"DONE: {len(pending) - len(failed)} built, {skipped} skipped, {len(failed)} failed"
154
+ )
155
+ if failed:
156
+ raise SystemExit(1)
157
+
158
+
159
+ if __name__ == "__main__":
160
+ main()
inference/run.py ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Run one model adapter for one scene and write its raw cache."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+ from pathlib import Path
7
+ import sys
8
+
9
+ HERE = Path(__file__).resolve().parent
10
+ WORKSPACE_ROOT = HERE.parent
11
+ ENCODER_ROOT = WORKSPACE_ROOT / "encoder"
12
+ for path in (WORKSPACE_ROOT, ENCODER_ROOT):
13
+ if str(path) not in sys.path:
14
+ sys.path.insert(0, str(path))
15
+
16
+ from inference import adapters # noqa: E402
17
+ import config as encoder_config # noqa: E402
18
+
19
+
20
+ def output_path(scene, model):
21
+ """Return the flat raw-cache path for one scene and model."""
22
+ return str(Path(encoder_config.model_cache_dir(model)) / f"{scene}.npz")
23
+
24
+
25
+ def run_scene(
26
+ scene, model="segvggt", frame_count=None, rebuild=False, adapter=None, device=None
27
+ ):
28
+ """Run one scene, optionally reusing an adapter already loaded by a batch worker."""
29
+ destination = output_path(scene, model)
30
+ if Path(destination).is_file() and not rebuild:
31
+ return "skipped", destination
32
+ frame_count = frame_count or encoder_config.FRAMES_PER_VIDEO
33
+ if adapter is None:
34
+ adapter = adapters.get_adapter(model)
35
+ adapter.load_model(device or "cuda")
36
+ adapter.run_scene(encoder_config.video_path(scene), destination, frame_count)
37
+ return "built", destination
38
+
39
+
40
+ def main():
41
+ parser = argparse.ArgumentParser()
42
+ parser.add_argument("scene")
43
+ parser.add_argument(
44
+ "--model", default="segvggt", choices=adapters.available_models()
45
+ )
46
+ parser.add_argument("--frames", type=int, default=encoder_config.FRAMES_PER_VIDEO)
47
+ parser.add_argument("--device", default="cuda")
48
+ parser.add_argument("--rebuild", action="store_true")
49
+ args = parser.parse_args()
50
+ status, path = run_scene(
51
+ args.scene, args.model, args.frames, args.rebuild, device=args.device
52
+ )
53
+ print(f"[{args.scene}] model={args.model} cache={status} path={path}")
54
+
55
+
56
+ if __name__ == "__main__":
57
+ main()
setup.sh CHANGED
@@ -11,29 +11,42 @@ HF_CACHE="/root/hf-cache"
11
  HF_TMP="/root/hf-tmp"
12
  SEGVGGT_DIR="$MODELS_ROOT/SegVGGT"
13
  REQUIREMENTS="$SEGVGGT_DIR/requirements.txt"
 
14
 
15
  mkdir -p "$DATA_ROOT" "$MODELS_ROOT" "$HF_CACHE" "$HF_TMP"
16
- mkdir -p /workspace/data/spatial_codes /workspace/data/caches
17
 
18
  echo "Installing system packages..."
19
  apt-get update
20
- apt-get install -y git git-lfs ffmpeg rsync python3-pip
 
 
 
 
 
 
21
 
22
  git lfs install
23
- python -m pip install --upgrade pip setuptools wheel huggingface_hub
 
 
 
 
24
 
25
  if [ ! -d "$DATA_ROOT/thinking-in-space/.git" ]; then
26
  echo "Cloning thinking-in-space..."
27
- git clone https://github.com/vision-x-nyu/thinking-in-space.git \
 
28
  "$DATA_ROOT/thinking-in-space"
29
  else
30
  echo "Updating thinking-in-space..."
31
  git -C "$DATA_ROOT/thinking-in-space" pull --ff-only
32
  fi
33
 
34
- if [ ! -d "$DATA_ROOT/VSI-Bench" ] || [ -z "$(ls -A "$DATA_ROOT/VSI-Bench" 2>/dev/null)" ]; then
 
35
  echo "Downloading VSI-Bench..."
36
  mkdir -p "$DATA_ROOT/VSI-Bench"
 
37
  HF_HOME="$HF_CACHE" \
38
  TMPDIR="$HF_TMP" \
39
  HF_HUB_DISABLE_XET=1 \
@@ -46,7 +59,9 @@ fi
46
 
47
  if [ ! -d "$SEGVGGT_DIR/.git" ]; then
48
  echo "Cloning SegVGGT..."
49
- git clone https://github.com/IDEA-Research/SegVGGT.git "$SEGVGGT_DIR"
 
 
50
  else
51
  echo "Updating existing SegVGGT checkout..."
52
  git -C "$SEGVGGT_DIR" fetch origin
@@ -54,66 +69,61 @@ else
54
  fi
55
 
56
  if [ ! -f "$REQUIREMENTS" ]; then
57
- echo "ERROR: requirements file not found: $REQUIREMENTS" >&2
 
58
  exit 1
59
  fi
60
 
61
- echo "Requirements file being installed: $REQUIREMENTS"
62
  echo "----- requirements.txt -----"
63
  cat "$REQUIREMENTS"
64
  echo "----------------------------"
65
 
66
- echo "Installing every SegVGGT requirement..."
67
- python -m pip install --upgrade --no-cache-dir -r "$REQUIREMENTS"
68
-
69
- echo "Checking dependency consistency..."
70
- python -m pip check
71
-
72
- echo "Verifying every named distribution in requirements.txt is installed..."
73
- REQUIREMENTS="$REQUIREMENTS" python - <<'PY'
74
- import os
75
- import re
76
- import sys
77
- from importlib import metadata
78
- from pathlib import Path
79
-
80
- req_path = Path(os.environ["REQUIREMENTS"])
81
- missing = []
82
- checked = []
83
-
84
- for raw_line in req_path.read_text().splitlines():
85
- line = raw_line.strip()
86
- if not line or line.startswith("#") or line.startswith(("-r", "--", "git+", "http://", "https://")):
87
- continue
88
-
89
- # Extract the distribution name before version markers, extras, or environment markers.
90
- name = re.split(r"[<>=!~;\[]", line, maxsplit=1)[0].strip()
91
- if not name:
92
- continue
93
-
94
- checked.append(name)
95
- try:
96
- metadata.version(name)
97
- except metadata.PackageNotFoundError:
98
- missing.append(name)
99
-
100
- if missing:
101
- print("ERROR: These requirements are still missing:", ", ".join(missing), file=sys.stderr)
102
- sys.exit(1)
103
-
104
- print(f"Verified {len(checked)} installed distributions.")
105
- PY
106
-
107
- # Explicitly test the import that previously failed.
108
- python - <<'PY'
109
  import cv2
110
- print("OpenCV import successful:", cv2.__version__)
111
- PY
 
 
 
 
 
 
 
 
 
 
 
 
112
 
113
  CHECKPOINT="$SEGVGGT_DIR/checkpoint/segvggt_scannet200.pt"
114
 
115
  if [ ! -f "$CHECKPOINT" ]; then
116
  echo "Downloading SegVGGT ScanNet200 checkpoint..."
 
117
  HF_HOME="$HF_CACHE" \
118
  TMPDIR="$HF_TMP" \
119
  HF_HUB_DISABLE_XET=1 \
@@ -125,28 +135,15 @@ else
125
  echo "SegVGGT checkpoint already exists; skipping download."
126
  fi
127
 
128
- echo "Creating compatibility symlinks..."
129
- ln -sfn "$DATA_ROOT/thinking-in-space" /workspace/data/thinking-in-space
130
- ln -sfn "$DATA_ROOT/VSI-Bench" /workspace/data/VSI-Bench
131
-
132
- # Do not replace a real /workspace/models directory with a symlink.
133
- if [ -L /workspace/models ]; then
134
- ln -sfn "$MODELS_ROOT" /workspace/models
135
- elif [ ! -e /workspace/models ]; then
136
- ln -s "$MODELS_ROOT" /workspace/models
137
- else
138
- echo "/workspace/models already exists as a real directory; leaving it unchanged."
139
- ln -sfn "$SEGVGGT_DIR" /workspace/models/SegVGGT
140
- fi
141
 
142
  echo
143
  echo "=== Setup complete ==="
144
  echo "thinking-in-space: $DATA_ROOT/thinking-in-space"
145
- echo "VSI-Bench: $DATA_ROOT/VSI-Bench"
146
- echo "SegVGGT: $SEGVGGT_DIR"
147
- echo "Requirements: $REQUIREMENTS"
148
- echo "Checkpoint: $CHECKPOINT"
 
149
  echo
150
- python -m pip show opencv-python || true
151
- python -m pip show opencv-python-headless || true
152
- df -h /
 
11
  HF_TMP="/root/hf-tmp"
12
  SEGVGGT_DIR="$MODELS_ROOT/SegVGGT"
13
  REQUIREMENTS="$SEGVGGT_DIR/requirements.txt"
14
+ VENV="/root/.venv"
15
 
16
  mkdir -p "$DATA_ROOT" "$MODELS_ROOT" "$HF_CACHE" "$HF_TMP"
 
17
 
18
  echo "Installing system packages..."
19
  apt-get update
20
+ apt-get install -y \
21
+ git \
22
+ git-lfs \
23
+ ffmpeg \
24
+ rsync \
25
+ python3-pip \
26
+ python3-venv
27
 
28
  git lfs install
29
+
30
+ /usr/bin/python3 -m pip install \
31
+ --upgrade \
32
+ --break-system-packages \
33
+ pip setuptools wheel huggingface_hub
34
 
35
  if [ ! -d "$DATA_ROOT/thinking-in-space/.git" ]; then
36
  echo "Cloning thinking-in-space..."
37
+ git clone \
38
+ https://github.com/vision-x-nyu/thinking-in-space.git \
39
  "$DATA_ROOT/thinking-in-space"
40
  else
41
  echo "Updating thinking-in-space..."
42
  git -C "$DATA_ROOT/thinking-in-space" pull --ff-only
43
  fi
44
 
45
+ if [ ! -d "$DATA_ROOT/VSI-Bench" ] || \
46
+ [ -z "$(ls -A "$DATA_ROOT/VSI-Bench" 2>/dev/null)" ]; then
47
  echo "Downloading VSI-Bench..."
48
  mkdir -p "$DATA_ROOT/VSI-Bench"
49
+
50
  HF_HOME="$HF_CACHE" \
51
  TMPDIR="$HF_TMP" \
52
  HF_HUB_DISABLE_XET=1 \
 
59
 
60
  if [ ! -d "$SEGVGGT_DIR/.git" ]; then
61
  echo "Cloning SegVGGT..."
62
+ git clone \
63
+ https://github.com/IDEA-Research/SegVGGT.git \
64
+ "$SEGVGGT_DIR"
65
  else
66
  echo "Updating existing SegVGGT checkout..."
67
  git -C "$SEGVGGT_DIR" fetch origin
 
69
  fi
70
 
71
  if [ ! -f "$REQUIREMENTS" ]; then
72
+ echo "ERROR: requirements.txt not found at:"
73
+ echo "$REQUIREMENTS"
74
  exit 1
75
  fi
76
 
 
77
  echo "----- requirements.txt -----"
78
  cat "$REQUIREMENTS"
79
  echo "----------------------------"
80
 
81
+ echo "Recreating Python environment..."
82
+ rm -rf "$VENV"
83
+
84
+ /usr/bin/python3 -m venv "$VENV"
85
+
86
+ "$VENV/bin/python" -m pip install \
87
+ --upgrade \
88
+ pip setuptools wheel
89
+
90
+ echo "Installing SegVGGT PyTorch versions..."
91
+ "$VENV/bin/python" -m pip install \
92
+ --no-cache-dir \
93
+ torch==2.3.1 torchvision==0.18.1 \
94
+ --index-url https://download.pytorch.org/whl/cu121
95
+
96
+ echo "Installing SegVGGT requirements..."
97
+ "$VENV/bin/python" -m pip install \
98
+ --no-cache-dir \
99
+ -r "$REQUIREMENTS"
100
+
101
+ echo "Verifying packages and CUDA..."
102
+ "$VENV/bin/python" -m pip check
103
+ "$VENV/bin/python" - <<'VERIFY'
104
+ import torch
105
+ import torchvision
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  import cv2
107
+ import hydra
108
+ import omegaconf
109
+
110
+ assert torch.__version__.startswith("2.3.1"), torch.__version__
111
+ assert torchvision.__version__.startswith("0.18.1"), torchvision.__version__
112
+ assert torch.cuda.is_available(), "CUDA is unavailable"
113
+
114
+ print("Torch:", torch.__version__)
115
+ print("Torchvision:", torchvision.__version__)
116
+ print("CUDA:", torch.version.cuda)
117
+ print("GPU:", torch.cuda.get_device_name(0))
118
+ print("OpenCV:", cv2.__version__)
119
+ print("Verification passed.")
120
+ VERIFY
121
 
122
  CHECKPOINT="$SEGVGGT_DIR/checkpoint/segvggt_scannet200.pt"
123
 
124
  if [ ! -f "$CHECKPOINT" ]; then
125
  echo "Downloading SegVGGT ScanNet200 checkpoint..."
126
+
127
  HF_HOME="$HF_CACHE" \
128
  TMPDIR="$HF_TMP" \
129
  HF_HUB_DISABLE_XET=1 \
 
135
  echo "SegVGGT checkpoint already exists; skipping download."
136
  fi
137
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
 
139
  echo
140
  echo "=== Setup complete ==="
141
  echo "thinking-in-space: $DATA_ROOT/thinking-in-space"
142
+ echo "VSI-Bench: $DATA_ROOT/VSI-Bench"
143
+ echo "SegVGGT: $SEGVGGT_DIR"
144
+ echo "Requirements: $REQUIREMENTS"
145
+ echo "Checkpoint: $CHECKPOINT"
146
+ echo "Virtual env: $VENV"
147
  echo
148
+
149
+ df -h
 
tests/encoder_tests/test_adapters.py CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  import numpy as np
2
  import pytest
3
 
@@ -57,6 +60,41 @@ def test_adapt_segvggt_reads_flat_npz(tmp_path):
57
  assert result["stats"]["chair"] == {"raw": 1, "merged": 1, "peak": 1}
58
 
59
 
60
- def test_adapt_segvggt_requires_cache_or_video(tmp_path):
61
  with pytest.raises(FileNotFoundError, match="raw cache does not exist"):
62
  adapters.adapt_segvggt(path=str(tmp_path / "missing.npz"))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gzip
2
+ import pickle
3
+
4
  import numpy as np
5
  import pytest
6
 
 
60
  assert result["stats"]["chair"] == {"raw": 1, "merged": 1, "peak": 1}
61
 
62
 
63
+ def test_adapt_segvggt_requires_existing_cache(tmp_path):
64
  with pytest.raises(FileNotFoundError, match="raw cache does not exist"):
65
  adapters.adapt_segvggt(path=str(tmp_path / "missing.npz"))
66
+
67
+
68
+ def test_adapt_segvggt_rejects_missing_npz_fields(tmp_path):
69
+ path = tmp_path / "broken.npz"
70
+ np.savez(path, labels=np.array(["chair"], dtype=object))
71
+ with pytest.raises(KeyError):
72
+ adapters.adapt_segvggt(path=str(path))
73
+
74
+
75
+ def test_adapt_da3_sam3_decodes_masks_and_backprojects(tmp_path):
76
+ da3_path = tmp_path / "scene.da3.npz"
77
+ depth = np.full((1, 2, 2), 2.0, np.float32)
78
+ intrinsics = np.eye(3, dtype=np.float32)[None]
79
+ poses = np.eye(4, dtype=np.float32)[None]
80
+ np.savez(
81
+ da3_path,
82
+ depth=depth,
83
+ intr=intrinsics,
84
+ c2w=poses,
85
+ frame_times=np.array([1.5], np.float32),
86
+ )
87
+ mask = np.array([[True, False], [False, True]])
88
+ packed = {"chair": {0: {7: (np.packbits(mask), mask.shape)}}}
89
+ mask_path = tmp_path / "scene.sam3.pkl.gz"
90
+ with gzip.open(mask_path, "wb") as cache:
91
+ pickle.dump(packed, cache)
92
+
93
+ result = adapters.adapt_da3_sam3(da3_path=str(da3_path), sam3_path=str(mask_path))
94
+
95
+ instance = result["instances"]["chair"][0]
96
+ assert instance["frames"] == {0}
97
+ assert instance["first_time"] == pytest.approx(1.5)
98
+ np.testing.assert_allclose(instance["pts"], [[0, 0, 2], [2, 2, 2]])
99
+ assert result["stats"]["chair"] == {"raw": 1, "merged": 1, "peak": 1}
100
+ assert result["raw_inputs"]["per"]["chair"][0][7].dtype == bool
tests/encoder_tests/test_geometry_primitives.py ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import pytest
3
+
4
+ import geometric
5
+
6
+
7
+ def test_backproject_frame_applies_intrinsics_pose_and_confidence():
8
+ depth = np.array([[2.0, 2.0], [2.0, np.nan]], np.float32)
9
+ mask = np.ones((2, 2), bool)
10
+ intrinsics = np.eye(3, dtype=np.float32)
11
+ pose = np.eye(4, dtype=np.float32)
12
+ pose[0, 3] = 1.0
13
+ confidence = np.array([[0.9, 0.8], [0.1, 1.0]], np.float32)
14
+
15
+ points, kept_confidence = geometric.backproject_frame(
16
+ depth, intrinsics, pose, mask, confidence, conf_thr=0.5, return_conf=True
17
+ )
18
+
19
+ np.testing.assert_allclose(points, [[1.0, 0.0, 2.0], [3.0, 0.0, 2.0]])
20
+ np.testing.assert_allclose(kept_confidence, [0.9, 0.8])
21
+
22
+
23
+ def test_backproject_frame_returns_typed_empty_array():
24
+ points = geometric.backproject_frame(
25
+ np.zeros((2, 2), np.float32), np.eye(3), np.eye(4), np.ones((2, 2), bool)
26
+ )
27
+ assert points.shape == (0, 3)
28
+ assert points.dtype == np.float32
29
+
30
+
31
+ def test_relative_direction_modes():
32
+ origin = np.array([0.0, 0.0, 0.0])
33
+ forward = np.array([0.0, 1.0, 0.0])
34
+ front_left = np.array([-1.0, 1.0, 0.0])
35
+ up = np.array([0.0, 0.0, 1.0])
36
+ assert (
37
+ geometric.answer_rel_direction(origin, forward, front_left, up, 2)
38
+ == "front-left"
39
+ )
40
+ assert (
41
+ geometric.answer_rel_direction(origin, forward, front_left, up, 2, "medium")
42
+ == "left"
43
+ )
44
+ assert geometric.answer_rel_direction(origin, origin, front_left, up, 2) is None
45
+
46
+
47
+ def test_closest_distance_uses_point_cloud_distance():
48
+ first = [{"pts": np.array([[0.0, 0.0, 0.0]], np.float32), "n": 1}]
49
+ second = [{"pts": np.array([[0.0, 3.0, 4.0]], np.float32), "n": 1}]
50
+ assert geometric.answer_closest_distance(first, second) == pytest.approx(5.0)
51
+
52
+
53
+ def test_robust_centroid_extent_returns_sorted_dimensions():
54
+ points = np.array(
55
+ [[x, y, z] for x in (-2.0, 2.0) for y in (-1.0, 1.0) for z in (-0.5, 0.5)],
56
+ np.float32,
57
+ )
58
+ centroid, longest, dimensions = geometric.robust_centroid_extent(points, up_axis=2)
59
+ np.testing.assert_allclose(centroid, [0.0, 0.0, 0.0])
60
+ assert longest > 3.0
61
+ assert np.all(dimensions[:-1] >= dimensions[1:])
62
+
63
+
64
+ def test_depth_edges_handles_small_and_discontinuous_frames():
65
+ small = np.ones((5, 5), np.float32)
66
+ assert not geometric.depth_edges(small, np.ones_like(small, bool)).any()
67
+ depth = np.ones((20, 20), np.float32)
68
+ depth[:, 10:] = 10.0
69
+ edges = geometric.depth_edges(depth, np.ones_like(depth, bool))
70
+ assert edges[:, 9:11].any()
tests/encoder_tests/test_launch.py CHANGED
@@ -1,4 +1,7 @@
1
  import json
 
 
 
2
 
3
  import config as C
4
  import launch
@@ -24,3 +27,23 @@ def test_visible_gpus_falls_back_to_nvidia_smi(monkeypatch):
24
  launch.subprocess, "check_output", lambda *args, **kwargs: "0\n1\n"
25
  )
26
  assert launch._visible_gpus() == ["0", "1"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import json
2
+ import sys
3
+
4
+ import pytest
5
 
6
  import config as C
7
  import launch
 
27
  launch.subprocess, "check_output", lambda *args, **kwargs: "0\n1\n"
28
  )
29
  assert launch._visible_gpus() == ["0", "1"]
30
+
31
+
32
+ def test_main_skips_existing_spatial_codes(tmp_path, monkeypatch, capsys):
33
+ manifest = tmp_path / "test.jsonl"
34
+ manifest.write_text('{"scene_name": "s1"}\n')
35
+ codes = tmp_path / "codes"
36
+ codes.mkdir()
37
+ (codes / "s1.json").write_text("{}")
38
+ monkeypatch.setattr(C, "JSONL", manifest)
39
+ monkeypatch.setattr(C, "CODES_ROOT", codes)
40
+ monkeypatch.setattr(sys, "argv", ["launch.py"])
41
+ monkeypatch.setattr(
42
+ launch.mp, "get_context", lambda *args: pytest.fail("workers should not start")
43
+ )
44
+
45
+ launch.main()
46
+
47
+ output = capsys.readouterr().out
48
+ assert "s1: skipped" in output
49
+ assert "DONE: 1 ok, 0 failed" in output
tests/inference_tests/__init__.py ADDED
File without changes
tests/inference_tests/conftest.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ """Import paths for inference tests."""
2
+
3
+ from pathlib import Path
4
+ import sys
5
+
6
+ ROOT = Path(__file__).resolve().parents[2]
7
+ for path in (ROOT, ROOT / "encoder"):
8
+ if str(path) not in sys.path:
9
+ sys.path.insert(0, str(path))
tests/inference_tests/test_adapter_runtime.py ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import pytest
3
+
4
+ from inference import adapters
5
+
6
+
7
+ def test_load_model_validates_repository_and_checkpoint(tmp_path):
8
+ adapter = adapters.SegVGGTAdapter(model_root=tmp_path / "missing")
9
+ with pytest.raises(FileNotFoundError, match="repository not found"):
10
+ adapter.load_model("cpu")
11
+ model_root = tmp_path / "model"
12
+ model_root.mkdir()
13
+ adapter = adapters.SegVGGTAdapter(
14
+ model_root=model_root, checkpoint=tmp_path / "missing.pt"
15
+ )
16
+ with pytest.raises(FileNotFoundError, match="checkpoint not found"):
17
+ adapter.load_model("cpu")
18
+
19
+
20
+ def test_run_scene_requires_loaded_model(tmp_path):
21
+ adapter = adapters.SegVGGTAdapter()
22
+ with pytest.raises(RuntimeError, match=r"load_model\(\)"):
23
+ adapter.run_scene("video.mp4", tmp_path / "scene.npz", 1)
24
+
25
+
26
+ def test_read_video_rejects_unopenable_file():
27
+ with pytest.raises(RuntimeError, match="cannot open video"):
28
+ adapters.SegVGGTAdapter._read_video("/missing/video.mp4", 1)
29
+
30
+
31
+ def test_run_scene_writes_expected_npz_atomically(tmp_path, monkeypatch):
32
+ torch = pytest.importorskip("torch")
33
+ adapter = adapters.SegVGGTAdapter()
34
+ adapter.device = torch.device("cpu")
35
+ adapter.dtype = torch.bfloat16
36
+ frames = np.zeros((1, 2, 2, 3), np.uint8)
37
+ monkeypatch.setattr(
38
+ adapter,
39
+ "_read_video",
40
+ lambda path, count: (frames, np.array([0.25], np.float32)),
41
+ )
42
+
43
+ class Model:
44
+ def __call__(self, images):
45
+ return {
46
+ "instance_maps": torch.zeros((1, 2, 1, 2, 2)),
47
+ "instance_labels": torch.zeros((1, 2, 3)),
48
+ "depth": torch.ones((1, 1, 2, 2)),
49
+ "pose_enc": torch.zeros((1, 1, 4)),
50
+ }
51
+
52
+ def predict(labels, logits, **kwargs):
53
+ masks = torch.tensor([[1, 0, 0, 0], [0, 1, 0, 0]], dtype=torch.bool)
54
+ return masks, torch.tensor([0, 2]), None
55
+
56
+ def decode_pose(pose, shape):
57
+ return torch.eye(4).reshape(1, 1, 4, 4), torch.eye(3).reshape(1, 1, 3, 3)
58
+
59
+ def unproject(depth, extrinsics, intrinsics):
60
+ return np.zeros((1, 2, 2, 3), np.float32)
61
+
62
+ def inverse(extrinsics):
63
+ return np.eye(4, dtype=np.float32)[None]
64
+
65
+ adapter.model = Model()
66
+ adapter.runtime = (
67
+ torch,
68
+ torch.nn.functional,
69
+ predict,
70
+ unproject,
71
+ inverse,
72
+ decode_pose,
73
+ )
74
+ output = tmp_path / "nested" / "scene.npz"
75
+ adapter.run_scene("video.mp4", output, 1)
76
+
77
+ assert output.is_file()
78
+ assert not output.with_suffix(".npz.tmp.npz").exists()
79
+ with np.load(output, allow_pickle=True) as cache:
80
+ assert cache["world_points"].shape == (1, 2, 2, 3)
81
+ assert cache["instance_masks"].shape == (1, 1, 2, 2)
82
+ assert cache["labels"].tolist() == ["chair"]
83
+ assert cache["frame_times"].tolist() == pytest.approx([0.25])
84
+ assert cache["camera_positions"].shape == (1, 3)
tests/inference_tests/test_gpu_integration.py ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Optional real-model validation; enable with VSI_RUN_GPU_TESTS=1."""
2
+
3
+ import json
4
+ import os
5
+
6
+ import numpy as np
7
+ import pytest
8
+
9
+ from inference import adapters
10
+ from inference import run
11
+
12
+
13
+ @pytest.mark.skipif(
14
+ os.environ.get("VSI_RUN_GPU_TESTS") != "1",
15
+ reason="set VSI_RUN_GPU_TESTS=1 to run real SegVGGT inference",
16
+ )
17
+ def test_real_segvggt_scene_writes_encoder_compatible_cache(tmp_path):
18
+ with open(run.encoder_config.JSONL) as manifest:
19
+ scene = str(json.loads(next(manifest))["scene_name"])
20
+ adapter = adapters.get_adapter("segvggt")
21
+ adapter.load_model("cuda:0")
22
+ output = tmp_path / f"{scene}.npz"
23
+ adapter.run_scene(
24
+ run.encoder_config.video_path(scene),
25
+ str(output),
26
+ run.encoder_config.FRAMES_PER_VIDEO,
27
+ )
28
+ with np.load(output, allow_pickle=True) as cache:
29
+ assert set(cache.files) == {
30
+ "world_points",
31
+ "instance_masks",
32
+ "labels",
33
+ "frame_times",
34
+ "camera_positions",
35
+ }
36
+ assert cache["world_points"].shape[-1] == 3
37
+ assert cache["instance_masks"].dtype == bool
tests/inference_tests/test_launch_runtime.py ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from queue import Queue
2
+ from types import SimpleNamespace
3
+ import sys
4
+
5
+ import pytest
6
+
7
+ from inference import launch
8
+ from inference import run
9
+
10
+
11
+ class FakeAdapter:
12
+ def __init__(self, load_error=None):
13
+ self.load_error = load_error
14
+ self.load_calls = []
15
+
16
+ def load_model(self, device):
17
+ self.load_calls.append(device)
18
+ if self.load_error:
19
+ raise self.load_error
20
+
21
+
22
+ def _queues(*scenes):
23
+ tasks, results = Queue(), Queue()
24
+ for scene in scenes:
25
+ tasks.put(scene)
26
+ tasks.put(None)
27
+ return tasks, results
28
+
29
+
30
+ def test_worker_loads_adapter_once_and_reuses_it(monkeypatch):
31
+ adapter = FakeAdapter()
32
+ calls = []
33
+ fake_run = SimpleNamespace(
34
+ run_scene=lambda scene, model, frames, rebuild, adapter: (
35
+ calls.append(scene) or ("built", f"/{scene}.npz")
36
+ )
37
+ )
38
+ monkeypatch.setattr(launch.adapters, "get_adapter", lambda model: adapter)
39
+ monkeypatch.setattr(launch, "_load_run_module", lambda: fake_run)
40
+ tasks, results = _queues("s1", "s2")
41
+
42
+ launch._worker(tasks, results, "segvggt", 32, False, "3", 2)
43
+
44
+ assert adapter.load_calls == ["cuda:0"]
45
+ assert calls == ["s1", "s2"]
46
+ assert results.get() == ("s1", True, "built -> /s1.npz")
47
+ assert results.get() == ("s2", True, "built -> /s2.npz")
48
+
49
+
50
+ def test_worker_reports_model_load_failure_for_every_scene(monkeypatch):
51
+ adapter = FakeAdapter(RuntimeError("load failed"))
52
+ monkeypatch.setattr(launch.adapters, "get_adapter", lambda model: adapter)
53
+ monkeypatch.setattr(launch, "_load_run_module", lambda: SimpleNamespace())
54
+ tasks, results = _queues("s1", "s2")
55
+
56
+ launch._worker(tasks, results, "segvggt", 32, False, None, 1)
57
+
58
+ for expected in ("s1", "s2"):
59
+ scene, ok, detail = results.get()
60
+ assert scene == expected and not ok
61
+ assert "load failed" in detail
62
+ assert adapter.load_calls == ["cpu"]
63
+
64
+
65
+ def test_worker_reports_scene_failure_and_continues(monkeypatch):
66
+ adapter = FakeAdapter()
67
+
68
+ def run_scene(scene, *args, **kwargs):
69
+ if scene == "bad":
70
+ raise ValueError("broken scene")
71
+ return "built", f"/{scene}.npz"
72
+
73
+ monkeypatch.setattr(launch.adapters, "get_adapter", lambda model: adapter)
74
+ monkeypatch.setattr(
75
+ launch, "_load_run_module", lambda: SimpleNamespace(run_scene=run_scene)
76
+ )
77
+ tasks, results = _queues("bad", "good")
78
+
79
+ launch._worker(tasks, results, "segvggt", 32, False, None, 1)
80
+
81
+ first, second = results.get(), results.get()
82
+ assert first[0:2] == ("bad", False) and "broken scene" in first[2]
83
+ assert second == ("good", True, "built -> /good.npz")
84
+
85
+
86
+ def test_run_scene_rebuild_overwrites_existing_cache(tmp_path, monkeypatch):
87
+ monkeypatch.setattr(run.encoder_config, "CACHE_ROOT", tmp_path)
88
+ monkeypatch.setattr(run.encoder_config, "video_path", lambda scene: f"/{scene}.mp4")
89
+ destination = tmp_path / "segvggt" / "s1.npz"
90
+ destination.parent.mkdir()
91
+ destination.write_bytes(b"old")
92
+ calls = []
93
+ adapter = SimpleNamespace(
94
+ run_scene=lambda *args: calls.append(args) or destination.write_bytes(b"new")
95
+ )
96
+
97
+ status, _ = run.run_scene("s1", rebuild=True, adapter=adapter)
98
+
99
+ assert status == "built"
100
+ assert destination.read_bytes() == b"new"
101
+ assert len(calls) == 1
102
+
103
+
104
+ def test_visible_gpus_falls_back_to_nvidia_smi(monkeypatch):
105
+ monkeypatch.delenv("CUDA_VISIBLE_DEVICES", raising=False)
106
+ monkeypatch.setattr(
107
+ launch.subprocess, "check_output", lambda *args, **kwargs: "0\n2\n"
108
+ )
109
+ assert launch.visible_gpus() == ["0", "2"]
110
+
111
+
112
+ def test_launch_main_skips_all_existing_caches(tmp_path, monkeypatch, capsys):
113
+ cache = tmp_path / "s1.npz"
114
+ cache.touch()
115
+ monkeypatch.setattr(launch, "scenes", lambda: ["s1"])
116
+ monkeypatch.setattr(
117
+ launch,
118
+ "_load_run_module",
119
+ lambda: SimpleNamespace(output_path=lambda *args: str(cache)),
120
+ )
121
+ monkeypatch.setattr(sys, "argv", ["launch.py"])
122
+ monkeypatch.setattr(
123
+ launch.mp, "get_context", lambda *args: pytest.fail("workers should not start")
124
+ )
125
+
126
+ launch.main()
127
+
128
+ assert "DONE: 0 built, 1 skipped, 0 failed" in capsys.readouterr().out