applied-ai-018 commited on
Commit
718c24d
·
verified ·
1 Parent(s): 12d72c3

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. ckpts/universal/global_step40/zero/12.mlp.dense_4h_to_h.weight/exp_avg.pt +3 -0
  2. ckpts/universal/global_step40/zero/22.mlp.dense_4h_to_h.weight/fp32.pt +3 -0
  3. ckpts/universal/global_step40/zero/25.attention.query_key_value.weight/exp_avg.pt +3 -0
  4. ckpts/universal/global_step40/zero/25.attention.query_key_value.weight/exp_avg_sq.pt +3 -0
  5. venv/lib/python3.10/site-packages/mbstrdecoder-1.1.3.dist-info/INSTALLER +1 -0
  6. venv/lib/python3.10/site-packages/mbstrdecoder-1.1.3.dist-info/LICENSE +21 -0
  7. venv/lib/python3.10/site-packages/mbstrdecoder-1.1.3.dist-info/METADATA +117 -0
  8. venv/lib/python3.10/site-packages/mbstrdecoder-1.1.3.dist-info/RECORD +17 -0
  9. venv/lib/python3.10/site-packages/mbstrdecoder-1.1.3.dist-info/WHEEL +5 -0
  10. venv/lib/python3.10/site-packages/mbstrdecoder-1.1.3.dist-info/top_level.txt +1 -0
  11. venv/lib/python3.10/site-packages/numpy/core/__pycache__/__init__.cpython-310.pyc +0 -0
  12. venv/lib/python3.10/site-packages/numpy/core/__pycache__/_add_newdocs.cpython-310.pyc +0 -0
  13. venv/lib/python3.10/site-packages/numpy/core/__pycache__/_add_newdocs_scalars.cpython-310.pyc +0 -0
  14. venv/lib/python3.10/site-packages/numpy/core/__pycache__/_asarray.cpython-310.pyc +0 -0
  15. venv/lib/python3.10/site-packages/numpy/core/__pycache__/_dtype.cpython-310.pyc +0 -0
  16. venv/lib/python3.10/site-packages/numpy/core/__pycache__/_dtype_ctypes.cpython-310.pyc +0 -0
  17. venv/lib/python3.10/site-packages/numpy/core/__pycache__/_exceptions.cpython-310.pyc +0 -0
  18. venv/lib/python3.10/site-packages/numpy/core/__pycache__/_internal.cpython-310.pyc +0 -0
  19. venv/lib/python3.10/site-packages/numpy/core/__pycache__/_machar.cpython-310.pyc +0 -0
  20. venv/lib/python3.10/site-packages/numpy/core/__pycache__/_methods.cpython-310.pyc +0 -0
  21. venv/lib/python3.10/site-packages/numpy/core/__pycache__/_string_helpers.cpython-310.pyc +0 -0
  22. venv/lib/python3.10/site-packages/numpy/core/__pycache__/_type_aliases.cpython-310.pyc +0 -0
  23. venv/lib/python3.10/site-packages/numpy/core/__pycache__/_ufunc_config.cpython-310.pyc +0 -0
  24. venv/lib/python3.10/site-packages/numpy/core/__pycache__/arrayprint.cpython-310.pyc +0 -0
  25. venv/lib/python3.10/site-packages/numpy/core/__pycache__/cversions.cpython-310.pyc +0 -0
  26. venv/lib/python3.10/site-packages/numpy/core/__pycache__/defchararray.cpython-310.pyc +0 -0
  27. venv/lib/python3.10/site-packages/numpy/core/__pycache__/einsumfunc.cpython-310.pyc +0 -0
  28. venv/lib/python3.10/site-packages/numpy/core/__pycache__/fromnumeric.cpython-310.pyc +0 -0
  29. venv/lib/python3.10/site-packages/numpy/core/__pycache__/function_base.cpython-310.pyc +0 -0
  30. venv/lib/python3.10/site-packages/numpy/core/__pycache__/getlimits.cpython-310.pyc +0 -0
  31. venv/lib/python3.10/site-packages/numpy/core/__pycache__/memmap.cpython-310.pyc +0 -0
  32. venv/lib/python3.10/site-packages/numpy/core/__pycache__/multiarray.cpython-310.pyc +0 -0
  33. venv/lib/python3.10/site-packages/numpy/core/__pycache__/numeric.cpython-310.pyc +0 -0
  34. venv/lib/python3.10/site-packages/numpy/core/__pycache__/numerictypes.cpython-310.pyc +0 -0
  35. venv/lib/python3.10/site-packages/numpy/core/__pycache__/overrides.cpython-310.pyc +0 -0
  36. venv/lib/python3.10/site-packages/numpy/core/__pycache__/records.cpython-310.pyc +0 -0
  37. venv/lib/python3.10/site-packages/numpy/core/__pycache__/shape_base.cpython-310.pyc +0 -0
  38. venv/lib/python3.10/site-packages/numpy/core/__pycache__/umath.cpython-310.pyc +0 -0
  39. venv/lib/python3.10/site-packages/numpy/core/__pycache__/umath_tests.cpython-310.pyc +0 -0
  40. venv/lib/python3.10/site-packages/numpy/core/include/numpy/__multiarray_api.c +314 -0
  41. venv/lib/python3.10/site-packages/numpy/core/include/numpy/__multiarray_api.h +1566 -0
  42. venv/lib/python3.10/site-packages/numpy/core/include/numpy/__ufunc_api.c +50 -0
  43. venv/lib/python3.10/site-packages/numpy/core/include/numpy/__ufunc_api.h +314 -0
  44. venv/lib/python3.10/site-packages/numpy/core/include/numpy/_dtype_api.h +408 -0
  45. venv/lib/python3.10/site-packages/numpy/core/include/numpy/_neighborhood_iterator_imp.h +90 -0
  46. venv/lib/python3.10/site-packages/numpy/core/include/numpy/_numpyconfig.h +32 -0
  47. venv/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h +12 -0
  48. venv/lib/python3.10/site-packages/numpy/core/include/numpy/arrayscalars.h +186 -0
  49. venv/lib/python3.10/site-packages/numpy/core/include/numpy/experimental_dtype_api.h +365 -0
  50. venv/lib/python3.10/site-packages/numpy/core/include/numpy/halffloat.h +70 -0
ckpts/universal/global_step40/zero/12.mlp.dense_4h_to_h.weight/exp_avg.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a813297e6bad746b7371db19998dbb9b8595932f5d3144e15acb47f63cbdfe2
3
+ size 33555612
ckpts/universal/global_step40/zero/22.mlp.dense_4h_to_h.weight/fp32.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9fa6a64e5e1db4e9700b9d44561f49a32b95b608a9f3f7830f69e4ec521643e8
3
+ size 33555533
ckpts/universal/global_step40/zero/25.attention.query_key_value.weight/exp_avg.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4aa419e0903b7ba43caa3919ea0c08ed45ec266feba52add7ae8de39ee5c12f
3
+ size 50332828
ckpts/universal/global_step40/zero/25.attention.query_key_value.weight/exp_avg_sq.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e9841f18957e487bb0a67beeaed986616a487edb01d099fd2e49506b4c432ea6
3
+ size 50332843
venv/lib/python3.10/site-packages/mbstrdecoder-1.1.3.dist-info/INSTALLER ADDED
@@ -0,0 +1 @@
 
 
1
+ pip
venv/lib/python3.10/site-packages/mbstrdecoder-1.1.3.dist-info/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2016 Tsuyoshi Hombashi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
venv/lib/python3.10/site-packages/mbstrdecoder-1.1.3.dist-info/METADATA ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.1
2
+ Name: mbstrdecoder
3
+ Version: 1.1.3
4
+ Summary: mbstrdecoder is a Python library for multi-byte character string decoder
5
+ Home-page: https://github.com/thombashi/mbstrdecoder
6
+ Author: Tsuyoshi Hombashi
7
+ Author-email: [email protected]
8
+ License: MIT License
9
+ Project-URL: Source, https://github.com/thombashi/mbstrdecoder
10
+ Project-URL: Tracker, https://github.com/thombashi/mbstrdecoder/issues
11
+ Keywords: multi-byte character,unicode,decoder
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Information Technology
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.7
19
+ Classifier: Programming Language :: Python :: 3.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: Implementation :: CPython
25
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
26
+ Classifier: Topic :: Software Development :: Libraries
27
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
28
+ Classifier: Topic :: Text Processing
29
+ Requires-Python: >=3.7
30
+ Description-Content-Type: text/x-rst
31
+ License-File: LICENSE
32
+ Requires-Dist: chardet (<6,>=3.0.4)
33
+ Provides-Extra: test
34
+ Requires-Dist: Faker (>=1.0.2) ; extra == 'test'
35
+ Requires-Dist: pytest (>=6.0.1) ; extra == 'test'
36
+ Requires-Dist: pytest-md-report (>=0.1) ; extra == 'test'
37
+
38
+ .. contents:: **mbstrdecoder**
39
+ :backlinks: top
40
+ :local:
41
+
42
+
43
+ Summary
44
+ =======
45
+ `mbstrdecoder <https://github.com/thombashi/mbstrdecoder>`__ is a Python library for multi-byte character string decoder.
46
+
47
+
48
+ .. image:: https://badge.fury.io/py/mbstrdecoder.svg
49
+ :target: https://badge.fury.io/py/mbstrdecoder
50
+ :alt: PyPI package version
51
+
52
+ .. image:: https://img.shields.io/pypi/pyversions/mbstrdecoder.svg
53
+ :target: https://pypi.org/project/mbstrdecoder
54
+ :alt: Supported Python versions
55
+
56
+ .. image:: https://img.shields.io/pypi/implementation/mbstrdecoder.svg
57
+ :target: https://pypi.org/project/mbstrdecoder
58
+ :alt: Supported Python implementations
59
+
60
+ .. image:: https://github.com/thombashi/mbstrdecoder/actions/workflows/lint_and_test.yml/badge.svg
61
+ :target: https://github.com/thombashi/mbstrdecoder/actions/workflows/lint_and_test.yml
62
+ :alt: CI status of Linux/macOS/Windows
63
+
64
+ .. image:: https://coveralls.io/repos/github/thombashi/mbstrdecoder/badge.svg?branch=master
65
+ :target: https://coveralls.io/github/thombashi/mbstrdecoder?branch=master
66
+ :alt: Test coverage
67
+
68
+ .. image:: https://github.com/thombashi/mbstrdecoder/actions/workflows/codeql-analysis.yml/badge.svg
69
+ :target: https://github.com/thombashi/mbstrdecoder/actions/workflows/codeql-analysis.yml
70
+ :alt: CodeQL
71
+
72
+
73
+ Installation
74
+ ============
75
+
76
+ Install from PyPI
77
+ ------------------------------
78
+ ::
79
+
80
+ pip install mbstrdecoder
81
+
82
+ Install from PPA (for Ubuntu)
83
+ ------------------------------
84
+ ::
85
+
86
+ sudo add-apt-repository ppa:thombashi/ppa
87
+ sudo apt update
88
+ sudo apt install python3-mbstrdecoder
89
+
90
+
91
+ Usage
92
+ =====
93
+
94
+ :Sample Code:
95
+ .. code:: python
96
+
97
+ from mbstrdecoder import MultiByteStrDecoder
98
+
99
+ encoded_multibyte_text = "マルチバイト文字".encode("utf-8")
100
+ decoder = MultiByteStrDecoder(encoded_multibyte_text)
101
+
102
+ print("encoded bytes: {}".format(encoded_multibyte_text))
103
+ print("unicode: {}".format(decoder.unicode_str))
104
+ print("codec: {}".format(decoder.codec))
105
+
106
+ :Output:
107
+ ::
108
+
109
+ encoded bytes: b'\xe3\x83\x9e\xe3\x83\xab\xe3\x83\x81\xe3\x83\x90\xe3\x82\xa4\xe3\x83\x88\xe6\x96\x87\xe5\xad\x97'
110
+ unicode: マルチバイト文字
111
+ codec: utf_8
112
+
113
+
114
+ Dependencies
115
+ ============
116
+ - Python 3.7+
117
+ - `Python package dependencies (automatically installed) <https://github.com/thombashi/mbstrdecoder/network/dependencies>`__
venv/lib/python3.10/site-packages/mbstrdecoder-1.1.3.dist-info/RECORD ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ mbstrdecoder-1.1.3.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2
+ mbstrdecoder-1.1.3.dist-info/LICENSE,sha256=dYgmUILu1en0r9UJDFfmELdA7FR7Fqqqtzm6B8Xu-xU,1074
3
+ mbstrdecoder-1.1.3.dist-info/METADATA,sha256=9lORe-Y9UfVKWcZD7ixWLOCIMQ_BBLOcJ2ajYVIjUn4,4040
4
+ mbstrdecoder-1.1.3.dist-info/RECORD,,
5
+ mbstrdecoder-1.1.3.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
6
+ mbstrdecoder-1.1.3.dist-info/top_level.txt,sha256=3y6PBjWqWXF9e7O35XqgW93XW_H9qgTn9hAdzSurYi8,13
7
+ mbstrdecoder/__init__.py,sha256=8ZS23B2ej3sHJm3ymloaxRVECxJrEwDcmu-NUtHq_SM,319
8
+ mbstrdecoder/__pycache__/__init__.cpython-310.pyc,,
9
+ mbstrdecoder/__pycache__/__version__.cpython-310.pyc,,
10
+ mbstrdecoder/__pycache__/_binary_ext_checker.cpython-310.pyc,,
11
+ mbstrdecoder/__pycache__/_func.cpython-310.pyc,,
12
+ mbstrdecoder/__pycache__/_mbstrdecoder.cpython-310.pyc,,
13
+ mbstrdecoder/__version__.py,sha256=0o6gm2vXDCEgmEsQ2mGPrdbJkyuj_mdTcg9r8dpV0W4,201
14
+ mbstrdecoder/_binary_ext_checker.py,sha256=8RAZoptcppQjjQeA3C0PP4PYc60YuDg7BLaswiA_TJ8,3113
15
+ mbstrdecoder/_func.py,sha256=hKIuRBCMFedtn4dJ5xlA2CNTxCDTZ5-0OK_kKWTL4Ug,1355
16
+ mbstrdecoder/_mbstrdecoder.py,sha256=lyrt3vQw7Lt1kjNiLbxoDSiL_p7Bg3Q-3Z3PyF2SReQ,7377
17
+ mbstrdecoder/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
venv/lib/python3.10/site-packages/mbstrdecoder-1.1.3.dist-info/WHEEL ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.37.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
venv/lib/python3.10/site-packages/mbstrdecoder-1.1.3.dist-info/top_level.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ mbstrdecoder
venv/lib/python3.10/site-packages/numpy/core/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (4.01 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/_add_newdocs.cpython-310.pyc ADDED
Binary file (192 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/_add_newdocs_scalars.cpython-310.pyc ADDED
Binary file (11 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/_asarray.cpython-310.pyc ADDED
Binary file (3.76 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/_dtype.cpython-310.pyc ADDED
Binary file (8.21 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/_dtype_ctypes.cpython-310.pyc ADDED
Binary file (3.06 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/_exceptions.cpython-310.pyc ADDED
Binary file (5.83 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/_internal.cpython-310.pyc ADDED
Binary file (23.2 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/_machar.cpython-310.pyc ADDED
Binary file (8.32 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/_methods.cpython-310.pyc ADDED
Binary file (5.74 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/_string_helpers.cpython-310.pyc ADDED
Binary file (3.03 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/_type_aliases.cpython-310.pyc ADDED
Binary file (5.36 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/_ufunc_config.cpython-310.pyc ADDED
Binary file (14.2 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/arrayprint.cpython-310.pyc ADDED
Binary file (52.4 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/cversions.cpython-310.pyc ADDED
Binary file (560 Bytes). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/defchararray.cpython-310.pyc ADDED
Binary file (71 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/einsumfunc.cpython-310.pyc ADDED
Binary file (39.6 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/fromnumeric.cpython-310.pyc ADDED
Binary file (126 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/function_base.cpython-310.pyc ADDED
Binary file (17.7 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/getlimits.cpython-310.pyc ADDED
Binary file (19.1 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/memmap.cpython-310.pyc ADDED
Binary file (10.5 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/multiarray.cpython-310.pyc ADDED
Binary file (54.4 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/numeric.cpython-310.pyc ADDED
Binary file (73 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/numerictypes.cpython-310.pyc ADDED
Binary file (17 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/overrides.cpython-310.pyc ADDED
Binary file (6.2 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/records.cpython-310.pyc ADDED
Binary file (30.1 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/shape_base.cpython-310.pyc ADDED
Binary file (26.6 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/umath.cpython-310.pyc ADDED
Binary file (1.73 kB). View file
 
venv/lib/python3.10/site-packages/numpy/core/__pycache__/umath_tests.cpython-310.pyc ADDED
Binary file (527 Bytes). View file
 
venv/lib/python3.10/site-packages/numpy/core/include/numpy/__multiarray_api.c ADDED
@@ -0,0 +1,314 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /* These pointers will be stored in the C-object for use in other
3
+ extension modules
4
+ */
5
+
6
+ void *PyArray_API[] = {
7
+ (void *) PyArray_GetNDArrayCVersion,
8
+ (void *) &PyBigArray_Type,
9
+ (void *) &PyArray_Type,
10
+ (void *) &PyArrayDescr_Type,
11
+ (void *) &PyArrayFlags_Type,
12
+ (void *) &PyArrayIter_Type,
13
+ (void *) &PyArrayMultiIter_Type,
14
+ (int *) &NPY_NUMUSERTYPES,
15
+ (void *) &PyBoolArrType_Type,
16
+ (void *) &_PyArrayScalar_BoolValues,
17
+ (void *) &PyGenericArrType_Type,
18
+ (void *) &PyNumberArrType_Type,
19
+ (void *) &PyIntegerArrType_Type,
20
+ (void *) &PySignedIntegerArrType_Type,
21
+ (void *) &PyUnsignedIntegerArrType_Type,
22
+ (void *) &PyInexactArrType_Type,
23
+ (void *) &PyFloatingArrType_Type,
24
+ (void *) &PyComplexFloatingArrType_Type,
25
+ (void *) &PyFlexibleArrType_Type,
26
+ (void *) &PyCharacterArrType_Type,
27
+ (void *) &PyByteArrType_Type,
28
+ (void *) &PyShortArrType_Type,
29
+ (void *) &PyIntArrType_Type,
30
+ (void *) &PyLongArrType_Type,
31
+ (void *) &PyLongLongArrType_Type,
32
+ (void *) &PyUByteArrType_Type,
33
+ (void *) &PyUShortArrType_Type,
34
+ (void *) &PyUIntArrType_Type,
35
+ (void *) &PyULongArrType_Type,
36
+ (void *) &PyULongLongArrType_Type,
37
+ (void *) &PyFloatArrType_Type,
38
+ (void *) &PyDoubleArrType_Type,
39
+ (void *) &PyLongDoubleArrType_Type,
40
+ (void *) &PyCFloatArrType_Type,
41
+ (void *) &PyCDoubleArrType_Type,
42
+ (void *) &PyCLongDoubleArrType_Type,
43
+ (void *) &PyObjectArrType_Type,
44
+ (void *) &PyStringArrType_Type,
45
+ (void *) &PyUnicodeArrType_Type,
46
+ (void *) &PyVoidArrType_Type,
47
+ (void *) PyArray_SetNumericOps,
48
+ (void *) PyArray_GetNumericOps,
49
+ (void *) PyArray_INCREF,
50
+ (void *) PyArray_XDECREF,
51
+ (void *) PyArray_SetStringFunction,
52
+ (void *) PyArray_DescrFromType,
53
+ (void *) PyArray_TypeObjectFromType,
54
+ (void *) PyArray_Zero,
55
+ (void *) PyArray_One,
56
+ (void *) PyArray_CastToType,
57
+ (void *) PyArray_CastTo,
58
+ (void *) PyArray_CastAnyTo,
59
+ (void *) PyArray_CanCastSafely,
60
+ (void *) PyArray_CanCastTo,
61
+ (void *) PyArray_ObjectType,
62
+ (void *) PyArray_DescrFromObject,
63
+ (void *) PyArray_ConvertToCommonType,
64
+ (void *) PyArray_DescrFromScalar,
65
+ (void *) PyArray_DescrFromTypeObject,
66
+ (void *) PyArray_Size,
67
+ (void *) PyArray_Scalar,
68
+ (void *) PyArray_FromScalar,
69
+ (void *) PyArray_ScalarAsCtype,
70
+ (void *) PyArray_CastScalarToCtype,
71
+ (void *) PyArray_CastScalarDirect,
72
+ (void *) PyArray_ScalarFromObject,
73
+ (void *) PyArray_GetCastFunc,
74
+ (void *) PyArray_FromDims,
75
+ (void *) PyArray_FromDimsAndDataAndDescr,
76
+ (void *) PyArray_FromAny,
77
+ (void *) PyArray_EnsureArray,
78
+ (void *) PyArray_EnsureAnyArray,
79
+ (void *) PyArray_FromFile,
80
+ (void *) PyArray_FromString,
81
+ (void *) PyArray_FromBuffer,
82
+ (void *) PyArray_FromIter,
83
+ (void *) PyArray_Return,
84
+ (void *) PyArray_GetField,
85
+ (void *) PyArray_SetField,
86
+ (void *) PyArray_Byteswap,
87
+ (void *) PyArray_Resize,
88
+ (void *) PyArray_MoveInto,
89
+ (void *) PyArray_CopyInto,
90
+ (void *) PyArray_CopyAnyInto,
91
+ (void *) PyArray_CopyObject,
92
+ (void *) PyArray_NewCopy,
93
+ (void *) PyArray_ToList,
94
+ (void *) PyArray_ToString,
95
+ (void *) PyArray_ToFile,
96
+ (void *) PyArray_Dump,
97
+ (void *) PyArray_Dumps,
98
+ (void *) PyArray_ValidType,
99
+ (void *) PyArray_UpdateFlags,
100
+ (void *) PyArray_New,
101
+ (void *) PyArray_NewFromDescr,
102
+ (void *) PyArray_DescrNew,
103
+ (void *) PyArray_DescrNewFromType,
104
+ (void *) PyArray_GetPriority,
105
+ (void *) PyArray_IterNew,
106
+ (void *) PyArray_MultiIterNew,
107
+ (void *) PyArray_PyIntAsInt,
108
+ (void *) PyArray_PyIntAsIntp,
109
+ (void *) PyArray_Broadcast,
110
+ (void *) PyArray_FillObjectArray,
111
+ (void *) PyArray_FillWithScalar,
112
+ (void *) PyArray_CheckStrides,
113
+ (void *) PyArray_DescrNewByteorder,
114
+ (void *) PyArray_IterAllButAxis,
115
+ (void *) PyArray_CheckFromAny,
116
+ (void *) PyArray_FromArray,
117
+ (void *) PyArray_FromInterface,
118
+ (void *) PyArray_FromStructInterface,
119
+ (void *) PyArray_FromArrayAttr,
120
+ (void *) PyArray_ScalarKind,
121
+ (void *) PyArray_CanCoerceScalar,
122
+ (void *) PyArray_NewFlagsObject,
123
+ (void *) PyArray_CanCastScalar,
124
+ (void *) PyArray_CompareUCS4,
125
+ (void *) PyArray_RemoveSmallest,
126
+ (void *) PyArray_ElementStrides,
127
+ (void *) PyArray_Item_INCREF,
128
+ (void *) PyArray_Item_XDECREF,
129
+ (void *) PyArray_FieldNames,
130
+ (void *) PyArray_Transpose,
131
+ (void *) PyArray_TakeFrom,
132
+ (void *) PyArray_PutTo,
133
+ (void *) PyArray_PutMask,
134
+ (void *) PyArray_Repeat,
135
+ (void *) PyArray_Choose,
136
+ (void *) PyArray_Sort,
137
+ (void *) PyArray_ArgSort,
138
+ (void *) PyArray_SearchSorted,
139
+ (void *) PyArray_ArgMax,
140
+ (void *) PyArray_ArgMin,
141
+ (void *) PyArray_Reshape,
142
+ (void *) PyArray_Newshape,
143
+ (void *) PyArray_Squeeze,
144
+ (void *) PyArray_View,
145
+ (void *) PyArray_SwapAxes,
146
+ (void *) PyArray_Max,
147
+ (void *) PyArray_Min,
148
+ (void *) PyArray_Ptp,
149
+ (void *) PyArray_Mean,
150
+ (void *) PyArray_Trace,
151
+ (void *) PyArray_Diagonal,
152
+ (void *) PyArray_Clip,
153
+ (void *) PyArray_Conjugate,
154
+ (void *) PyArray_Nonzero,
155
+ (void *) PyArray_Std,
156
+ (void *) PyArray_Sum,
157
+ (void *) PyArray_CumSum,
158
+ (void *) PyArray_Prod,
159
+ (void *) PyArray_CumProd,
160
+ (void *) PyArray_All,
161
+ (void *) PyArray_Any,
162
+ (void *) PyArray_Compress,
163
+ (void *) PyArray_Flatten,
164
+ (void *) PyArray_Ravel,
165
+ (void *) PyArray_MultiplyList,
166
+ (void *) PyArray_MultiplyIntList,
167
+ (void *) PyArray_GetPtr,
168
+ (void *) PyArray_CompareLists,
169
+ (void *) PyArray_AsCArray,
170
+ (void *) PyArray_As1D,
171
+ (void *) PyArray_As2D,
172
+ (void *) PyArray_Free,
173
+ (void *) PyArray_Converter,
174
+ (void *) PyArray_IntpFromSequence,
175
+ (void *) PyArray_Concatenate,
176
+ (void *) PyArray_InnerProduct,
177
+ (void *) PyArray_MatrixProduct,
178
+ (void *) PyArray_CopyAndTranspose,
179
+ (void *) PyArray_Correlate,
180
+ (void *) PyArray_TypestrConvert,
181
+ (void *) PyArray_DescrConverter,
182
+ (void *) PyArray_DescrConverter2,
183
+ (void *) PyArray_IntpConverter,
184
+ (void *) PyArray_BufferConverter,
185
+ (void *) PyArray_AxisConverter,
186
+ (void *) PyArray_BoolConverter,
187
+ (void *) PyArray_ByteorderConverter,
188
+ (void *) PyArray_OrderConverter,
189
+ (void *) PyArray_EquivTypes,
190
+ (void *) PyArray_Zeros,
191
+ (void *) PyArray_Empty,
192
+ (void *) PyArray_Where,
193
+ (void *) PyArray_Arange,
194
+ (void *) PyArray_ArangeObj,
195
+ (void *) PyArray_SortkindConverter,
196
+ (void *) PyArray_LexSort,
197
+ (void *) PyArray_Round,
198
+ (void *) PyArray_EquivTypenums,
199
+ (void *) PyArray_RegisterDataType,
200
+ (void *) PyArray_RegisterCastFunc,
201
+ (void *) PyArray_RegisterCanCast,
202
+ (void *) PyArray_InitArrFuncs,
203
+ (void *) PyArray_IntTupleFromIntp,
204
+ (void *) PyArray_TypeNumFromName,
205
+ (void *) PyArray_ClipmodeConverter,
206
+ (void *) PyArray_OutputConverter,
207
+ (void *) PyArray_BroadcastToShape,
208
+ (void *) _PyArray_SigintHandler,
209
+ (void *) _PyArray_GetSigintBuf,
210
+ (void *) PyArray_DescrAlignConverter,
211
+ (void *) PyArray_DescrAlignConverter2,
212
+ (void *) PyArray_SearchsideConverter,
213
+ (void *) PyArray_CheckAxis,
214
+ (void *) PyArray_OverflowMultiplyList,
215
+ (void *) PyArray_CompareString,
216
+ (void *) PyArray_MultiIterFromObjects,
217
+ (void *) PyArray_GetEndianness,
218
+ (void *) PyArray_GetNDArrayCFeatureVersion,
219
+ (void *) PyArray_Correlate2,
220
+ (void *) PyArray_NeighborhoodIterNew,
221
+ (void *) &PyTimeIntegerArrType_Type,
222
+ (void *) &PyDatetimeArrType_Type,
223
+ (void *) &PyTimedeltaArrType_Type,
224
+ (void *) &PyHalfArrType_Type,
225
+ (void *) &NpyIter_Type,
226
+ (void *) PyArray_SetDatetimeParseFunction,
227
+ (void *) PyArray_DatetimeToDatetimeStruct,
228
+ (void *) PyArray_TimedeltaToTimedeltaStruct,
229
+ (void *) PyArray_DatetimeStructToDatetime,
230
+ (void *) PyArray_TimedeltaStructToTimedelta,
231
+ (void *) NpyIter_New,
232
+ (void *) NpyIter_MultiNew,
233
+ (void *) NpyIter_AdvancedNew,
234
+ (void *) NpyIter_Copy,
235
+ (void *) NpyIter_Deallocate,
236
+ (void *) NpyIter_HasDelayedBufAlloc,
237
+ (void *) NpyIter_HasExternalLoop,
238
+ (void *) NpyIter_EnableExternalLoop,
239
+ (void *) NpyIter_GetInnerStrideArray,
240
+ (void *) NpyIter_GetInnerLoopSizePtr,
241
+ (void *) NpyIter_Reset,
242
+ (void *) NpyIter_ResetBasePointers,
243
+ (void *) NpyIter_ResetToIterIndexRange,
244
+ (void *) NpyIter_GetNDim,
245
+ (void *) NpyIter_GetNOp,
246
+ (void *) NpyIter_GetIterNext,
247
+ (void *) NpyIter_GetIterSize,
248
+ (void *) NpyIter_GetIterIndexRange,
249
+ (void *) NpyIter_GetIterIndex,
250
+ (void *) NpyIter_GotoIterIndex,
251
+ (void *) NpyIter_HasMultiIndex,
252
+ (void *) NpyIter_GetShape,
253
+ (void *) NpyIter_GetGetMultiIndex,
254
+ (void *) NpyIter_GotoMultiIndex,
255
+ (void *) NpyIter_RemoveMultiIndex,
256
+ (void *) NpyIter_HasIndex,
257
+ (void *) NpyIter_IsBuffered,
258
+ (void *) NpyIter_IsGrowInner,
259
+ (void *) NpyIter_GetBufferSize,
260
+ (void *) NpyIter_GetIndexPtr,
261
+ (void *) NpyIter_GotoIndex,
262
+ (void *) NpyIter_GetDataPtrArray,
263
+ (void *) NpyIter_GetDescrArray,
264
+ (void *) NpyIter_GetOperandArray,
265
+ (void *) NpyIter_GetIterView,
266
+ (void *) NpyIter_GetReadFlags,
267
+ (void *) NpyIter_GetWriteFlags,
268
+ (void *) NpyIter_DebugPrint,
269
+ (void *) NpyIter_IterationNeedsAPI,
270
+ (void *) NpyIter_GetInnerFixedStrideArray,
271
+ (void *) NpyIter_RemoveAxis,
272
+ (void *) NpyIter_GetAxisStrideArray,
273
+ (void *) NpyIter_RequiresBuffering,
274
+ (void *) NpyIter_GetInitialDataPtrArray,
275
+ (void *) NpyIter_CreateCompatibleStrides,
276
+ (void *) PyArray_CastingConverter,
277
+ (void *) PyArray_CountNonzero,
278
+ (void *) PyArray_PromoteTypes,
279
+ (void *) PyArray_MinScalarType,
280
+ (void *) PyArray_ResultType,
281
+ (void *) PyArray_CanCastArrayTo,
282
+ (void *) PyArray_CanCastTypeTo,
283
+ (void *) PyArray_EinsteinSum,
284
+ (void *) PyArray_NewLikeArray,
285
+ (void *) PyArray_GetArrayParamsFromObject,
286
+ (void *) PyArray_ConvertClipmodeSequence,
287
+ (void *) PyArray_MatrixProduct2,
288
+ (void *) NpyIter_IsFirstVisit,
289
+ (void *) PyArray_SetBaseObject,
290
+ (void *) PyArray_CreateSortedStridePerm,
291
+ (void *) PyArray_RemoveAxesInPlace,
292
+ (void *) PyArray_DebugPrint,
293
+ (void *) PyArray_FailUnlessWriteable,
294
+ (void *) PyArray_SetUpdateIfCopyBase,
295
+ (void *) PyDataMem_NEW,
296
+ (void *) PyDataMem_FREE,
297
+ (void *) PyDataMem_RENEW,
298
+ (void *) PyDataMem_SetEventHook,
299
+ (NPY_CASTING *) &NPY_DEFAULT_ASSIGN_CASTING,
300
+ (void *) PyArray_MapIterSwapAxes,
301
+ (void *) PyArray_MapIterArray,
302
+ (void *) PyArray_MapIterNext,
303
+ (void *) PyArray_Partition,
304
+ (void *) PyArray_ArgPartition,
305
+ (void *) PyArray_SelectkindConverter,
306
+ (void *) PyDataMem_NEW_ZEROED,
307
+ (void *) PyArray_CheckAnyScalarExact,
308
+ (void *) PyArray_MapIterArrayCopyIfOverlap,
309
+ (void *) PyArray_ResolveWritebackIfCopy,
310
+ (void *) PyArray_SetWritebackIfCopyBase,
311
+ (void *) PyDataMem_SetHandler,
312
+ (void *) PyDataMem_GetHandler,
313
+ (PyObject* *) &PyDataMem_DefaultHandler
314
+ };
venv/lib/python3.10/site-packages/numpy/core/include/numpy/__multiarray_api.h ADDED
@@ -0,0 +1,1566 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ #if defined(_MULTIARRAYMODULE) || defined(WITH_CPYCHECKER_STEALS_REFERENCE_TO_ARG_ATTRIBUTE)
3
+
4
+ typedef struct {
5
+ PyObject_HEAD
6
+ npy_bool obval;
7
+ } PyBoolScalarObject;
8
+
9
+ extern NPY_NO_EXPORT PyTypeObject PyArrayMapIter_Type;
10
+ extern NPY_NO_EXPORT PyTypeObject PyArrayNeighborhoodIter_Type;
11
+ extern NPY_NO_EXPORT PyBoolScalarObject _PyArrayScalar_BoolValues[2];
12
+
13
+ NPY_NO_EXPORT unsigned int PyArray_GetNDArrayCVersion \
14
+ (void);
15
+ extern NPY_NO_EXPORT PyTypeObject PyBigArray_Type;
16
+
17
+ extern NPY_NO_EXPORT PyTypeObject PyArray_Type;
18
+
19
+ extern NPY_NO_EXPORT PyArray_DTypeMeta PyArrayDescr_TypeFull;
20
+ #define PyArrayDescr_Type (*(PyTypeObject *)(&PyArrayDescr_TypeFull))
21
+
22
+ extern NPY_NO_EXPORT PyTypeObject PyArrayFlags_Type;
23
+
24
+ extern NPY_NO_EXPORT PyTypeObject PyArrayIter_Type;
25
+
26
+ extern NPY_NO_EXPORT PyTypeObject PyArrayMultiIter_Type;
27
+
28
+ extern NPY_NO_EXPORT int NPY_NUMUSERTYPES;
29
+
30
+ extern NPY_NO_EXPORT PyTypeObject PyBoolArrType_Type;
31
+
32
+ extern NPY_NO_EXPORT PyBoolScalarObject _PyArrayScalar_BoolValues[2];
33
+
34
+ extern NPY_NO_EXPORT PyTypeObject PyGenericArrType_Type;
35
+
36
+ extern NPY_NO_EXPORT PyTypeObject PyNumberArrType_Type;
37
+
38
+ extern NPY_NO_EXPORT PyTypeObject PyIntegerArrType_Type;
39
+
40
+ extern NPY_NO_EXPORT PyTypeObject PySignedIntegerArrType_Type;
41
+
42
+ extern NPY_NO_EXPORT PyTypeObject PyUnsignedIntegerArrType_Type;
43
+
44
+ extern NPY_NO_EXPORT PyTypeObject PyInexactArrType_Type;
45
+
46
+ extern NPY_NO_EXPORT PyTypeObject PyFloatingArrType_Type;
47
+
48
+ extern NPY_NO_EXPORT PyTypeObject PyComplexFloatingArrType_Type;
49
+
50
+ extern NPY_NO_EXPORT PyTypeObject PyFlexibleArrType_Type;
51
+
52
+ extern NPY_NO_EXPORT PyTypeObject PyCharacterArrType_Type;
53
+
54
+ extern NPY_NO_EXPORT PyTypeObject PyByteArrType_Type;
55
+
56
+ extern NPY_NO_EXPORT PyTypeObject PyShortArrType_Type;
57
+
58
+ extern NPY_NO_EXPORT PyTypeObject PyIntArrType_Type;
59
+
60
+ extern NPY_NO_EXPORT PyTypeObject PyLongArrType_Type;
61
+
62
+ extern NPY_NO_EXPORT PyTypeObject PyLongLongArrType_Type;
63
+
64
+ extern NPY_NO_EXPORT PyTypeObject PyUByteArrType_Type;
65
+
66
+ extern NPY_NO_EXPORT PyTypeObject PyUShortArrType_Type;
67
+
68
+ extern NPY_NO_EXPORT PyTypeObject PyUIntArrType_Type;
69
+
70
+ extern NPY_NO_EXPORT PyTypeObject PyULongArrType_Type;
71
+
72
+ extern NPY_NO_EXPORT PyTypeObject PyULongLongArrType_Type;
73
+
74
+ extern NPY_NO_EXPORT PyTypeObject PyFloatArrType_Type;
75
+
76
+ extern NPY_NO_EXPORT PyTypeObject PyDoubleArrType_Type;
77
+
78
+ extern NPY_NO_EXPORT PyTypeObject PyLongDoubleArrType_Type;
79
+
80
+ extern NPY_NO_EXPORT PyTypeObject PyCFloatArrType_Type;
81
+
82
+ extern NPY_NO_EXPORT PyTypeObject PyCDoubleArrType_Type;
83
+
84
+ extern NPY_NO_EXPORT PyTypeObject PyCLongDoubleArrType_Type;
85
+
86
+ extern NPY_NO_EXPORT PyTypeObject PyObjectArrType_Type;
87
+
88
+ extern NPY_NO_EXPORT PyTypeObject PyStringArrType_Type;
89
+
90
+ extern NPY_NO_EXPORT PyTypeObject PyUnicodeArrType_Type;
91
+
92
+ extern NPY_NO_EXPORT PyTypeObject PyVoidArrType_Type;
93
+
94
+ NPY_NO_EXPORT int PyArray_SetNumericOps \
95
+ (PyObject *);
96
+ NPY_NO_EXPORT PyObject * PyArray_GetNumericOps \
97
+ (void);
98
+ NPY_NO_EXPORT int PyArray_INCREF \
99
+ (PyArrayObject *);
100
+ NPY_NO_EXPORT int PyArray_XDECREF \
101
+ (PyArrayObject *);
102
+ NPY_NO_EXPORT void PyArray_SetStringFunction \
103
+ (PyObject *, int);
104
+ NPY_NO_EXPORT PyArray_Descr * PyArray_DescrFromType \
105
+ (int);
106
+ NPY_NO_EXPORT PyObject * PyArray_TypeObjectFromType \
107
+ (int);
108
+ NPY_NO_EXPORT char * PyArray_Zero \
109
+ (PyArrayObject *);
110
+ NPY_NO_EXPORT char * PyArray_One \
111
+ (PyArrayObject *);
112
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(2) PyObject * PyArray_CastToType \
113
+ (PyArrayObject *, PyArray_Descr *, int);
114
+ NPY_NO_EXPORT int PyArray_CastTo \
115
+ (PyArrayObject *, PyArrayObject *);
116
+ NPY_NO_EXPORT int PyArray_CastAnyTo \
117
+ (PyArrayObject *, PyArrayObject *);
118
+ NPY_NO_EXPORT int PyArray_CanCastSafely \
119
+ (int, int);
120
+ NPY_NO_EXPORT npy_bool PyArray_CanCastTo \
121
+ (PyArray_Descr *, PyArray_Descr *);
122
+ NPY_NO_EXPORT int PyArray_ObjectType \
123
+ (PyObject *, int);
124
+ NPY_NO_EXPORT PyArray_Descr * PyArray_DescrFromObject \
125
+ (PyObject *, PyArray_Descr *);
126
+ NPY_NO_EXPORT PyArrayObject ** PyArray_ConvertToCommonType \
127
+ (PyObject *, int *);
128
+ NPY_NO_EXPORT PyArray_Descr * PyArray_DescrFromScalar \
129
+ (PyObject *);
130
+ NPY_NO_EXPORT PyArray_Descr * PyArray_DescrFromTypeObject \
131
+ (PyObject *);
132
+ NPY_NO_EXPORT npy_intp PyArray_Size \
133
+ (PyObject *);
134
+ NPY_NO_EXPORT PyObject * PyArray_Scalar \
135
+ (void *, PyArray_Descr *, PyObject *);
136
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(2) PyObject * PyArray_FromScalar \
137
+ (PyObject *, PyArray_Descr *);
138
+ NPY_NO_EXPORT void PyArray_ScalarAsCtype \
139
+ (PyObject *, void *);
140
+ NPY_NO_EXPORT int PyArray_CastScalarToCtype \
141
+ (PyObject *, void *, PyArray_Descr *);
142
+ NPY_NO_EXPORT int PyArray_CastScalarDirect \
143
+ (PyObject *, PyArray_Descr *, void *, int);
144
+ NPY_NO_EXPORT PyObject * PyArray_ScalarFromObject \
145
+ (PyObject *);
146
+ NPY_NO_EXPORT PyArray_VectorUnaryFunc * PyArray_GetCastFunc \
147
+ (PyArray_Descr *, int);
148
+ NPY_NO_EXPORT PyObject * PyArray_FromDims \
149
+ (int NPY_UNUSED(nd), int *NPY_UNUSED(d), int NPY_UNUSED(type));
150
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(3) PyObject * PyArray_FromDimsAndDataAndDescr \
151
+ (int NPY_UNUSED(nd), int *NPY_UNUSED(d), PyArray_Descr *, char *NPY_UNUSED(data));
152
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(2) PyObject * PyArray_FromAny \
153
+ (PyObject *, PyArray_Descr *, int, int, int, PyObject *);
154
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(1) PyObject * PyArray_EnsureArray \
155
+ (PyObject *);
156
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(1) PyObject * PyArray_EnsureAnyArray \
157
+ (PyObject *);
158
+ NPY_NO_EXPORT PyObject * PyArray_FromFile \
159
+ (FILE *, PyArray_Descr *, npy_intp, char *);
160
+ NPY_NO_EXPORT PyObject * PyArray_FromString \
161
+ (char *, npy_intp, PyArray_Descr *, npy_intp, char *);
162
+ NPY_NO_EXPORT PyObject * PyArray_FromBuffer \
163
+ (PyObject *, PyArray_Descr *, npy_intp, npy_intp);
164
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(2) PyObject * PyArray_FromIter \
165
+ (PyObject *, PyArray_Descr *, npy_intp);
166
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(1) PyObject * PyArray_Return \
167
+ (PyArrayObject *);
168
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(2) PyObject * PyArray_GetField \
169
+ (PyArrayObject *, PyArray_Descr *, int);
170
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(2) int PyArray_SetField \
171
+ (PyArrayObject *, PyArray_Descr *, int, PyObject *);
172
+ NPY_NO_EXPORT PyObject * PyArray_Byteswap \
173
+ (PyArrayObject *, npy_bool);
174
+ NPY_NO_EXPORT PyObject * PyArray_Resize \
175
+ (PyArrayObject *, PyArray_Dims *, int, NPY_ORDER NPY_UNUSED(order));
176
+ NPY_NO_EXPORT int PyArray_MoveInto \
177
+ (PyArrayObject *, PyArrayObject *);
178
+ NPY_NO_EXPORT int PyArray_CopyInto \
179
+ (PyArrayObject *, PyArrayObject *);
180
+ NPY_NO_EXPORT int PyArray_CopyAnyInto \
181
+ (PyArrayObject *, PyArrayObject *);
182
+ NPY_NO_EXPORT int PyArray_CopyObject \
183
+ (PyArrayObject *, PyObject *);
184
+ NPY_NO_EXPORT PyObject * PyArray_NewCopy \
185
+ (PyArrayObject *, NPY_ORDER);
186
+ NPY_NO_EXPORT PyObject * PyArray_ToList \
187
+ (PyArrayObject *);
188
+ NPY_NO_EXPORT PyObject * PyArray_ToString \
189
+ (PyArrayObject *, NPY_ORDER);
190
+ NPY_NO_EXPORT int PyArray_ToFile \
191
+ (PyArrayObject *, FILE *, char *, char *);
192
+ NPY_NO_EXPORT int PyArray_Dump \
193
+ (PyObject *, PyObject *, int);
194
+ NPY_NO_EXPORT PyObject * PyArray_Dumps \
195
+ (PyObject *, int);
196
+ NPY_NO_EXPORT int PyArray_ValidType \
197
+ (int);
198
+ NPY_NO_EXPORT void PyArray_UpdateFlags \
199
+ (PyArrayObject *, int);
200
+ NPY_NO_EXPORT PyObject * PyArray_New \
201
+ (PyTypeObject *, int, npy_intp const *, int, npy_intp const *, void *, int, int, PyObject *);
202
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(2) PyObject * PyArray_NewFromDescr \
203
+ (PyTypeObject *, PyArray_Descr *, int, npy_intp const *, npy_intp const *, void *, int, PyObject *);
204
+ NPY_NO_EXPORT PyArray_Descr * PyArray_DescrNew \
205
+ (PyArray_Descr *);
206
+ NPY_NO_EXPORT PyArray_Descr * PyArray_DescrNewFromType \
207
+ (int);
208
+ NPY_NO_EXPORT double PyArray_GetPriority \
209
+ (PyObject *, double);
210
+ NPY_NO_EXPORT PyObject * PyArray_IterNew \
211
+ (PyObject *);
212
+ NPY_NO_EXPORT PyObject* PyArray_MultiIterNew \
213
+ (int, ...);
214
+ NPY_NO_EXPORT int PyArray_PyIntAsInt \
215
+ (PyObject *);
216
+ NPY_NO_EXPORT npy_intp PyArray_PyIntAsIntp \
217
+ (PyObject *);
218
+ NPY_NO_EXPORT int PyArray_Broadcast \
219
+ (PyArrayMultiIterObject *);
220
+ NPY_NO_EXPORT void PyArray_FillObjectArray \
221
+ (PyArrayObject *, PyObject *);
222
+ NPY_NO_EXPORT int PyArray_FillWithScalar \
223
+ (PyArrayObject *, PyObject *);
224
+ NPY_NO_EXPORT npy_bool PyArray_CheckStrides \
225
+ (int, int, npy_intp, npy_intp, npy_intp const *, npy_intp const *);
226
+ NPY_NO_EXPORT PyArray_Descr * PyArray_DescrNewByteorder \
227
+ (PyArray_Descr *, char);
228
+ NPY_NO_EXPORT PyObject * PyArray_IterAllButAxis \
229
+ (PyObject *, int *);
230
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(2) PyObject * PyArray_CheckFromAny \
231
+ (PyObject *, PyArray_Descr *, int, int, int, PyObject *);
232
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(2) PyObject * PyArray_FromArray \
233
+ (PyArrayObject *, PyArray_Descr *, int);
234
+ NPY_NO_EXPORT PyObject * PyArray_FromInterface \
235
+ (PyObject *);
236
+ NPY_NO_EXPORT PyObject * PyArray_FromStructInterface \
237
+ (PyObject *);
238
+ NPY_NO_EXPORT PyObject * PyArray_FromArrayAttr \
239
+ (PyObject *, PyArray_Descr *, PyObject *);
240
+ NPY_NO_EXPORT NPY_SCALARKIND PyArray_ScalarKind \
241
+ (int, PyArrayObject **);
242
+ NPY_NO_EXPORT int PyArray_CanCoerceScalar \
243
+ (int, int, NPY_SCALARKIND);
244
+ NPY_NO_EXPORT PyObject * PyArray_NewFlagsObject \
245
+ (PyObject *);
246
+ NPY_NO_EXPORT npy_bool PyArray_CanCastScalar \
247
+ (PyTypeObject *, PyTypeObject *);
248
+ NPY_NO_EXPORT int PyArray_CompareUCS4 \
249
+ (npy_ucs4 const *, npy_ucs4 const *, size_t);
250
+ NPY_NO_EXPORT int PyArray_RemoveSmallest \
251
+ (PyArrayMultiIterObject *);
252
+ NPY_NO_EXPORT int PyArray_ElementStrides \
253
+ (PyObject *);
254
+ NPY_NO_EXPORT void PyArray_Item_INCREF \
255
+ (char *, PyArray_Descr *);
256
+ NPY_NO_EXPORT void PyArray_Item_XDECREF \
257
+ (char *, PyArray_Descr *);
258
+ NPY_NO_EXPORT PyObject * PyArray_FieldNames \
259
+ (PyObject *);
260
+ NPY_NO_EXPORT PyObject * PyArray_Transpose \
261
+ (PyArrayObject *, PyArray_Dims *);
262
+ NPY_NO_EXPORT PyObject * PyArray_TakeFrom \
263
+ (PyArrayObject *, PyObject *, int, PyArrayObject *, NPY_CLIPMODE);
264
+ NPY_NO_EXPORT PyObject * PyArray_PutTo \
265
+ (PyArrayObject *, PyObject*, PyObject *, NPY_CLIPMODE);
266
+ NPY_NO_EXPORT PyObject * PyArray_PutMask \
267
+ (PyArrayObject *, PyObject*, PyObject*);
268
+ NPY_NO_EXPORT PyObject * PyArray_Repeat \
269
+ (PyArrayObject *, PyObject *, int);
270
+ NPY_NO_EXPORT PyObject * PyArray_Choose \
271
+ (PyArrayObject *, PyObject *, PyArrayObject *, NPY_CLIPMODE);
272
+ NPY_NO_EXPORT int PyArray_Sort \
273
+ (PyArrayObject *, int, NPY_SORTKIND);
274
+ NPY_NO_EXPORT PyObject * PyArray_ArgSort \
275
+ (PyArrayObject *, int, NPY_SORTKIND);
276
+ NPY_NO_EXPORT PyObject * PyArray_SearchSorted \
277
+ (PyArrayObject *, PyObject *, NPY_SEARCHSIDE, PyObject *);
278
+ NPY_NO_EXPORT PyObject * PyArray_ArgMax \
279
+ (PyArrayObject *, int, PyArrayObject *);
280
+ NPY_NO_EXPORT PyObject * PyArray_ArgMin \
281
+ (PyArrayObject *, int, PyArrayObject *);
282
+ NPY_NO_EXPORT PyObject * PyArray_Reshape \
283
+ (PyArrayObject *, PyObject *);
284
+ NPY_NO_EXPORT PyObject * PyArray_Newshape \
285
+ (PyArrayObject *, PyArray_Dims *, NPY_ORDER);
286
+ NPY_NO_EXPORT PyObject * PyArray_Squeeze \
287
+ (PyArrayObject *);
288
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(2) PyObject * PyArray_View \
289
+ (PyArrayObject *, PyArray_Descr *, PyTypeObject *);
290
+ NPY_NO_EXPORT PyObject * PyArray_SwapAxes \
291
+ (PyArrayObject *, int, int);
292
+ NPY_NO_EXPORT PyObject * PyArray_Max \
293
+ (PyArrayObject *, int, PyArrayObject *);
294
+ NPY_NO_EXPORT PyObject * PyArray_Min \
295
+ (PyArrayObject *, int, PyArrayObject *);
296
+ NPY_NO_EXPORT PyObject * PyArray_Ptp \
297
+ (PyArrayObject *, int, PyArrayObject *);
298
+ NPY_NO_EXPORT PyObject * PyArray_Mean \
299
+ (PyArrayObject *, int, int, PyArrayObject *);
300
+ NPY_NO_EXPORT PyObject * PyArray_Trace \
301
+ (PyArrayObject *, int, int, int, int, PyArrayObject *);
302
+ NPY_NO_EXPORT PyObject * PyArray_Diagonal \
303
+ (PyArrayObject *, int, int, int);
304
+ NPY_NO_EXPORT PyObject * PyArray_Clip \
305
+ (PyArrayObject *, PyObject *, PyObject *, PyArrayObject *);
306
+ NPY_NO_EXPORT PyObject * PyArray_Conjugate \
307
+ (PyArrayObject *, PyArrayObject *);
308
+ NPY_NO_EXPORT PyObject * PyArray_Nonzero \
309
+ (PyArrayObject *);
310
+ NPY_NO_EXPORT PyObject * PyArray_Std \
311
+ (PyArrayObject *, int, int, PyArrayObject *, int);
312
+ NPY_NO_EXPORT PyObject * PyArray_Sum \
313
+ (PyArrayObject *, int, int, PyArrayObject *);
314
+ NPY_NO_EXPORT PyObject * PyArray_CumSum \
315
+ (PyArrayObject *, int, int, PyArrayObject *);
316
+ NPY_NO_EXPORT PyObject * PyArray_Prod \
317
+ (PyArrayObject *, int, int, PyArrayObject *);
318
+ NPY_NO_EXPORT PyObject * PyArray_CumProd \
319
+ (PyArrayObject *, int, int, PyArrayObject *);
320
+ NPY_NO_EXPORT PyObject * PyArray_All \
321
+ (PyArrayObject *, int, PyArrayObject *);
322
+ NPY_NO_EXPORT PyObject * PyArray_Any \
323
+ (PyArrayObject *, int, PyArrayObject *);
324
+ NPY_NO_EXPORT PyObject * PyArray_Compress \
325
+ (PyArrayObject *, PyObject *, int, PyArrayObject *);
326
+ NPY_NO_EXPORT PyObject * PyArray_Flatten \
327
+ (PyArrayObject *, NPY_ORDER);
328
+ NPY_NO_EXPORT PyObject * PyArray_Ravel \
329
+ (PyArrayObject *, NPY_ORDER);
330
+ NPY_NO_EXPORT npy_intp PyArray_MultiplyList \
331
+ (npy_intp const *, int);
332
+ NPY_NO_EXPORT int PyArray_MultiplyIntList \
333
+ (int const *, int);
334
+ NPY_NO_EXPORT void * PyArray_GetPtr \
335
+ (PyArrayObject *, npy_intp const*);
336
+ NPY_NO_EXPORT int PyArray_CompareLists \
337
+ (npy_intp const *, npy_intp const *, int);
338
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(5) int PyArray_AsCArray \
339
+ (PyObject **, void *, npy_intp *, int, PyArray_Descr*);
340
+ NPY_NO_EXPORT int PyArray_As1D \
341
+ (PyObject **NPY_UNUSED(op), char **NPY_UNUSED(ptr), int *NPY_UNUSED(d1), int NPY_UNUSED(typecode));
342
+ NPY_NO_EXPORT int PyArray_As2D \
343
+ (PyObject **NPY_UNUSED(op), char ***NPY_UNUSED(ptr), int *NPY_UNUSED(d1), int *NPY_UNUSED(d2), int NPY_UNUSED(typecode));
344
+ NPY_NO_EXPORT int PyArray_Free \
345
+ (PyObject *, void *);
346
+ NPY_NO_EXPORT int PyArray_Converter \
347
+ (PyObject *, PyObject **);
348
+ NPY_NO_EXPORT int PyArray_IntpFromSequence \
349
+ (PyObject *, npy_intp *, int);
350
+ NPY_NO_EXPORT PyObject * PyArray_Concatenate \
351
+ (PyObject *, int);
352
+ NPY_NO_EXPORT PyObject * PyArray_InnerProduct \
353
+ (PyObject *, PyObject *);
354
+ NPY_NO_EXPORT PyObject * PyArray_MatrixProduct \
355
+ (PyObject *, PyObject *);
356
+ NPY_NO_EXPORT PyObject * PyArray_CopyAndTranspose \
357
+ (PyObject *);
358
+ NPY_NO_EXPORT PyObject * PyArray_Correlate \
359
+ (PyObject *, PyObject *, int);
360
+ NPY_NO_EXPORT int PyArray_TypestrConvert \
361
+ (int, int);
362
+ NPY_NO_EXPORT int PyArray_DescrConverter \
363
+ (PyObject *, PyArray_Descr **);
364
+ NPY_NO_EXPORT int PyArray_DescrConverter2 \
365
+ (PyObject *, PyArray_Descr **);
366
+ NPY_NO_EXPORT int PyArray_IntpConverter \
367
+ (PyObject *, PyArray_Dims *);
368
+ NPY_NO_EXPORT int PyArray_BufferConverter \
369
+ (PyObject *, PyArray_Chunk *);
370
+ NPY_NO_EXPORT int PyArray_AxisConverter \
371
+ (PyObject *, int *);
372
+ NPY_NO_EXPORT int PyArray_BoolConverter \
373
+ (PyObject *, npy_bool *);
374
+ NPY_NO_EXPORT int PyArray_ByteorderConverter \
375
+ (PyObject *, char *);
376
+ NPY_NO_EXPORT int PyArray_OrderConverter \
377
+ (PyObject *, NPY_ORDER *);
378
+ NPY_NO_EXPORT unsigned char PyArray_EquivTypes \
379
+ (PyArray_Descr *, PyArray_Descr *);
380
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(3) PyObject * PyArray_Zeros \
381
+ (int, npy_intp const *, PyArray_Descr *, int);
382
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(3) PyObject * PyArray_Empty \
383
+ (int, npy_intp const *, PyArray_Descr *, int);
384
+ NPY_NO_EXPORT PyObject * PyArray_Where \
385
+ (PyObject *, PyObject *, PyObject *);
386
+ NPY_NO_EXPORT PyObject * PyArray_Arange \
387
+ (double, double, double, int);
388
+ NPY_NO_EXPORT PyObject * PyArray_ArangeObj \
389
+ (PyObject *, PyObject *, PyObject *, PyArray_Descr *);
390
+ NPY_NO_EXPORT int PyArray_SortkindConverter \
391
+ (PyObject *, NPY_SORTKIND *);
392
+ NPY_NO_EXPORT PyObject * PyArray_LexSort \
393
+ (PyObject *, int);
394
+ NPY_NO_EXPORT PyObject * PyArray_Round \
395
+ (PyArrayObject *, int, PyArrayObject *);
396
+ NPY_NO_EXPORT unsigned char PyArray_EquivTypenums \
397
+ (int, int);
398
+ NPY_NO_EXPORT int PyArray_RegisterDataType \
399
+ (PyArray_Descr *);
400
+ NPY_NO_EXPORT int PyArray_RegisterCastFunc \
401
+ (PyArray_Descr *, int, PyArray_VectorUnaryFunc *);
402
+ NPY_NO_EXPORT int PyArray_RegisterCanCast \
403
+ (PyArray_Descr *, int, NPY_SCALARKIND);
404
+ NPY_NO_EXPORT void PyArray_InitArrFuncs \
405
+ (PyArray_ArrFuncs *);
406
+ NPY_NO_EXPORT PyObject * PyArray_IntTupleFromIntp \
407
+ (int, npy_intp const *);
408
+ NPY_NO_EXPORT int PyArray_TypeNumFromName \
409
+ (char const *);
410
+ NPY_NO_EXPORT int PyArray_ClipmodeConverter \
411
+ (PyObject *, NPY_CLIPMODE *);
412
+ NPY_NO_EXPORT int PyArray_OutputConverter \
413
+ (PyObject *, PyArrayObject **);
414
+ NPY_NO_EXPORT PyObject * PyArray_BroadcastToShape \
415
+ (PyObject *, npy_intp *, int);
416
+ NPY_NO_EXPORT void _PyArray_SigintHandler \
417
+ (int);
418
+ NPY_NO_EXPORT void* _PyArray_GetSigintBuf \
419
+ (void);
420
+ NPY_NO_EXPORT int PyArray_DescrAlignConverter \
421
+ (PyObject *, PyArray_Descr **);
422
+ NPY_NO_EXPORT int PyArray_DescrAlignConverter2 \
423
+ (PyObject *, PyArray_Descr **);
424
+ NPY_NO_EXPORT int PyArray_SearchsideConverter \
425
+ (PyObject *, void *);
426
+ NPY_NO_EXPORT PyObject * PyArray_CheckAxis \
427
+ (PyArrayObject *, int *, int);
428
+ NPY_NO_EXPORT npy_intp PyArray_OverflowMultiplyList \
429
+ (npy_intp const *, int);
430
+ NPY_NO_EXPORT int PyArray_CompareString \
431
+ (const char *, const char *, size_t);
432
+ NPY_NO_EXPORT PyObject* PyArray_MultiIterFromObjects \
433
+ (PyObject **, int, int, ...);
434
+ NPY_NO_EXPORT int PyArray_GetEndianness \
435
+ (void);
436
+ NPY_NO_EXPORT unsigned int PyArray_GetNDArrayCFeatureVersion \
437
+ (void);
438
+ NPY_NO_EXPORT PyObject * PyArray_Correlate2 \
439
+ (PyObject *, PyObject *, int);
440
+ NPY_NO_EXPORT PyObject* PyArray_NeighborhoodIterNew \
441
+ (PyArrayIterObject *, const npy_intp *, int, PyArrayObject*);
442
+ extern NPY_NO_EXPORT PyTypeObject PyTimeIntegerArrType_Type;
443
+
444
+ extern NPY_NO_EXPORT PyTypeObject PyDatetimeArrType_Type;
445
+
446
+ extern NPY_NO_EXPORT PyTypeObject PyTimedeltaArrType_Type;
447
+
448
+ extern NPY_NO_EXPORT PyTypeObject PyHalfArrType_Type;
449
+
450
+ extern NPY_NO_EXPORT PyTypeObject NpyIter_Type;
451
+
452
+ NPY_NO_EXPORT void PyArray_SetDatetimeParseFunction \
453
+ (PyObject *NPY_UNUSED(op));
454
+ NPY_NO_EXPORT void PyArray_DatetimeToDatetimeStruct \
455
+ (npy_datetime NPY_UNUSED(val), NPY_DATETIMEUNIT NPY_UNUSED(fr), npy_datetimestruct *);
456
+ NPY_NO_EXPORT void PyArray_TimedeltaToTimedeltaStruct \
457
+ (npy_timedelta NPY_UNUSED(val), NPY_DATETIMEUNIT NPY_UNUSED(fr), npy_timedeltastruct *);
458
+ NPY_NO_EXPORT npy_datetime PyArray_DatetimeStructToDatetime \
459
+ (NPY_DATETIMEUNIT NPY_UNUSED(fr), npy_datetimestruct *NPY_UNUSED(d));
460
+ NPY_NO_EXPORT npy_datetime PyArray_TimedeltaStructToTimedelta \
461
+ (NPY_DATETIMEUNIT NPY_UNUSED(fr), npy_timedeltastruct *NPY_UNUSED(d));
462
+ NPY_NO_EXPORT NpyIter * NpyIter_New \
463
+ (PyArrayObject *, npy_uint32, NPY_ORDER, NPY_CASTING, PyArray_Descr*);
464
+ NPY_NO_EXPORT NpyIter * NpyIter_MultiNew \
465
+ (int, PyArrayObject **, npy_uint32, NPY_ORDER, NPY_CASTING, npy_uint32 *, PyArray_Descr **);
466
+ NPY_NO_EXPORT NpyIter * NpyIter_AdvancedNew \
467
+ (int, PyArrayObject **, npy_uint32, NPY_ORDER, NPY_CASTING, npy_uint32 *, PyArray_Descr **, int, int **, npy_intp *, npy_intp);
468
+ NPY_NO_EXPORT NpyIter * NpyIter_Copy \
469
+ (NpyIter *);
470
+ NPY_NO_EXPORT int NpyIter_Deallocate \
471
+ (NpyIter *);
472
+ NPY_NO_EXPORT npy_bool NpyIter_HasDelayedBufAlloc \
473
+ (NpyIter *);
474
+ NPY_NO_EXPORT npy_bool NpyIter_HasExternalLoop \
475
+ (NpyIter *);
476
+ NPY_NO_EXPORT int NpyIter_EnableExternalLoop \
477
+ (NpyIter *);
478
+ NPY_NO_EXPORT npy_intp * NpyIter_GetInnerStrideArray \
479
+ (NpyIter *);
480
+ NPY_NO_EXPORT npy_intp * NpyIter_GetInnerLoopSizePtr \
481
+ (NpyIter *);
482
+ NPY_NO_EXPORT int NpyIter_Reset \
483
+ (NpyIter *, char **);
484
+ NPY_NO_EXPORT int NpyIter_ResetBasePointers \
485
+ (NpyIter *, char **, char **);
486
+ NPY_NO_EXPORT int NpyIter_ResetToIterIndexRange \
487
+ (NpyIter *, npy_intp, npy_intp, char **);
488
+ NPY_NO_EXPORT int NpyIter_GetNDim \
489
+ (NpyIter *);
490
+ NPY_NO_EXPORT int NpyIter_GetNOp \
491
+ (NpyIter *);
492
+ NPY_NO_EXPORT NpyIter_IterNextFunc * NpyIter_GetIterNext \
493
+ (NpyIter *, char **);
494
+ NPY_NO_EXPORT npy_intp NpyIter_GetIterSize \
495
+ (NpyIter *);
496
+ NPY_NO_EXPORT void NpyIter_GetIterIndexRange \
497
+ (NpyIter *, npy_intp *, npy_intp *);
498
+ NPY_NO_EXPORT npy_intp NpyIter_GetIterIndex \
499
+ (NpyIter *);
500
+ NPY_NO_EXPORT int NpyIter_GotoIterIndex \
501
+ (NpyIter *, npy_intp);
502
+ NPY_NO_EXPORT npy_bool NpyIter_HasMultiIndex \
503
+ (NpyIter *);
504
+ NPY_NO_EXPORT int NpyIter_GetShape \
505
+ (NpyIter *, npy_intp *);
506
+ NPY_NO_EXPORT NpyIter_GetMultiIndexFunc * NpyIter_GetGetMultiIndex \
507
+ (NpyIter *, char **);
508
+ NPY_NO_EXPORT int NpyIter_GotoMultiIndex \
509
+ (NpyIter *, npy_intp const *);
510
+ NPY_NO_EXPORT int NpyIter_RemoveMultiIndex \
511
+ (NpyIter *);
512
+ NPY_NO_EXPORT npy_bool NpyIter_HasIndex \
513
+ (NpyIter *);
514
+ NPY_NO_EXPORT npy_bool NpyIter_IsBuffered \
515
+ (NpyIter *);
516
+ NPY_NO_EXPORT npy_bool NpyIter_IsGrowInner \
517
+ (NpyIter *);
518
+ NPY_NO_EXPORT npy_intp NpyIter_GetBufferSize \
519
+ (NpyIter *);
520
+ NPY_NO_EXPORT npy_intp * NpyIter_GetIndexPtr \
521
+ (NpyIter *);
522
+ NPY_NO_EXPORT int NpyIter_GotoIndex \
523
+ (NpyIter *, npy_intp);
524
+ NPY_NO_EXPORT char ** NpyIter_GetDataPtrArray \
525
+ (NpyIter *);
526
+ NPY_NO_EXPORT PyArray_Descr ** NpyIter_GetDescrArray \
527
+ (NpyIter *);
528
+ NPY_NO_EXPORT PyArrayObject ** NpyIter_GetOperandArray \
529
+ (NpyIter *);
530
+ NPY_NO_EXPORT PyArrayObject * NpyIter_GetIterView \
531
+ (NpyIter *, npy_intp);
532
+ NPY_NO_EXPORT void NpyIter_GetReadFlags \
533
+ (NpyIter *, char *);
534
+ NPY_NO_EXPORT void NpyIter_GetWriteFlags \
535
+ (NpyIter *, char *);
536
+ NPY_NO_EXPORT void NpyIter_DebugPrint \
537
+ (NpyIter *);
538
+ NPY_NO_EXPORT npy_bool NpyIter_IterationNeedsAPI \
539
+ (NpyIter *);
540
+ NPY_NO_EXPORT void NpyIter_GetInnerFixedStrideArray \
541
+ (NpyIter *, npy_intp *);
542
+ NPY_NO_EXPORT int NpyIter_RemoveAxis \
543
+ (NpyIter *, int);
544
+ NPY_NO_EXPORT npy_intp * NpyIter_GetAxisStrideArray \
545
+ (NpyIter *, int);
546
+ NPY_NO_EXPORT npy_bool NpyIter_RequiresBuffering \
547
+ (NpyIter *);
548
+ NPY_NO_EXPORT char ** NpyIter_GetInitialDataPtrArray \
549
+ (NpyIter *);
550
+ NPY_NO_EXPORT int NpyIter_CreateCompatibleStrides \
551
+ (NpyIter *, npy_intp, npy_intp *);
552
+ NPY_NO_EXPORT int PyArray_CastingConverter \
553
+ (PyObject *, NPY_CASTING *);
554
+ NPY_NO_EXPORT npy_intp PyArray_CountNonzero \
555
+ (PyArrayObject *);
556
+ NPY_NO_EXPORT PyArray_Descr * PyArray_PromoteTypes \
557
+ (PyArray_Descr *, PyArray_Descr *);
558
+ NPY_NO_EXPORT PyArray_Descr * PyArray_MinScalarType \
559
+ (PyArrayObject *);
560
+ NPY_NO_EXPORT PyArray_Descr * PyArray_ResultType \
561
+ (npy_intp, PyArrayObject *arrs[], npy_intp, PyArray_Descr *descrs[]);
562
+ NPY_NO_EXPORT npy_bool PyArray_CanCastArrayTo \
563
+ (PyArrayObject *, PyArray_Descr *, NPY_CASTING);
564
+ NPY_NO_EXPORT npy_bool PyArray_CanCastTypeTo \
565
+ (PyArray_Descr *, PyArray_Descr *, NPY_CASTING);
566
+ NPY_NO_EXPORT PyArrayObject * PyArray_EinsteinSum \
567
+ (char *, npy_intp, PyArrayObject **, PyArray_Descr *, NPY_ORDER, NPY_CASTING, PyArrayObject *);
568
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(3) PyObject * PyArray_NewLikeArray \
569
+ (PyArrayObject *, NPY_ORDER, PyArray_Descr *, int);
570
+ NPY_NO_EXPORT int PyArray_GetArrayParamsFromObject \
571
+ (PyObject *NPY_UNUSED(op), PyArray_Descr *NPY_UNUSED(requested_dtype), npy_bool NPY_UNUSED(writeable), PyArray_Descr **NPY_UNUSED(out_dtype), int *NPY_UNUSED(out_ndim), npy_intp *NPY_UNUSED(out_dims), PyArrayObject **NPY_UNUSED(out_arr), PyObject *NPY_UNUSED(context));
572
+ NPY_NO_EXPORT int PyArray_ConvertClipmodeSequence \
573
+ (PyObject *, NPY_CLIPMODE *, int);
574
+ NPY_NO_EXPORT PyObject * PyArray_MatrixProduct2 \
575
+ (PyObject *, PyObject *, PyArrayObject*);
576
+ NPY_NO_EXPORT npy_bool NpyIter_IsFirstVisit \
577
+ (NpyIter *, int);
578
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(2) int PyArray_SetBaseObject \
579
+ (PyArrayObject *, PyObject *);
580
+ NPY_NO_EXPORT void PyArray_CreateSortedStridePerm \
581
+ (int, npy_intp const *, npy_stride_sort_item *);
582
+ NPY_NO_EXPORT void PyArray_RemoveAxesInPlace \
583
+ (PyArrayObject *, const npy_bool *);
584
+ NPY_NO_EXPORT void PyArray_DebugPrint \
585
+ (PyArrayObject *);
586
+ NPY_NO_EXPORT int PyArray_FailUnlessWriteable \
587
+ (PyArrayObject *, const char *);
588
+ NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(2) int PyArray_SetUpdateIfCopyBase \
589
+ (PyArrayObject *, PyArrayObject *);
590
+ NPY_NO_EXPORT void * PyDataMem_NEW \
591
+ (size_t);
592
+ NPY_NO_EXPORT void PyDataMem_FREE \
593
+ (void *);
594
+ NPY_NO_EXPORT void * PyDataMem_RENEW \
595
+ (void *, size_t);
596
+ NPY_NO_EXPORT PyDataMem_EventHookFunc * PyDataMem_SetEventHook \
597
+ (PyDataMem_EventHookFunc *, void *, void **);
598
+ extern NPY_NO_EXPORT NPY_CASTING NPY_DEFAULT_ASSIGN_CASTING;
599
+
600
+ NPY_NO_EXPORT void PyArray_MapIterSwapAxes \
601
+ (PyArrayMapIterObject *, PyArrayObject **, int);
602
+ NPY_NO_EXPORT PyObject * PyArray_MapIterArray \
603
+ (PyArrayObject *, PyObject *);
604
+ NPY_NO_EXPORT void PyArray_MapIterNext \
605
+ (PyArrayMapIterObject *);
606
+ NPY_NO_EXPORT int PyArray_Partition \
607
+ (PyArrayObject *, PyArrayObject *, int, NPY_SELECTKIND);
608
+ NPY_NO_EXPORT PyObject * PyArray_ArgPartition \
609
+ (PyArrayObject *, PyArrayObject *, int, NPY_SELECTKIND);
610
+ NPY_NO_EXPORT int PyArray_SelectkindConverter \
611
+ (PyObject *, NPY_SELECTKIND *);
612
+ NPY_NO_EXPORT void * PyDataMem_NEW_ZEROED \
613
+ (size_t, size_t);
614
+ NPY_NO_EXPORT int PyArray_CheckAnyScalarExact \
615
+ (PyObject *);
616
+ NPY_NO_EXPORT PyObject * PyArray_MapIterArrayCopyIfOverlap \
617
+ (PyArrayObject *, PyObject *, int, PyArrayObject *);
618
+ NPY_NO_EXPORT int PyArray_ResolveWritebackIfCopy \
619
+ (PyArrayObject *);
620
+ NPY_NO_EXPORT int PyArray_SetWritebackIfCopyBase \
621
+ (PyArrayObject *, PyArrayObject *);
622
+ NPY_NO_EXPORT PyObject * PyDataMem_SetHandler \
623
+ (PyObject *);
624
+ NPY_NO_EXPORT PyObject * PyDataMem_GetHandler \
625
+ (void);
626
+ extern NPY_NO_EXPORT PyObject* PyDataMem_DefaultHandler;
627
+
628
+
629
+ #else
630
+
631
+ #if defined(PY_ARRAY_UNIQUE_SYMBOL)
632
+ #define PyArray_API PY_ARRAY_UNIQUE_SYMBOL
633
+ #endif
634
+
635
+ #if defined(NO_IMPORT) || defined(NO_IMPORT_ARRAY)
636
+ extern void **PyArray_API;
637
+ #else
638
+ #if defined(PY_ARRAY_UNIQUE_SYMBOL)
639
+ void **PyArray_API;
640
+ #else
641
+ static void **PyArray_API=NULL;
642
+ #endif
643
+ #endif
644
+
645
+ #define PyArray_GetNDArrayCVersion \
646
+ (*(unsigned int (*)(void)) \
647
+ PyArray_API[0])
648
+ #define PyBigArray_Type (*(PyTypeObject *)PyArray_API[1])
649
+ #define PyArray_Type (*(PyTypeObject *)PyArray_API[2])
650
+ #define PyArrayDescr_Type (*(PyTypeObject *)PyArray_API[3])
651
+ #define PyArrayFlags_Type (*(PyTypeObject *)PyArray_API[4])
652
+ #define PyArrayIter_Type (*(PyTypeObject *)PyArray_API[5])
653
+ #define PyArrayMultiIter_Type (*(PyTypeObject *)PyArray_API[6])
654
+ #define NPY_NUMUSERTYPES (*(int *)PyArray_API[7])
655
+ #define PyBoolArrType_Type (*(PyTypeObject *)PyArray_API[8])
656
+ #define _PyArrayScalar_BoolValues ((PyBoolScalarObject *)PyArray_API[9])
657
+ #define PyGenericArrType_Type (*(PyTypeObject *)PyArray_API[10])
658
+ #define PyNumberArrType_Type (*(PyTypeObject *)PyArray_API[11])
659
+ #define PyIntegerArrType_Type (*(PyTypeObject *)PyArray_API[12])
660
+ #define PySignedIntegerArrType_Type (*(PyTypeObject *)PyArray_API[13])
661
+ #define PyUnsignedIntegerArrType_Type (*(PyTypeObject *)PyArray_API[14])
662
+ #define PyInexactArrType_Type (*(PyTypeObject *)PyArray_API[15])
663
+ #define PyFloatingArrType_Type (*(PyTypeObject *)PyArray_API[16])
664
+ #define PyComplexFloatingArrType_Type (*(PyTypeObject *)PyArray_API[17])
665
+ #define PyFlexibleArrType_Type (*(PyTypeObject *)PyArray_API[18])
666
+ #define PyCharacterArrType_Type (*(PyTypeObject *)PyArray_API[19])
667
+ #define PyByteArrType_Type (*(PyTypeObject *)PyArray_API[20])
668
+ #define PyShortArrType_Type (*(PyTypeObject *)PyArray_API[21])
669
+ #define PyIntArrType_Type (*(PyTypeObject *)PyArray_API[22])
670
+ #define PyLongArrType_Type (*(PyTypeObject *)PyArray_API[23])
671
+ #define PyLongLongArrType_Type (*(PyTypeObject *)PyArray_API[24])
672
+ #define PyUByteArrType_Type (*(PyTypeObject *)PyArray_API[25])
673
+ #define PyUShortArrType_Type (*(PyTypeObject *)PyArray_API[26])
674
+ #define PyUIntArrType_Type (*(PyTypeObject *)PyArray_API[27])
675
+ #define PyULongArrType_Type (*(PyTypeObject *)PyArray_API[28])
676
+ #define PyULongLongArrType_Type (*(PyTypeObject *)PyArray_API[29])
677
+ #define PyFloatArrType_Type (*(PyTypeObject *)PyArray_API[30])
678
+ #define PyDoubleArrType_Type (*(PyTypeObject *)PyArray_API[31])
679
+ #define PyLongDoubleArrType_Type (*(PyTypeObject *)PyArray_API[32])
680
+ #define PyCFloatArrType_Type (*(PyTypeObject *)PyArray_API[33])
681
+ #define PyCDoubleArrType_Type (*(PyTypeObject *)PyArray_API[34])
682
+ #define PyCLongDoubleArrType_Type (*(PyTypeObject *)PyArray_API[35])
683
+ #define PyObjectArrType_Type (*(PyTypeObject *)PyArray_API[36])
684
+ #define PyStringArrType_Type (*(PyTypeObject *)PyArray_API[37])
685
+ #define PyUnicodeArrType_Type (*(PyTypeObject *)PyArray_API[38])
686
+ #define PyVoidArrType_Type (*(PyTypeObject *)PyArray_API[39])
687
+ #define PyArray_SetNumericOps \
688
+ (*(int (*)(PyObject *)) \
689
+ PyArray_API[40])
690
+ #define PyArray_GetNumericOps \
691
+ (*(PyObject * (*)(void)) \
692
+ PyArray_API[41])
693
+ #define PyArray_INCREF \
694
+ (*(int (*)(PyArrayObject *)) \
695
+ PyArray_API[42])
696
+ #define PyArray_XDECREF \
697
+ (*(int (*)(PyArrayObject *)) \
698
+ PyArray_API[43])
699
+ #define PyArray_SetStringFunction \
700
+ (*(void (*)(PyObject *, int)) \
701
+ PyArray_API[44])
702
+ #define PyArray_DescrFromType \
703
+ (*(PyArray_Descr * (*)(int)) \
704
+ PyArray_API[45])
705
+ #define PyArray_TypeObjectFromType \
706
+ (*(PyObject * (*)(int)) \
707
+ PyArray_API[46])
708
+ #define PyArray_Zero \
709
+ (*(char * (*)(PyArrayObject *)) \
710
+ PyArray_API[47])
711
+ #define PyArray_One \
712
+ (*(char * (*)(PyArrayObject *)) \
713
+ PyArray_API[48])
714
+ #define PyArray_CastToType \
715
+ (*(PyObject * (*)(PyArrayObject *, PyArray_Descr *, int)) \
716
+ PyArray_API[49])
717
+ #define PyArray_CastTo \
718
+ (*(int (*)(PyArrayObject *, PyArrayObject *)) \
719
+ PyArray_API[50])
720
+ #define PyArray_CastAnyTo \
721
+ (*(int (*)(PyArrayObject *, PyArrayObject *)) \
722
+ PyArray_API[51])
723
+ #define PyArray_CanCastSafely \
724
+ (*(int (*)(int, int)) \
725
+ PyArray_API[52])
726
+ #define PyArray_CanCastTo \
727
+ (*(npy_bool (*)(PyArray_Descr *, PyArray_Descr *)) \
728
+ PyArray_API[53])
729
+ #define PyArray_ObjectType \
730
+ (*(int (*)(PyObject *, int)) \
731
+ PyArray_API[54])
732
+ #define PyArray_DescrFromObject \
733
+ (*(PyArray_Descr * (*)(PyObject *, PyArray_Descr *)) \
734
+ PyArray_API[55])
735
+ #define PyArray_ConvertToCommonType \
736
+ (*(PyArrayObject ** (*)(PyObject *, int *)) \
737
+ PyArray_API[56])
738
+ #define PyArray_DescrFromScalar \
739
+ (*(PyArray_Descr * (*)(PyObject *)) \
740
+ PyArray_API[57])
741
+ #define PyArray_DescrFromTypeObject \
742
+ (*(PyArray_Descr * (*)(PyObject *)) \
743
+ PyArray_API[58])
744
+ #define PyArray_Size \
745
+ (*(npy_intp (*)(PyObject *)) \
746
+ PyArray_API[59])
747
+ #define PyArray_Scalar \
748
+ (*(PyObject * (*)(void *, PyArray_Descr *, PyObject *)) \
749
+ PyArray_API[60])
750
+ #define PyArray_FromScalar \
751
+ (*(PyObject * (*)(PyObject *, PyArray_Descr *)) \
752
+ PyArray_API[61])
753
+ #define PyArray_ScalarAsCtype \
754
+ (*(void (*)(PyObject *, void *)) \
755
+ PyArray_API[62])
756
+ #define PyArray_CastScalarToCtype \
757
+ (*(int (*)(PyObject *, void *, PyArray_Descr *)) \
758
+ PyArray_API[63])
759
+ #define PyArray_CastScalarDirect \
760
+ (*(int (*)(PyObject *, PyArray_Descr *, void *, int)) \
761
+ PyArray_API[64])
762
+ #define PyArray_ScalarFromObject \
763
+ (*(PyObject * (*)(PyObject *)) \
764
+ PyArray_API[65])
765
+ #define PyArray_GetCastFunc \
766
+ (*(PyArray_VectorUnaryFunc * (*)(PyArray_Descr *, int)) \
767
+ PyArray_API[66])
768
+ #define PyArray_FromDims \
769
+ (*(PyObject * (*)(int NPY_UNUSED(nd), int *NPY_UNUSED(d), int NPY_UNUSED(type))) \
770
+ PyArray_API[67])
771
+ #define PyArray_FromDimsAndDataAndDescr \
772
+ (*(PyObject * (*)(int NPY_UNUSED(nd), int *NPY_UNUSED(d), PyArray_Descr *, char *NPY_UNUSED(data))) \
773
+ PyArray_API[68])
774
+ #define PyArray_FromAny \
775
+ (*(PyObject * (*)(PyObject *, PyArray_Descr *, int, int, int, PyObject *)) \
776
+ PyArray_API[69])
777
+ #define PyArray_EnsureArray \
778
+ (*(PyObject * (*)(PyObject *)) \
779
+ PyArray_API[70])
780
+ #define PyArray_EnsureAnyArray \
781
+ (*(PyObject * (*)(PyObject *)) \
782
+ PyArray_API[71])
783
+ #define PyArray_FromFile \
784
+ (*(PyObject * (*)(FILE *, PyArray_Descr *, npy_intp, char *)) \
785
+ PyArray_API[72])
786
+ #define PyArray_FromString \
787
+ (*(PyObject * (*)(char *, npy_intp, PyArray_Descr *, npy_intp, char *)) \
788
+ PyArray_API[73])
789
+ #define PyArray_FromBuffer \
790
+ (*(PyObject * (*)(PyObject *, PyArray_Descr *, npy_intp, npy_intp)) \
791
+ PyArray_API[74])
792
+ #define PyArray_FromIter \
793
+ (*(PyObject * (*)(PyObject *, PyArray_Descr *, npy_intp)) \
794
+ PyArray_API[75])
795
+ #define PyArray_Return \
796
+ (*(PyObject * (*)(PyArrayObject *)) \
797
+ PyArray_API[76])
798
+ #define PyArray_GetField \
799
+ (*(PyObject * (*)(PyArrayObject *, PyArray_Descr *, int)) \
800
+ PyArray_API[77])
801
+ #define PyArray_SetField \
802
+ (*(int (*)(PyArrayObject *, PyArray_Descr *, int, PyObject *)) \
803
+ PyArray_API[78])
804
+ #define PyArray_Byteswap \
805
+ (*(PyObject * (*)(PyArrayObject *, npy_bool)) \
806
+ PyArray_API[79])
807
+ #define PyArray_Resize \
808
+ (*(PyObject * (*)(PyArrayObject *, PyArray_Dims *, int, NPY_ORDER NPY_UNUSED(order))) \
809
+ PyArray_API[80])
810
+ #define PyArray_MoveInto \
811
+ (*(int (*)(PyArrayObject *, PyArrayObject *)) \
812
+ PyArray_API[81])
813
+ #define PyArray_CopyInto \
814
+ (*(int (*)(PyArrayObject *, PyArrayObject *)) \
815
+ PyArray_API[82])
816
+ #define PyArray_CopyAnyInto \
817
+ (*(int (*)(PyArrayObject *, PyArrayObject *)) \
818
+ PyArray_API[83])
819
+ #define PyArray_CopyObject \
820
+ (*(int (*)(PyArrayObject *, PyObject *)) \
821
+ PyArray_API[84])
822
+ #define PyArray_NewCopy \
823
+ (*(PyObject * (*)(PyArrayObject *, NPY_ORDER)) \
824
+ PyArray_API[85])
825
+ #define PyArray_ToList \
826
+ (*(PyObject * (*)(PyArrayObject *)) \
827
+ PyArray_API[86])
828
+ #define PyArray_ToString \
829
+ (*(PyObject * (*)(PyArrayObject *, NPY_ORDER)) \
830
+ PyArray_API[87])
831
+ #define PyArray_ToFile \
832
+ (*(int (*)(PyArrayObject *, FILE *, char *, char *)) \
833
+ PyArray_API[88])
834
+ #define PyArray_Dump \
835
+ (*(int (*)(PyObject *, PyObject *, int)) \
836
+ PyArray_API[89])
837
+ #define PyArray_Dumps \
838
+ (*(PyObject * (*)(PyObject *, int)) \
839
+ PyArray_API[90])
840
+ #define PyArray_ValidType \
841
+ (*(int (*)(int)) \
842
+ PyArray_API[91])
843
+ #define PyArray_UpdateFlags \
844
+ (*(void (*)(PyArrayObject *, int)) \
845
+ PyArray_API[92])
846
+ #define PyArray_New \
847
+ (*(PyObject * (*)(PyTypeObject *, int, npy_intp const *, int, npy_intp const *, void *, int, int, PyObject *)) \
848
+ PyArray_API[93])
849
+ #define PyArray_NewFromDescr \
850
+ (*(PyObject * (*)(PyTypeObject *, PyArray_Descr *, int, npy_intp const *, npy_intp const *, void *, int, PyObject *)) \
851
+ PyArray_API[94])
852
+ #define PyArray_DescrNew \
853
+ (*(PyArray_Descr * (*)(PyArray_Descr *)) \
854
+ PyArray_API[95])
855
+ #define PyArray_DescrNewFromType \
856
+ (*(PyArray_Descr * (*)(int)) \
857
+ PyArray_API[96])
858
+ #define PyArray_GetPriority \
859
+ (*(double (*)(PyObject *, double)) \
860
+ PyArray_API[97])
861
+ #define PyArray_IterNew \
862
+ (*(PyObject * (*)(PyObject *)) \
863
+ PyArray_API[98])
864
+ #define PyArray_MultiIterNew \
865
+ (*(PyObject* (*)(int, ...)) \
866
+ PyArray_API[99])
867
+ #define PyArray_PyIntAsInt \
868
+ (*(int (*)(PyObject *)) \
869
+ PyArray_API[100])
870
+ #define PyArray_PyIntAsIntp \
871
+ (*(npy_intp (*)(PyObject *)) \
872
+ PyArray_API[101])
873
+ #define PyArray_Broadcast \
874
+ (*(int (*)(PyArrayMultiIterObject *)) \
875
+ PyArray_API[102])
876
+ #define PyArray_FillObjectArray \
877
+ (*(void (*)(PyArrayObject *, PyObject *)) \
878
+ PyArray_API[103])
879
+ #define PyArray_FillWithScalar \
880
+ (*(int (*)(PyArrayObject *, PyObject *)) \
881
+ PyArray_API[104])
882
+ #define PyArray_CheckStrides \
883
+ (*(npy_bool (*)(int, int, npy_intp, npy_intp, npy_intp const *, npy_intp const *)) \
884
+ PyArray_API[105])
885
+ #define PyArray_DescrNewByteorder \
886
+ (*(PyArray_Descr * (*)(PyArray_Descr *, char)) \
887
+ PyArray_API[106])
888
+ #define PyArray_IterAllButAxis \
889
+ (*(PyObject * (*)(PyObject *, int *)) \
890
+ PyArray_API[107])
891
+ #define PyArray_CheckFromAny \
892
+ (*(PyObject * (*)(PyObject *, PyArray_Descr *, int, int, int, PyObject *)) \
893
+ PyArray_API[108])
894
+ #define PyArray_FromArray \
895
+ (*(PyObject * (*)(PyArrayObject *, PyArray_Descr *, int)) \
896
+ PyArray_API[109])
897
+ #define PyArray_FromInterface \
898
+ (*(PyObject * (*)(PyObject *)) \
899
+ PyArray_API[110])
900
+ #define PyArray_FromStructInterface \
901
+ (*(PyObject * (*)(PyObject *)) \
902
+ PyArray_API[111])
903
+ #define PyArray_FromArrayAttr \
904
+ (*(PyObject * (*)(PyObject *, PyArray_Descr *, PyObject *)) \
905
+ PyArray_API[112])
906
+ #define PyArray_ScalarKind \
907
+ (*(NPY_SCALARKIND (*)(int, PyArrayObject **)) \
908
+ PyArray_API[113])
909
+ #define PyArray_CanCoerceScalar \
910
+ (*(int (*)(int, int, NPY_SCALARKIND)) \
911
+ PyArray_API[114])
912
+ #define PyArray_NewFlagsObject \
913
+ (*(PyObject * (*)(PyObject *)) \
914
+ PyArray_API[115])
915
+ #define PyArray_CanCastScalar \
916
+ (*(npy_bool (*)(PyTypeObject *, PyTypeObject *)) \
917
+ PyArray_API[116])
918
+ #define PyArray_CompareUCS4 \
919
+ (*(int (*)(npy_ucs4 const *, npy_ucs4 const *, size_t)) \
920
+ PyArray_API[117])
921
+ #define PyArray_RemoveSmallest \
922
+ (*(int (*)(PyArrayMultiIterObject *)) \
923
+ PyArray_API[118])
924
+ #define PyArray_ElementStrides \
925
+ (*(int (*)(PyObject *)) \
926
+ PyArray_API[119])
927
+ #define PyArray_Item_INCREF \
928
+ (*(void (*)(char *, PyArray_Descr *)) \
929
+ PyArray_API[120])
930
+ #define PyArray_Item_XDECREF \
931
+ (*(void (*)(char *, PyArray_Descr *)) \
932
+ PyArray_API[121])
933
+ #define PyArray_FieldNames \
934
+ (*(PyObject * (*)(PyObject *)) \
935
+ PyArray_API[122])
936
+ #define PyArray_Transpose \
937
+ (*(PyObject * (*)(PyArrayObject *, PyArray_Dims *)) \
938
+ PyArray_API[123])
939
+ #define PyArray_TakeFrom \
940
+ (*(PyObject * (*)(PyArrayObject *, PyObject *, int, PyArrayObject *, NPY_CLIPMODE)) \
941
+ PyArray_API[124])
942
+ #define PyArray_PutTo \
943
+ (*(PyObject * (*)(PyArrayObject *, PyObject*, PyObject *, NPY_CLIPMODE)) \
944
+ PyArray_API[125])
945
+ #define PyArray_PutMask \
946
+ (*(PyObject * (*)(PyArrayObject *, PyObject*, PyObject*)) \
947
+ PyArray_API[126])
948
+ #define PyArray_Repeat \
949
+ (*(PyObject * (*)(PyArrayObject *, PyObject *, int)) \
950
+ PyArray_API[127])
951
+ #define PyArray_Choose \
952
+ (*(PyObject * (*)(PyArrayObject *, PyObject *, PyArrayObject *, NPY_CLIPMODE)) \
953
+ PyArray_API[128])
954
+ #define PyArray_Sort \
955
+ (*(int (*)(PyArrayObject *, int, NPY_SORTKIND)) \
956
+ PyArray_API[129])
957
+ #define PyArray_ArgSort \
958
+ (*(PyObject * (*)(PyArrayObject *, int, NPY_SORTKIND)) \
959
+ PyArray_API[130])
960
+ #define PyArray_SearchSorted \
961
+ (*(PyObject * (*)(PyArrayObject *, PyObject *, NPY_SEARCHSIDE, PyObject *)) \
962
+ PyArray_API[131])
963
+ #define PyArray_ArgMax \
964
+ (*(PyObject * (*)(PyArrayObject *, int, PyArrayObject *)) \
965
+ PyArray_API[132])
966
+ #define PyArray_ArgMin \
967
+ (*(PyObject * (*)(PyArrayObject *, int, PyArrayObject *)) \
968
+ PyArray_API[133])
969
+ #define PyArray_Reshape \
970
+ (*(PyObject * (*)(PyArrayObject *, PyObject *)) \
971
+ PyArray_API[134])
972
+ #define PyArray_Newshape \
973
+ (*(PyObject * (*)(PyArrayObject *, PyArray_Dims *, NPY_ORDER)) \
974
+ PyArray_API[135])
975
+ #define PyArray_Squeeze \
976
+ (*(PyObject * (*)(PyArrayObject *)) \
977
+ PyArray_API[136])
978
+ #define PyArray_View \
979
+ (*(PyObject * (*)(PyArrayObject *, PyArray_Descr *, PyTypeObject *)) \
980
+ PyArray_API[137])
981
+ #define PyArray_SwapAxes \
982
+ (*(PyObject * (*)(PyArrayObject *, int, int)) \
983
+ PyArray_API[138])
984
+ #define PyArray_Max \
985
+ (*(PyObject * (*)(PyArrayObject *, int, PyArrayObject *)) \
986
+ PyArray_API[139])
987
+ #define PyArray_Min \
988
+ (*(PyObject * (*)(PyArrayObject *, int, PyArrayObject *)) \
989
+ PyArray_API[140])
990
+ #define PyArray_Ptp \
991
+ (*(PyObject * (*)(PyArrayObject *, int, PyArrayObject *)) \
992
+ PyArray_API[141])
993
+ #define PyArray_Mean \
994
+ (*(PyObject * (*)(PyArrayObject *, int, int, PyArrayObject *)) \
995
+ PyArray_API[142])
996
+ #define PyArray_Trace \
997
+ (*(PyObject * (*)(PyArrayObject *, int, int, int, int, PyArrayObject *)) \
998
+ PyArray_API[143])
999
+ #define PyArray_Diagonal \
1000
+ (*(PyObject * (*)(PyArrayObject *, int, int, int)) \
1001
+ PyArray_API[144])
1002
+ #define PyArray_Clip \
1003
+ (*(PyObject * (*)(PyArrayObject *, PyObject *, PyObject *, PyArrayObject *)) \
1004
+ PyArray_API[145])
1005
+ #define PyArray_Conjugate \
1006
+ (*(PyObject * (*)(PyArrayObject *, PyArrayObject *)) \
1007
+ PyArray_API[146])
1008
+ #define PyArray_Nonzero \
1009
+ (*(PyObject * (*)(PyArrayObject *)) \
1010
+ PyArray_API[147])
1011
+ #define PyArray_Std \
1012
+ (*(PyObject * (*)(PyArrayObject *, int, int, PyArrayObject *, int)) \
1013
+ PyArray_API[148])
1014
+ #define PyArray_Sum \
1015
+ (*(PyObject * (*)(PyArrayObject *, int, int, PyArrayObject *)) \
1016
+ PyArray_API[149])
1017
+ #define PyArray_CumSum \
1018
+ (*(PyObject * (*)(PyArrayObject *, int, int, PyArrayObject *)) \
1019
+ PyArray_API[150])
1020
+ #define PyArray_Prod \
1021
+ (*(PyObject * (*)(PyArrayObject *, int, int, PyArrayObject *)) \
1022
+ PyArray_API[151])
1023
+ #define PyArray_CumProd \
1024
+ (*(PyObject * (*)(PyArrayObject *, int, int, PyArrayObject *)) \
1025
+ PyArray_API[152])
1026
+ #define PyArray_All \
1027
+ (*(PyObject * (*)(PyArrayObject *, int, PyArrayObject *)) \
1028
+ PyArray_API[153])
1029
+ #define PyArray_Any \
1030
+ (*(PyObject * (*)(PyArrayObject *, int, PyArrayObject *)) \
1031
+ PyArray_API[154])
1032
+ #define PyArray_Compress \
1033
+ (*(PyObject * (*)(PyArrayObject *, PyObject *, int, PyArrayObject *)) \
1034
+ PyArray_API[155])
1035
+ #define PyArray_Flatten \
1036
+ (*(PyObject * (*)(PyArrayObject *, NPY_ORDER)) \
1037
+ PyArray_API[156])
1038
+ #define PyArray_Ravel \
1039
+ (*(PyObject * (*)(PyArrayObject *, NPY_ORDER)) \
1040
+ PyArray_API[157])
1041
+ #define PyArray_MultiplyList \
1042
+ (*(npy_intp (*)(npy_intp const *, int)) \
1043
+ PyArray_API[158])
1044
+ #define PyArray_MultiplyIntList \
1045
+ (*(int (*)(int const *, int)) \
1046
+ PyArray_API[159])
1047
+ #define PyArray_GetPtr \
1048
+ (*(void * (*)(PyArrayObject *, npy_intp const*)) \
1049
+ PyArray_API[160])
1050
+ #define PyArray_CompareLists \
1051
+ (*(int (*)(npy_intp const *, npy_intp const *, int)) \
1052
+ PyArray_API[161])
1053
+ #define PyArray_AsCArray \
1054
+ (*(int (*)(PyObject **, void *, npy_intp *, int, PyArray_Descr*)) \
1055
+ PyArray_API[162])
1056
+ #define PyArray_As1D \
1057
+ (*(int (*)(PyObject **NPY_UNUSED(op), char **NPY_UNUSED(ptr), int *NPY_UNUSED(d1), int NPY_UNUSED(typecode))) \
1058
+ PyArray_API[163])
1059
+ #define PyArray_As2D \
1060
+ (*(int (*)(PyObject **NPY_UNUSED(op), char ***NPY_UNUSED(ptr), int *NPY_UNUSED(d1), int *NPY_UNUSED(d2), int NPY_UNUSED(typecode))) \
1061
+ PyArray_API[164])
1062
+ #define PyArray_Free \
1063
+ (*(int (*)(PyObject *, void *)) \
1064
+ PyArray_API[165])
1065
+ #define PyArray_Converter \
1066
+ (*(int (*)(PyObject *, PyObject **)) \
1067
+ PyArray_API[166])
1068
+ #define PyArray_IntpFromSequence \
1069
+ (*(int (*)(PyObject *, npy_intp *, int)) \
1070
+ PyArray_API[167])
1071
+ #define PyArray_Concatenate \
1072
+ (*(PyObject * (*)(PyObject *, int)) \
1073
+ PyArray_API[168])
1074
+ #define PyArray_InnerProduct \
1075
+ (*(PyObject * (*)(PyObject *, PyObject *)) \
1076
+ PyArray_API[169])
1077
+ #define PyArray_MatrixProduct \
1078
+ (*(PyObject * (*)(PyObject *, PyObject *)) \
1079
+ PyArray_API[170])
1080
+ #define PyArray_CopyAndTranspose \
1081
+ (*(PyObject * (*)(PyObject *)) \
1082
+ PyArray_API[171])
1083
+ #define PyArray_Correlate \
1084
+ (*(PyObject * (*)(PyObject *, PyObject *, int)) \
1085
+ PyArray_API[172])
1086
+ #define PyArray_TypestrConvert \
1087
+ (*(int (*)(int, int)) \
1088
+ PyArray_API[173])
1089
+ #define PyArray_DescrConverter \
1090
+ (*(int (*)(PyObject *, PyArray_Descr **)) \
1091
+ PyArray_API[174])
1092
+ #define PyArray_DescrConverter2 \
1093
+ (*(int (*)(PyObject *, PyArray_Descr **)) \
1094
+ PyArray_API[175])
1095
+ #define PyArray_IntpConverter \
1096
+ (*(int (*)(PyObject *, PyArray_Dims *)) \
1097
+ PyArray_API[176])
1098
+ #define PyArray_BufferConverter \
1099
+ (*(int (*)(PyObject *, PyArray_Chunk *)) \
1100
+ PyArray_API[177])
1101
+ #define PyArray_AxisConverter \
1102
+ (*(int (*)(PyObject *, int *)) \
1103
+ PyArray_API[178])
1104
+ #define PyArray_BoolConverter \
1105
+ (*(int (*)(PyObject *, npy_bool *)) \
1106
+ PyArray_API[179])
1107
+ #define PyArray_ByteorderConverter \
1108
+ (*(int (*)(PyObject *, char *)) \
1109
+ PyArray_API[180])
1110
+ #define PyArray_OrderConverter \
1111
+ (*(int (*)(PyObject *, NPY_ORDER *)) \
1112
+ PyArray_API[181])
1113
+ #define PyArray_EquivTypes \
1114
+ (*(unsigned char (*)(PyArray_Descr *, PyArray_Descr *)) \
1115
+ PyArray_API[182])
1116
+ #define PyArray_Zeros \
1117
+ (*(PyObject * (*)(int, npy_intp const *, PyArray_Descr *, int)) \
1118
+ PyArray_API[183])
1119
+ #define PyArray_Empty \
1120
+ (*(PyObject * (*)(int, npy_intp const *, PyArray_Descr *, int)) \
1121
+ PyArray_API[184])
1122
+ #define PyArray_Where \
1123
+ (*(PyObject * (*)(PyObject *, PyObject *, PyObject *)) \
1124
+ PyArray_API[185])
1125
+ #define PyArray_Arange \
1126
+ (*(PyObject * (*)(double, double, double, int)) \
1127
+ PyArray_API[186])
1128
+ #define PyArray_ArangeObj \
1129
+ (*(PyObject * (*)(PyObject *, PyObject *, PyObject *, PyArray_Descr *)) \
1130
+ PyArray_API[187])
1131
+ #define PyArray_SortkindConverter \
1132
+ (*(int (*)(PyObject *, NPY_SORTKIND *)) \
1133
+ PyArray_API[188])
1134
+ #define PyArray_LexSort \
1135
+ (*(PyObject * (*)(PyObject *, int)) \
1136
+ PyArray_API[189])
1137
+ #define PyArray_Round \
1138
+ (*(PyObject * (*)(PyArrayObject *, int, PyArrayObject *)) \
1139
+ PyArray_API[190])
1140
+ #define PyArray_EquivTypenums \
1141
+ (*(unsigned char (*)(int, int)) \
1142
+ PyArray_API[191])
1143
+ #define PyArray_RegisterDataType \
1144
+ (*(int (*)(PyArray_Descr *)) \
1145
+ PyArray_API[192])
1146
+ #define PyArray_RegisterCastFunc \
1147
+ (*(int (*)(PyArray_Descr *, int, PyArray_VectorUnaryFunc *)) \
1148
+ PyArray_API[193])
1149
+ #define PyArray_RegisterCanCast \
1150
+ (*(int (*)(PyArray_Descr *, int, NPY_SCALARKIND)) \
1151
+ PyArray_API[194])
1152
+ #define PyArray_InitArrFuncs \
1153
+ (*(void (*)(PyArray_ArrFuncs *)) \
1154
+ PyArray_API[195])
1155
+ #define PyArray_IntTupleFromIntp \
1156
+ (*(PyObject * (*)(int, npy_intp const *)) \
1157
+ PyArray_API[196])
1158
+ #define PyArray_TypeNumFromName \
1159
+ (*(int (*)(char const *)) \
1160
+ PyArray_API[197])
1161
+ #define PyArray_ClipmodeConverter \
1162
+ (*(int (*)(PyObject *, NPY_CLIPMODE *)) \
1163
+ PyArray_API[198])
1164
+ #define PyArray_OutputConverter \
1165
+ (*(int (*)(PyObject *, PyArrayObject **)) \
1166
+ PyArray_API[199])
1167
+ #define PyArray_BroadcastToShape \
1168
+ (*(PyObject * (*)(PyObject *, npy_intp *, int)) \
1169
+ PyArray_API[200])
1170
+ #define _PyArray_SigintHandler \
1171
+ (*(void (*)(int)) \
1172
+ PyArray_API[201])
1173
+ #define _PyArray_GetSigintBuf \
1174
+ (*(void* (*)(void)) \
1175
+ PyArray_API[202])
1176
+ #define PyArray_DescrAlignConverter \
1177
+ (*(int (*)(PyObject *, PyArray_Descr **)) \
1178
+ PyArray_API[203])
1179
+ #define PyArray_DescrAlignConverter2 \
1180
+ (*(int (*)(PyObject *, PyArray_Descr **)) \
1181
+ PyArray_API[204])
1182
+ #define PyArray_SearchsideConverter \
1183
+ (*(int (*)(PyObject *, void *)) \
1184
+ PyArray_API[205])
1185
+ #define PyArray_CheckAxis \
1186
+ (*(PyObject * (*)(PyArrayObject *, int *, int)) \
1187
+ PyArray_API[206])
1188
+ #define PyArray_OverflowMultiplyList \
1189
+ (*(npy_intp (*)(npy_intp const *, int)) \
1190
+ PyArray_API[207])
1191
+ #define PyArray_CompareString \
1192
+ (*(int (*)(const char *, const char *, size_t)) \
1193
+ PyArray_API[208])
1194
+ #define PyArray_MultiIterFromObjects \
1195
+ (*(PyObject* (*)(PyObject **, int, int, ...)) \
1196
+ PyArray_API[209])
1197
+ #define PyArray_GetEndianness \
1198
+ (*(int (*)(void)) \
1199
+ PyArray_API[210])
1200
+ #define PyArray_GetNDArrayCFeatureVersion \
1201
+ (*(unsigned int (*)(void)) \
1202
+ PyArray_API[211])
1203
+ #define PyArray_Correlate2 \
1204
+ (*(PyObject * (*)(PyObject *, PyObject *, int)) \
1205
+ PyArray_API[212])
1206
+ #define PyArray_NeighborhoodIterNew \
1207
+ (*(PyObject* (*)(PyArrayIterObject *, const npy_intp *, int, PyArrayObject*)) \
1208
+ PyArray_API[213])
1209
+ #define PyTimeIntegerArrType_Type (*(PyTypeObject *)PyArray_API[214])
1210
+ #define PyDatetimeArrType_Type (*(PyTypeObject *)PyArray_API[215])
1211
+ #define PyTimedeltaArrType_Type (*(PyTypeObject *)PyArray_API[216])
1212
+ #define PyHalfArrType_Type (*(PyTypeObject *)PyArray_API[217])
1213
+ #define NpyIter_Type (*(PyTypeObject *)PyArray_API[218])
1214
+ #define PyArray_SetDatetimeParseFunction \
1215
+ (*(void (*)(PyObject *NPY_UNUSED(op))) \
1216
+ PyArray_API[219])
1217
+ #define PyArray_DatetimeToDatetimeStruct \
1218
+ (*(void (*)(npy_datetime NPY_UNUSED(val), NPY_DATETIMEUNIT NPY_UNUSED(fr), npy_datetimestruct *)) \
1219
+ PyArray_API[220])
1220
+ #define PyArray_TimedeltaToTimedeltaStruct \
1221
+ (*(void (*)(npy_timedelta NPY_UNUSED(val), NPY_DATETIMEUNIT NPY_UNUSED(fr), npy_timedeltastruct *)) \
1222
+ PyArray_API[221])
1223
+ #define PyArray_DatetimeStructToDatetime \
1224
+ (*(npy_datetime (*)(NPY_DATETIMEUNIT NPY_UNUSED(fr), npy_datetimestruct *NPY_UNUSED(d))) \
1225
+ PyArray_API[222])
1226
+ #define PyArray_TimedeltaStructToTimedelta \
1227
+ (*(npy_datetime (*)(NPY_DATETIMEUNIT NPY_UNUSED(fr), npy_timedeltastruct *NPY_UNUSED(d))) \
1228
+ PyArray_API[223])
1229
+ #define NpyIter_New \
1230
+ (*(NpyIter * (*)(PyArrayObject *, npy_uint32, NPY_ORDER, NPY_CASTING, PyArray_Descr*)) \
1231
+ PyArray_API[224])
1232
+ #define NpyIter_MultiNew \
1233
+ (*(NpyIter * (*)(int, PyArrayObject **, npy_uint32, NPY_ORDER, NPY_CASTING, npy_uint32 *, PyArray_Descr **)) \
1234
+ PyArray_API[225])
1235
+ #define NpyIter_AdvancedNew \
1236
+ (*(NpyIter * (*)(int, PyArrayObject **, npy_uint32, NPY_ORDER, NPY_CASTING, npy_uint32 *, PyArray_Descr **, int, int **, npy_intp *, npy_intp)) \
1237
+ PyArray_API[226])
1238
+ #define NpyIter_Copy \
1239
+ (*(NpyIter * (*)(NpyIter *)) \
1240
+ PyArray_API[227])
1241
+ #define NpyIter_Deallocate \
1242
+ (*(int (*)(NpyIter *)) \
1243
+ PyArray_API[228])
1244
+ #define NpyIter_HasDelayedBufAlloc \
1245
+ (*(npy_bool (*)(NpyIter *)) \
1246
+ PyArray_API[229])
1247
+ #define NpyIter_HasExternalLoop \
1248
+ (*(npy_bool (*)(NpyIter *)) \
1249
+ PyArray_API[230])
1250
+ #define NpyIter_EnableExternalLoop \
1251
+ (*(int (*)(NpyIter *)) \
1252
+ PyArray_API[231])
1253
+ #define NpyIter_GetInnerStrideArray \
1254
+ (*(npy_intp * (*)(NpyIter *)) \
1255
+ PyArray_API[232])
1256
+ #define NpyIter_GetInnerLoopSizePtr \
1257
+ (*(npy_intp * (*)(NpyIter *)) \
1258
+ PyArray_API[233])
1259
+ #define NpyIter_Reset \
1260
+ (*(int (*)(NpyIter *, char **)) \
1261
+ PyArray_API[234])
1262
+ #define NpyIter_ResetBasePointers \
1263
+ (*(int (*)(NpyIter *, char **, char **)) \
1264
+ PyArray_API[235])
1265
+ #define NpyIter_ResetToIterIndexRange \
1266
+ (*(int (*)(NpyIter *, npy_intp, npy_intp, char **)) \
1267
+ PyArray_API[236])
1268
+ #define NpyIter_GetNDim \
1269
+ (*(int (*)(NpyIter *)) \
1270
+ PyArray_API[237])
1271
+ #define NpyIter_GetNOp \
1272
+ (*(int (*)(NpyIter *)) \
1273
+ PyArray_API[238])
1274
+ #define NpyIter_GetIterNext \
1275
+ (*(NpyIter_IterNextFunc * (*)(NpyIter *, char **)) \
1276
+ PyArray_API[239])
1277
+ #define NpyIter_GetIterSize \
1278
+ (*(npy_intp (*)(NpyIter *)) \
1279
+ PyArray_API[240])
1280
+ #define NpyIter_GetIterIndexRange \
1281
+ (*(void (*)(NpyIter *, npy_intp *, npy_intp *)) \
1282
+ PyArray_API[241])
1283
+ #define NpyIter_GetIterIndex \
1284
+ (*(npy_intp (*)(NpyIter *)) \
1285
+ PyArray_API[242])
1286
+ #define NpyIter_GotoIterIndex \
1287
+ (*(int (*)(NpyIter *, npy_intp)) \
1288
+ PyArray_API[243])
1289
+ #define NpyIter_HasMultiIndex \
1290
+ (*(npy_bool (*)(NpyIter *)) \
1291
+ PyArray_API[244])
1292
+ #define NpyIter_GetShape \
1293
+ (*(int (*)(NpyIter *, npy_intp *)) \
1294
+ PyArray_API[245])
1295
+ #define NpyIter_GetGetMultiIndex \
1296
+ (*(NpyIter_GetMultiIndexFunc * (*)(NpyIter *, char **)) \
1297
+ PyArray_API[246])
1298
+ #define NpyIter_GotoMultiIndex \
1299
+ (*(int (*)(NpyIter *, npy_intp const *)) \
1300
+ PyArray_API[247])
1301
+ #define NpyIter_RemoveMultiIndex \
1302
+ (*(int (*)(NpyIter *)) \
1303
+ PyArray_API[248])
1304
+ #define NpyIter_HasIndex \
1305
+ (*(npy_bool (*)(NpyIter *)) \
1306
+ PyArray_API[249])
1307
+ #define NpyIter_IsBuffered \
1308
+ (*(npy_bool (*)(NpyIter *)) \
1309
+ PyArray_API[250])
1310
+ #define NpyIter_IsGrowInner \
1311
+ (*(npy_bool (*)(NpyIter *)) \
1312
+ PyArray_API[251])
1313
+ #define NpyIter_GetBufferSize \
1314
+ (*(npy_intp (*)(NpyIter *)) \
1315
+ PyArray_API[252])
1316
+ #define NpyIter_GetIndexPtr \
1317
+ (*(npy_intp * (*)(NpyIter *)) \
1318
+ PyArray_API[253])
1319
+ #define NpyIter_GotoIndex \
1320
+ (*(int (*)(NpyIter *, npy_intp)) \
1321
+ PyArray_API[254])
1322
+ #define NpyIter_GetDataPtrArray \
1323
+ (*(char ** (*)(NpyIter *)) \
1324
+ PyArray_API[255])
1325
+ #define NpyIter_GetDescrArray \
1326
+ (*(PyArray_Descr ** (*)(NpyIter *)) \
1327
+ PyArray_API[256])
1328
+ #define NpyIter_GetOperandArray \
1329
+ (*(PyArrayObject ** (*)(NpyIter *)) \
1330
+ PyArray_API[257])
1331
+ #define NpyIter_GetIterView \
1332
+ (*(PyArrayObject * (*)(NpyIter *, npy_intp)) \
1333
+ PyArray_API[258])
1334
+ #define NpyIter_GetReadFlags \
1335
+ (*(void (*)(NpyIter *, char *)) \
1336
+ PyArray_API[259])
1337
+ #define NpyIter_GetWriteFlags \
1338
+ (*(void (*)(NpyIter *, char *)) \
1339
+ PyArray_API[260])
1340
+ #define NpyIter_DebugPrint \
1341
+ (*(void (*)(NpyIter *)) \
1342
+ PyArray_API[261])
1343
+ #define NpyIter_IterationNeedsAPI \
1344
+ (*(npy_bool (*)(NpyIter *)) \
1345
+ PyArray_API[262])
1346
+ #define NpyIter_GetInnerFixedStrideArray \
1347
+ (*(void (*)(NpyIter *, npy_intp *)) \
1348
+ PyArray_API[263])
1349
+ #define NpyIter_RemoveAxis \
1350
+ (*(int (*)(NpyIter *, int)) \
1351
+ PyArray_API[264])
1352
+ #define NpyIter_GetAxisStrideArray \
1353
+ (*(npy_intp * (*)(NpyIter *, int)) \
1354
+ PyArray_API[265])
1355
+ #define NpyIter_RequiresBuffering \
1356
+ (*(npy_bool (*)(NpyIter *)) \
1357
+ PyArray_API[266])
1358
+ #define NpyIter_GetInitialDataPtrArray \
1359
+ (*(char ** (*)(NpyIter *)) \
1360
+ PyArray_API[267])
1361
+ #define NpyIter_CreateCompatibleStrides \
1362
+ (*(int (*)(NpyIter *, npy_intp, npy_intp *)) \
1363
+ PyArray_API[268])
1364
+ #define PyArray_CastingConverter \
1365
+ (*(int (*)(PyObject *, NPY_CASTING *)) \
1366
+ PyArray_API[269])
1367
+ #define PyArray_CountNonzero \
1368
+ (*(npy_intp (*)(PyArrayObject *)) \
1369
+ PyArray_API[270])
1370
+ #define PyArray_PromoteTypes \
1371
+ (*(PyArray_Descr * (*)(PyArray_Descr *, PyArray_Descr *)) \
1372
+ PyArray_API[271])
1373
+ #define PyArray_MinScalarType \
1374
+ (*(PyArray_Descr * (*)(PyArrayObject *)) \
1375
+ PyArray_API[272])
1376
+ #define PyArray_ResultType \
1377
+ (*(PyArray_Descr * (*)(npy_intp, PyArrayObject *arrs[], npy_intp, PyArray_Descr *descrs[])) \
1378
+ PyArray_API[273])
1379
+ #define PyArray_CanCastArrayTo \
1380
+ (*(npy_bool (*)(PyArrayObject *, PyArray_Descr *, NPY_CASTING)) \
1381
+ PyArray_API[274])
1382
+ #define PyArray_CanCastTypeTo \
1383
+ (*(npy_bool (*)(PyArray_Descr *, PyArray_Descr *, NPY_CASTING)) \
1384
+ PyArray_API[275])
1385
+ #define PyArray_EinsteinSum \
1386
+ (*(PyArrayObject * (*)(char *, npy_intp, PyArrayObject **, PyArray_Descr *, NPY_ORDER, NPY_CASTING, PyArrayObject *)) \
1387
+ PyArray_API[276])
1388
+ #define PyArray_NewLikeArray \
1389
+ (*(PyObject * (*)(PyArrayObject *, NPY_ORDER, PyArray_Descr *, int)) \
1390
+ PyArray_API[277])
1391
+ #define PyArray_GetArrayParamsFromObject \
1392
+ (*(int (*)(PyObject *NPY_UNUSED(op), PyArray_Descr *NPY_UNUSED(requested_dtype), npy_bool NPY_UNUSED(writeable), PyArray_Descr **NPY_UNUSED(out_dtype), int *NPY_UNUSED(out_ndim), npy_intp *NPY_UNUSED(out_dims), PyArrayObject **NPY_UNUSED(out_arr), PyObject *NPY_UNUSED(context))) \
1393
+ PyArray_API[278])
1394
+ #define PyArray_ConvertClipmodeSequence \
1395
+ (*(int (*)(PyObject *, NPY_CLIPMODE *, int)) \
1396
+ PyArray_API[279])
1397
+ #define PyArray_MatrixProduct2 \
1398
+ (*(PyObject * (*)(PyObject *, PyObject *, PyArrayObject*)) \
1399
+ PyArray_API[280])
1400
+ #define NpyIter_IsFirstVisit \
1401
+ (*(npy_bool (*)(NpyIter *, int)) \
1402
+ PyArray_API[281])
1403
+ #define PyArray_SetBaseObject \
1404
+ (*(int (*)(PyArrayObject *, PyObject *)) \
1405
+ PyArray_API[282])
1406
+ #define PyArray_CreateSortedStridePerm \
1407
+ (*(void (*)(int, npy_intp const *, npy_stride_sort_item *)) \
1408
+ PyArray_API[283])
1409
+ #define PyArray_RemoveAxesInPlace \
1410
+ (*(void (*)(PyArrayObject *, const npy_bool *)) \
1411
+ PyArray_API[284])
1412
+ #define PyArray_DebugPrint \
1413
+ (*(void (*)(PyArrayObject *)) \
1414
+ PyArray_API[285])
1415
+ #define PyArray_FailUnlessWriteable \
1416
+ (*(int (*)(PyArrayObject *, const char *)) \
1417
+ PyArray_API[286])
1418
+ #define PyArray_SetUpdateIfCopyBase \
1419
+ (*(int (*)(PyArrayObject *, PyArrayObject *)) \
1420
+ PyArray_API[287])
1421
+ #define PyDataMem_NEW \
1422
+ (*(void * (*)(size_t)) \
1423
+ PyArray_API[288])
1424
+ #define PyDataMem_FREE \
1425
+ (*(void (*)(void *)) \
1426
+ PyArray_API[289])
1427
+ #define PyDataMem_RENEW \
1428
+ (*(void * (*)(void *, size_t)) \
1429
+ PyArray_API[290])
1430
+ #define PyDataMem_SetEventHook \
1431
+ (*(PyDataMem_EventHookFunc * (*)(PyDataMem_EventHookFunc *, void *, void **)) \
1432
+ PyArray_API[291])
1433
+ #define NPY_DEFAULT_ASSIGN_CASTING (*(NPY_CASTING *)PyArray_API[292])
1434
+ #define PyArray_MapIterSwapAxes \
1435
+ (*(void (*)(PyArrayMapIterObject *, PyArrayObject **, int)) \
1436
+ PyArray_API[293])
1437
+ #define PyArray_MapIterArray \
1438
+ (*(PyObject * (*)(PyArrayObject *, PyObject *)) \
1439
+ PyArray_API[294])
1440
+ #define PyArray_MapIterNext \
1441
+ (*(void (*)(PyArrayMapIterObject *)) \
1442
+ PyArray_API[295])
1443
+ #define PyArray_Partition \
1444
+ (*(int (*)(PyArrayObject *, PyArrayObject *, int, NPY_SELECTKIND)) \
1445
+ PyArray_API[296])
1446
+ #define PyArray_ArgPartition \
1447
+ (*(PyObject * (*)(PyArrayObject *, PyArrayObject *, int, NPY_SELECTKIND)) \
1448
+ PyArray_API[297])
1449
+ #define PyArray_SelectkindConverter \
1450
+ (*(int (*)(PyObject *, NPY_SELECTKIND *)) \
1451
+ PyArray_API[298])
1452
+ #define PyDataMem_NEW_ZEROED \
1453
+ (*(void * (*)(size_t, size_t)) \
1454
+ PyArray_API[299])
1455
+ #define PyArray_CheckAnyScalarExact \
1456
+ (*(int (*)(PyObject *)) \
1457
+ PyArray_API[300])
1458
+ #define PyArray_MapIterArrayCopyIfOverlap \
1459
+ (*(PyObject * (*)(PyArrayObject *, PyObject *, int, PyArrayObject *)) \
1460
+ PyArray_API[301])
1461
+ #define PyArray_ResolveWritebackIfCopy \
1462
+ (*(int (*)(PyArrayObject *)) \
1463
+ PyArray_API[302])
1464
+ #define PyArray_SetWritebackIfCopyBase \
1465
+ (*(int (*)(PyArrayObject *, PyArrayObject *)) \
1466
+ PyArray_API[303])
1467
+
1468
+ #if NPY_FEATURE_VERSION >= NPY_1_22_API_VERSION
1469
+ #define PyDataMem_SetHandler \
1470
+ (*(PyObject * (*)(PyObject *)) \
1471
+ PyArray_API[304])
1472
+ #endif
1473
+
1474
+ #if NPY_FEATURE_VERSION >= NPY_1_22_API_VERSION
1475
+ #define PyDataMem_GetHandler \
1476
+ (*(PyObject * (*)(void)) \
1477
+ PyArray_API[305])
1478
+ #endif
1479
+ #define PyDataMem_DefaultHandler (*(PyObject* *)PyArray_API[306])
1480
+
1481
+ #if !defined(NO_IMPORT_ARRAY) && !defined(NO_IMPORT)
1482
+ static int
1483
+ _import_array(void)
1484
+ {
1485
+ int st;
1486
+ PyObject *numpy = PyImport_ImportModule("numpy.core._multiarray_umath");
1487
+ PyObject *c_api = NULL;
1488
+
1489
+ if (numpy == NULL) {
1490
+ return -1;
1491
+ }
1492
+ c_api = PyObject_GetAttrString(numpy, "_ARRAY_API");
1493
+ Py_DECREF(numpy);
1494
+ if (c_api == NULL) {
1495
+ return -1;
1496
+ }
1497
+
1498
+ if (!PyCapsule_CheckExact(c_api)) {
1499
+ PyErr_SetString(PyExc_RuntimeError, "_ARRAY_API is not PyCapsule object");
1500
+ Py_DECREF(c_api);
1501
+ return -1;
1502
+ }
1503
+ PyArray_API = (void **)PyCapsule_GetPointer(c_api, NULL);
1504
+ Py_DECREF(c_api);
1505
+ if (PyArray_API == NULL) {
1506
+ PyErr_SetString(PyExc_RuntimeError, "_ARRAY_API is NULL pointer");
1507
+ return -1;
1508
+ }
1509
+
1510
+ /* Perform runtime check of C API version */
1511
+ if (NPY_VERSION != PyArray_GetNDArrayCVersion()) {
1512
+ PyErr_Format(PyExc_RuntimeError, "module compiled against "\
1513
+ "ABI version 0x%x but this version of numpy is 0x%x", \
1514
+ (int) NPY_VERSION, (int) PyArray_GetNDArrayCVersion());
1515
+ return -1;
1516
+ }
1517
+ if (NPY_FEATURE_VERSION > PyArray_GetNDArrayCFeatureVersion()) {
1518
+ PyErr_Format(PyExc_RuntimeError, "module compiled against "\
1519
+ "API version 0x%x but this version of numpy is 0x%x . "\
1520
+ "Check the section C-API incompatibility at the "\
1521
+ "Troubleshooting ImportError section at "\
1522
+ "https://numpy.org/devdocs/user/troubleshooting-importerror.html"\
1523
+ "#c-api-incompatibility "\
1524
+ "for indications on how to solve this problem .", \
1525
+ (int) NPY_FEATURE_VERSION, (int) PyArray_GetNDArrayCFeatureVersion());
1526
+ return -1;
1527
+ }
1528
+
1529
+ /*
1530
+ * Perform runtime check of endianness and check it matches the one set by
1531
+ * the headers (npy_endian.h) as a safeguard
1532
+ */
1533
+ st = PyArray_GetEndianness();
1534
+ if (st == NPY_CPU_UNKNOWN_ENDIAN) {
1535
+ PyErr_SetString(PyExc_RuntimeError,
1536
+ "FATAL: module compiled as unknown endian");
1537
+ return -1;
1538
+ }
1539
+ #if NPY_BYTE_ORDER == NPY_BIG_ENDIAN
1540
+ if (st != NPY_CPU_BIG) {
1541
+ PyErr_SetString(PyExc_RuntimeError,
1542
+ "FATAL: module compiled as big endian, but "
1543
+ "detected different endianness at runtime");
1544
+ return -1;
1545
+ }
1546
+ #elif NPY_BYTE_ORDER == NPY_LITTLE_ENDIAN
1547
+ if (st != NPY_CPU_LITTLE) {
1548
+ PyErr_SetString(PyExc_RuntimeError,
1549
+ "FATAL: module compiled as little endian, but "
1550
+ "detected different endianness at runtime");
1551
+ return -1;
1552
+ }
1553
+ #endif
1554
+
1555
+ return 0;
1556
+ }
1557
+
1558
+ #define import_array() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NULL; } }
1559
+
1560
+ #define import_array1(ret) {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return ret; } }
1561
+
1562
+ #define import_array2(msg, ret) {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, msg); return ret; } }
1563
+
1564
+ #endif
1565
+
1566
+ #endif
venv/lib/python3.10/site-packages/numpy/core/include/numpy/__ufunc_api.c ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /* These pointers will be stored in the C-object for use in other
3
+ extension modules
4
+ */
5
+
6
+ void *PyUFunc_API[] = {
7
+ (void *) &PyUFunc_Type,
8
+ (void *) PyUFunc_FromFuncAndData,
9
+ (void *) PyUFunc_RegisterLoopForType,
10
+ (void *) PyUFunc_GenericFunction,
11
+ (void *) PyUFunc_f_f_As_d_d,
12
+ (void *) PyUFunc_d_d,
13
+ (void *) PyUFunc_f_f,
14
+ (void *) PyUFunc_g_g,
15
+ (void *) PyUFunc_F_F_As_D_D,
16
+ (void *) PyUFunc_F_F,
17
+ (void *) PyUFunc_D_D,
18
+ (void *) PyUFunc_G_G,
19
+ (void *) PyUFunc_O_O,
20
+ (void *) PyUFunc_ff_f_As_dd_d,
21
+ (void *) PyUFunc_ff_f,
22
+ (void *) PyUFunc_dd_d,
23
+ (void *) PyUFunc_gg_g,
24
+ (void *) PyUFunc_FF_F_As_DD_D,
25
+ (void *) PyUFunc_DD_D,
26
+ (void *) PyUFunc_FF_F,
27
+ (void *) PyUFunc_GG_G,
28
+ (void *) PyUFunc_OO_O,
29
+ (void *) PyUFunc_O_O_method,
30
+ (void *) PyUFunc_OO_O_method,
31
+ (void *) PyUFunc_On_Om,
32
+ (void *) PyUFunc_GetPyValues,
33
+ (void *) PyUFunc_checkfperr,
34
+ (void *) PyUFunc_clearfperr,
35
+ (void *) PyUFunc_getfperr,
36
+ (void *) PyUFunc_handlefperr,
37
+ (void *) PyUFunc_ReplaceLoopBySignature,
38
+ (void *) PyUFunc_FromFuncAndDataAndSignature,
39
+ (void *) PyUFunc_SetUsesArraysAsData,
40
+ (void *) PyUFunc_e_e,
41
+ (void *) PyUFunc_e_e_As_f_f,
42
+ (void *) PyUFunc_e_e_As_d_d,
43
+ (void *) PyUFunc_ee_e,
44
+ (void *) PyUFunc_ee_e_As_ff_f,
45
+ (void *) PyUFunc_ee_e_As_dd_d,
46
+ (void *) PyUFunc_DefaultTypeResolver,
47
+ (void *) PyUFunc_ValidateCasting,
48
+ (void *) PyUFunc_RegisterLoopForDescr,
49
+ (void *) PyUFunc_FromFuncAndDataAndSignatureAndIdentity
50
+ };
venv/lib/python3.10/site-packages/numpy/core/include/numpy/__ufunc_api.h ADDED
@@ -0,0 +1,314 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ #ifdef _UMATHMODULE
3
+
4
+ extern NPY_NO_EXPORT PyTypeObject PyUFunc_Type;
5
+
6
+ extern NPY_NO_EXPORT PyTypeObject PyUFunc_Type;
7
+
8
+ NPY_NO_EXPORT PyObject * PyUFunc_FromFuncAndData \
9
+ (PyUFuncGenericFunction *, void **, char *, int, int, int, int, const char *, const char *, int);
10
+ NPY_NO_EXPORT int PyUFunc_RegisterLoopForType \
11
+ (PyUFuncObject *, int, PyUFuncGenericFunction, const int *, void *);
12
+ NPY_NO_EXPORT int PyUFunc_GenericFunction \
13
+ (PyUFuncObject *NPY_UNUSED(ufunc), PyObject *NPY_UNUSED(args), PyObject *NPY_UNUSED(kwds), PyArrayObject **NPY_UNUSED(op));
14
+ NPY_NO_EXPORT void PyUFunc_f_f_As_d_d \
15
+ (char **, npy_intp const *, npy_intp const *, void *);
16
+ NPY_NO_EXPORT void PyUFunc_d_d \
17
+ (char **, npy_intp const *, npy_intp const *, void *);
18
+ NPY_NO_EXPORT void PyUFunc_f_f \
19
+ (char **, npy_intp const *, npy_intp const *, void *);
20
+ NPY_NO_EXPORT void PyUFunc_g_g \
21
+ (char **, npy_intp const *, npy_intp const *, void *);
22
+ NPY_NO_EXPORT void PyUFunc_F_F_As_D_D \
23
+ (char **, npy_intp const *, npy_intp const *, void *);
24
+ NPY_NO_EXPORT void PyUFunc_F_F \
25
+ (char **, npy_intp const *, npy_intp const *, void *);
26
+ NPY_NO_EXPORT void PyUFunc_D_D \
27
+ (char **, npy_intp const *, npy_intp const *, void *);
28
+ NPY_NO_EXPORT void PyUFunc_G_G \
29
+ (char **, npy_intp const *, npy_intp const *, void *);
30
+ NPY_NO_EXPORT void PyUFunc_O_O \
31
+ (char **, npy_intp const *, npy_intp const *, void *);
32
+ NPY_NO_EXPORT void PyUFunc_ff_f_As_dd_d \
33
+ (char **, npy_intp const *, npy_intp const *, void *);
34
+ NPY_NO_EXPORT void PyUFunc_ff_f \
35
+ (char **, npy_intp const *, npy_intp const *, void *);
36
+ NPY_NO_EXPORT void PyUFunc_dd_d \
37
+ (char **, npy_intp const *, npy_intp const *, void *);
38
+ NPY_NO_EXPORT void PyUFunc_gg_g \
39
+ (char **, npy_intp const *, npy_intp const *, void *);
40
+ NPY_NO_EXPORT void PyUFunc_FF_F_As_DD_D \
41
+ (char **, npy_intp const *, npy_intp const *, void *);
42
+ NPY_NO_EXPORT void PyUFunc_DD_D \
43
+ (char **, npy_intp const *, npy_intp const *, void *);
44
+ NPY_NO_EXPORT void PyUFunc_FF_F \
45
+ (char **, npy_intp const *, npy_intp const *, void *);
46
+ NPY_NO_EXPORT void PyUFunc_GG_G \
47
+ (char **, npy_intp const *, npy_intp const *, void *);
48
+ NPY_NO_EXPORT void PyUFunc_OO_O \
49
+ (char **, npy_intp const *, npy_intp const *, void *);
50
+ NPY_NO_EXPORT void PyUFunc_O_O_method \
51
+ (char **, npy_intp const *, npy_intp const *, void *);
52
+ NPY_NO_EXPORT void PyUFunc_OO_O_method \
53
+ (char **, npy_intp const *, npy_intp const *, void *);
54
+ NPY_NO_EXPORT void PyUFunc_On_Om \
55
+ (char **, npy_intp const *, npy_intp const *, void *);
56
+ NPY_NO_EXPORT int PyUFunc_GetPyValues \
57
+ (char *, int *, int *, PyObject **);
58
+ NPY_NO_EXPORT int PyUFunc_checkfperr \
59
+ (int, PyObject *, int *);
60
+ NPY_NO_EXPORT void PyUFunc_clearfperr \
61
+ (void);
62
+ NPY_NO_EXPORT int PyUFunc_getfperr \
63
+ (void);
64
+ NPY_NO_EXPORT int PyUFunc_handlefperr \
65
+ (int, PyObject *, int, int *);
66
+ NPY_NO_EXPORT int PyUFunc_ReplaceLoopBySignature \
67
+ (PyUFuncObject *, PyUFuncGenericFunction, const int *, PyUFuncGenericFunction *);
68
+ NPY_NO_EXPORT PyObject * PyUFunc_FromFuncAndDataAndSignature \
69
+ (PyUFuncGenericFunction *, void **, char *, int, int, int, int, const char *, const char *, int, const char *);
70
+ NPY_NO_EXPORT int PyUFunc_SetUsesArraysAsData \
71
+ (void **NPY_UNUSED(data), size_t NPY_UNUSED(i));
72
+ NPY_NO_EXPORT void PyUFunc_e_e \
73
+ (char **, npy_intp const *, npy_intp const *, void *);
74
+ NPY_NO_EXPORT void PyUFunc_e_e_As_f_f \
75
+ (char **, npy_intp const *, npy_intp const *, void *);
76
+ NPY_NO_EXPORT void PyUFunc_e_e_As_d_d \
77
+ (char **, npy_intp const *, npy_intp const *, void *);
78
+ NPY_NO_EXPORT void PyUFunc_ee_e \
79
+ (char **, npy_intp const *, npy_intp const *, void *);
80
+ NPY_NO_EXPORT void PyUFunc_ee_e_As_ff_f \
81
+ (char **, npy_intp const *, npy_intp const *, void *);
82
+ NPY_NO_EXPORT void PyUFunc_ee_e_As_dd_d \
83
+ (char **, npy_intp const *, npy_intp const *, void *);
84
+ NPY_NO_EXPORT int PyUFunc_DefaultTypeResolver \
85
+ (PyUFuncObject *, NPY_CASTING, PyArrayObject **, PyObject *, PyArray_Descr **);
86
+ NPY_NO_EXPORT int PyUFunc_ValidateCasting \
87
+ (PyUFuncObject *, NPY_CASTING, PyArrayObject **, PyArray_Descr **);
88
+ NPY_NO_EXPORT int PyUFunc_RegisterLoopForDescr \
89
+ (PyUFuncObject *, PyArray_Descr *, PyUFuncGenericFunction, PyArray_Descr **, void *);
90
+ NPY_NO_EXPORT PyObject * PyUFunc_FromFuncAndDataAndSignatureAndIdentity \
91
+ (PyUFuncGenericFunction *, void **, char *, int, int, int, int, const char *, const char *, const int, const char *, PyObject *);
92
+
93
+ #else
94
+
95
+ #if defined(PY_UFUNC_UNIQUE_SYMBOL)
96
+ #define PyUFunc_API PY_UFUNC_UNIQUE_SYMBOL
97
+ #endif
98
+
99
+ #if defined(NO_IMPORT) || defined(NO_IMPORT_UFUNC)
100
+ extern void **PyUFunc_API;
101
+ #else
102
+ #if defined(PY_UFUNC_UNIQUE_SYMBOL)
103
+ void **PyUFunc_API;
104
+ #else
105
+ static void **PyUFunc_API=NULL;
106
+ #endif
107
+ #endif
108
+
109
+ #define PyUFunc_Type (*(PyTypeObject *)PyUFunc_API[0])
110
+ #define PyUFunc_FromFuncAndData \
111
+ (*(PyObject * (*)(PyUFuncGenericFunction *, void **, char *, int, int, int, int, const char *, const char *, int)) \
112
+ PyUFunc_API[1])
113
+ #define PyUFunc_RegisterLoopForType \
114
+ (*(int (*)(PyUFuncObject *, int, PyUFuncGenericFunction, const int *, void *)) \
115
+ PyUFunc_API[2])
116
+ #define PyUFunc_GenericFunction \
117
+ (*(int (*)(PyUFuncObject *NPY_UNUSED(ufunc), PyObject *NPY_UNUSED(args), PyObject *NPY_UNUSED(kwds), PyArrayObject **NPY_UNUSED(op))) \
118
+ PyUFunc_API[3])
119
+ #define PyUFunc_f_f_As_d_d \
120
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
121
+ PyUFunc_API[4])
122
+ #define PyUFunc_d_d \
123
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
124
+ PyUFunc_API[5])
125
+ #define PyUFunc_f_f \
126
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
127
+ PyUFunc_API[6])
128
+ #define PyUFunc_g_g \
129
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
130
+ PyUFunc_API[7])
131
+ #define PyUFunc_F_F_As_D_D \
132
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
133
+ PyUFunc_API[8])
134
+ #define PyUFunc_F_F \
135
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
136
+ PyUFunc_API[9])
137
+ #define PyUFunc_D_D \
138
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
139
+ PyUFunc_API[10])
140
+ #define PyUFunc_G_G \
141
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
142
+ PyUFunc_API[11])
143
+ #define PyUFunc_O_O \
144
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
145
+ PyUFunc_API[12])
146
+ #define PyUFunc_ff_f_As_dd_d \
147
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
148
+ PyUFunc_API[13])
149
+ #define PyUFunc_ff_f \
150
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
151
+ PyUFunc_API[14])
152
+ #define PyUFunc_dd_d \
153
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
154
+ PyUFunc_API[15])
155
+ #define PyUFunc_gg_g \
156
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
157
+ PyUFunc_API[16])
158
+ #define PyUFunc_FF_F_As_DD_D \
159
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
160
+ PyUFunc_API[17])
161
+ #define PyUFunc_DD_D \
162
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
163
+ PyUFunc_API[18])
164
+ #define PyUFunc_FF_F \
165
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
166
+ PyUFunc_API[19])
167
+ #define PyUFunc_GG_G \
168
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
169
+ PyUFunc_API[20])
170
+ #define PyUFunc_OO_O \
171
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
172
+ PyUFunc_API[21])
173
+ #define PyUFunc_O_O_method \
174
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
175
+ PyUFunc_API[22])
176
+ #define PyUFunc_OO_O_method \
177
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
178
+ PyUFunc_API[23])
179
+ #define PyUFunc_On_Om \
180
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
181
+ PyUFunc_API[24])
182
+ #define PyUFunc_GetPyValues \
183
+ (*(int (*)(char *, int *, int *, PyObject **)) \
184
+ PyUFunc_API[25])
185
+ #define PyUFunc_checkfperr \
186
+ (*(int (*)(int, PyObject *, int *)) \
187
+ PyUFunc_API[26])
188
+ #define PyUFunc_clearfperr \
189
+ (*(void (*)(void)) \
190
+ PyUFunc_API[27])
191
+ #define PyUFunc_getfperr \
192
+ (*(int (*)(void)) \
193
+ PyUFunc_API[28])
194
+ #define PyUFunc_handlefperr \
195
+ (*(int (*)(int, PyObject *, int, int *)) \
196
+ PyUFunc_API[29])
197
+ #define PyUFunc_ReplaceLoopBySignature \
198
+ (*(int (*)(PyUFuncObject *, PyUFuncGenericFunction, const int *, PyUFuncGenericFunction *)) \
199
+ PyUFunc_API[30])
200
+ #define PyUFunc_FromFuncAndDataAndSignature \
201
+ (*(PyObject * (*)(PyUFuncGenericFunction *, void **, char *, int, int, int, int, const char *, const char *, int, const char *)) \
202
+ PyUFunc_API[31])
203
+ #define PyUFunc_SetUsesArraysAsData \
204
+ (*(int (*)(void **NPY_UNUSED(data), size_t NPY_UNUSED(i))) \
205
+ PyUFunc_API[32])
206
+ #define PyUFunc_e_e \
207
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
208
+ PyUFunc_API[33])
209
+ #define PyUFunc_e_e_As_f_f \
210
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
211
+ PyUFunc_API[34])
212
+ #define PyUFunc_e_e_As_d_d \
213
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
214
+ PyUFunc_API[35])
215
+ #define PyUFunc_ee_e \
216
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
217
+ PyUFunc_API[36])
218
+ #define PyUFunc_ee_e_As_ff_f \
219
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
220
+ PyUFunc_API[37])
221
+ #define PyUFunc_ee_e_As_dd_d \
222
+ (*(void (*)(char **, npy_intp const *, npy_intp const *, void *)) \
223
+ PyUFunc_API[38])
224
+ #define PyUFunc_DefaultTypeResolver \
225
+ (*(int (*)(PyUFuncObject *, NPY_CASTING, PyArrayObject **, PyObject *, PyArray_Descr **)) \
226
+ PyUFunc_API[39])
227
+ #define PyUFunc_ValidateCasting \
228
+ (*(int (*)(PyUFuncObject *, NPY_CASTING, PyArrayObject **, PyArray_Descr **)) \
229
+ PyUFunc_API[40])
230
+ #define PyUFunc_RegisterLoopForDescr \
231
+ (*(int (*)(PyUFuncObject *, PyArray_Descr *, PyUFuncGenericFunction, PyArray_Descr **, void *)) \
232
+ PyUFunc_API[41])
233
+
234
+ #if NPY_FEATURE_VERSION >= NPY_1_16_API_VERSION
235
+ #define PyUFunc_FromFuncAndDataAndSignatureAndIdentity \
236
+ (*(PyObject * (*)(PyUFuncGenericFunction *, void **, char *, int, int, int, int, const char *, const char *, const int, const char *, PyObject *)) \
237
+ PyUFunc_API[42])
238
+ #endif
239
+
240
+ static inline int
241
+ _import_umath(void)
242
+ {
243
+ PyObject *numpy = PyImport_ImportModule("numpy.core._multiarray_umath");
244
+ PyObject *c_api = NULL;
245
+
246
+ if (numpy == NULL) {
247
+ PyErr_SetString(PyExc_ImportError,
248
+ "numpy.core._multiarray_umath failed to import");
249
+ return -1;
250
+ }
251
+ c_api = PyObject_GetAttrString(numpy, "_UFUNC_API");
252
+ Py_DECREF(numpy);
253
+ if (c_api == NULL) {
254
+ PyErr_SetString(PyExc_AttributeError, "_UFUNC_API not found");
255
+ return -1;
256
+ }
257
+
258
+ if (!PyCapsule_CheckExact(c_api)) {
259
+ PyErr_SetString(PyExc_RuntimeError, "_UFUNC_API is not PyCapsule object");
260
+ Py_DECREF(c_api);
261
+ return -1;
262
+ }
263
+ PyUFunc_API = (void **)PyCapsule_GetPointer(c_api, NULL);
264
+ Py_DECREF(c_api);
265
+ if (PyUFunc_API == NULL) {
266
+ PyErr_SetString(PyExc_RuntimeError, "_UFUNC_API is NULL pointer");
267
+ return -1;
268
+ }
269
+ return 0;
270
+ }
271
+
272
+ #define import_umath() \
273
+ do {\
274
+ UFUNC_NOFPE\
275
+ if (_import_umath() < 0) {\
276
+ PyErr_Print();\
277
+ PyErr_SetString(PyExc_ImportError,\
278
+ "numpy.core.umath failed to import");\
279
+ return NULL;\
280
+ }\
281
+ } while(0)
282
+
283
+ #define import_umath1(ret) \
284
+ do {\
285
+ UFUNC_NOFPE\
286
+ if (_import_umath() < 0) {\
287
+ PyErr_Print();\
288
+ PyErr_SetString(PyExc_ImportError,\
289
+ "numpy.core.umath failed to import");\
290
+ return ret;\
291
+ }\
292
+ } while(0)
293
+
294
+ #define import_umath2(ret, msg) \
295
+ do {\
296
+ UFUNC_NOFPE\
297
+ if (_import_umath() < 0) {\
298
+ PyErr_Print();\
299
+ PyErr_SetString(PyExc_ImportError, msg);\
300
+ return ret;\
301
+ }\
302
+ } while(0)
303
+
304
+ #define import_ufunc() \
305
+ do {\
306
+ UFUNC_NOFPE\
307
+ if (_import_umath() < 0) {\
308
+ PyErr_Print();\
309
+ PyErr_SetString(PyExc_ImportError,\
310
+ "numpy.core.umath failed to import");\
311
+ }\
312
+ } while(0)
313
+
314
+ #endif
venv/lib/python3.10/site-packages/numpy/core/include/numpy/_dtype_api.h ADDED
@@ -0,0 +1,408 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * DType related API shared by the (experimental) public API And internal API.
3
+ */
4
+
5
+ #ifndef NUMPY_CORE_INCLUDE_NUMPY___DTYPE_API_H_
6
+ #define NUMPY_CORE_INCLUDE_NUMPY___DTYPE_API_H_
7
+
8
+ #define __EXPERIMENTAL_DTYPE_API_VERSION 11
9
+
10
+ struct PyArrayMethodObject_tag;
11
+
12
+ /*
13
+ * Largely opaque struct for DType classes (i.e. metaclass instances).
14
+ * The internal definition is currently in `ndarraytypes.h` (export is a bit
15
+ * more complex because `PyArray_Descr` is a DTypeMeta internally but not
16
+ * externally).
17
+ */
18
+ #if !(defined(NPY_INTERNAL_BUILD) && NPY_INTERNAL_BUILD)
19
+
20
+ typedef struct PyArray_DTypeMeta_tag {
21
+ PyHeapTypeObject super;
22
+
23
+ /*
24
+ * Most DTypes will have a singleton default instance, for the
25
+ * parametric legacy DTypes (bytes, string, void, datetime) this
26
+ * may be a pointer to the *prototype* instance?
27
+ */
28
+ PyArray_Descr *singleton;
29
+ /* Copy of the legacy DTypes type number, usually invalid. */
30
+ int type_num;
31
+
32
+ /* The type object of the scalar instances (may be NULL?) */
33
+ PyTypeObject *scalar_type;
34
+ /*
35
+ * DType flags to signal legacy, parametric, or
36
+ * abstract. But plenty of space for additional information/flags.
37
+ */
38
+ npy_uint64 flags;
39
+
40
+ /*
41
+ * Use indirection in order to allow a fixed size for this struct.
42
+ * A stable ABI size makes creating a static DType less painful
43
+ * while also ensuring flexibility for all opaque API (with one
44
+ * indirection due the pointer lookup).
45
+ */
46
+ void *dt_slots;
47
+ /* Allow growing (at the moment also beyond this) */
48
+ void *reserved[3];
49
+ } PyArray_DTypeMeta;
50
+
51
+ #endif /* not internal build */
52
+
53
+ /*
54
+ * ******************************************************
55
+ * ArrayMethod API (Casting and UFuncs)
56
+ * ******************************************************
57
+ */
58
+ /*
59
+ * NOTE: Expected changes:
60
+ * * probably split runtime and general flags into two
61
+ * * should possibly not use an enum for typedef for more stable ABI?
62
+ */
63
+ typedef enum {
64
+ /* Flag for whether the GIL is required */
65
+ NPY_METH_REQUIRES_PYAPI = 1 << 0,
66
+ /*
67
+ * Some functions cannot set floating point error flags, this flag
68
+ * gives us the option (not requirement) to skip floating point error
69
+ * setup/check. No function should set error flags and ignore them
70
+ * since it would interfere with chaining operations (e.g. casting).
71
+ */
72
+ NPY_METH_NO_FLOATINGPOINT_ERRORS = 1 << 1,
73
+ /* Whether the method supports unaligned access (not runtime) */
74
+ NPY_METH_SUPPORTS_UNALIGNED = 1 << 2,
75
+ /*
76
+ * Used for reductions to allow reordering the operation. At this point
77
+ * assume that if set, it also applies to normal operations though!
78
+ */
79
+ NPY_METH_IS_REORDERABLE = 1 << 3,
80
+ /*
81
+ * Private flag for now for *logic* functions. The logical functions
82
+ * `logical_or` and `logical_and` can always cast the inputs to booleans
83
+ * "safely" (because that is how the cast to bool is defined).
84
+ * @seberg: I am not sure this is the best way to handle this, so its
85
+ * private for now (also it is very limited anyway).
86
+ * There is one "exception". NA aware dtypes cannot cast to bool
87
+ * (hopefully), so the `??->?` loop should error even with this flag.
88
+ * But a second NA fallback loop will be necessary.
89
+ */
90
+ _NPY_METH_FORCE_CAST_INPUTS = 1 << 17,
91
+
92
+ /* All flags which can change at runtime */
93
+ NPY_METH_RUNTIME_FLAGS = (
94
+ NPY_METH_REQUIRES_PYAPI |
95
+ NPY_METH_NO_FLOATINGPOINT_ERRORS),
96
+ } NPY_ARRAYMETHOD_FLAGS;
97
+
98
+
99
+ typedef struct PyArrayMethod_Context_tag {
100
+ /* The caller, which is typically the original ufunc. May be NULL */
101
+ PyObject *caller;
102
+ /* The method "self". Publically currentl an opaque object. */
103
+ struct PyArrayMethodObject_tag *method;
104
+
105
+ /* Operand descriptors, filled in by resolve_descriptors */
106
+ PyArray_Descr **descriptors;
107
+ /* Structure may grow (this is harmless for DType authors) */
108
+ } PyArrayMethod_Context;
109
+
110
+
111
+ /*
112
+ * The main object for creating a new ArrayMethod. We use the typical `slots`
113
+ * mechanism used by the Python limited API (see below for the slot defs).
114
+ */
115
+ typedef struct {
116
+ const char *name;
117
+ int nin, nout;
118
+ NPY_CASTING casting;
119
+ NPY_ARRAYMETHOD_FLAGS flags;
120
+ PyArray_DTypeMeta **dtypes;
121
+ PyType_Slot *slots;
122
+ } PyArrayMethod_Spec;
123
+
124
+
125
+ /*
126
+ * ArrayMethod slots
127
+ * -----------------
128
+ *
129
+ * SLOTS IDs For the ArrayMethod creation, once fully public, IDs are fixed
130
+ * but can be deprecated and arbitrarily extended.
131
+ */
132
+ #define NPY_METH_resolve_descriptors 1
133
+ /* We may want to adapt the `get_loop` signature a bit: */
134
+ #define _NPY_METH_get_loop 2
135
+ #define NPY_METH_get_reduction_initial 3
136
+ /* specific loops for constructions/default get_loop: */
137
+ #define NPY_METH_strided_loop 4
138
+ #define NPY_METH_contiguous_loop 5
139
+ #define NPY_METH_unaligned_strided_loop 6
140
+ #define NPY_METH_unaligned_contiguous_loop 7
141
+ #define NPY_METH_contiguous_indexed_loop 8
142
+
143
+ /*
144
+ * The resolve descriptors function, must be able to handle NULL values for
145
+ * all output (but not input) `given_descrs` and fill `loop_descrs`.
146
+ * Return -1 on error or 0 if the operation is not possible without an error
147
+ * set. (This may still be in flux.)
148
+ * Otherwise must return the "casting safety", for normal functions, this is
149
+ * almost always "safe" (or even "equivalent"?).
150
+ *
151
+ * `resolve_descriptors` is optional if all output DTypes are non-parametric.
152
+ */
153
+ typedef NPY_CASTING (resolve_descriptors_function)(
154
+ /* "method" is currently opaque (necessary e.g. to wrap Python) */
155
+ struct PyArrayMethodObject_tag *method,
156
+ /* DTypes the method was created for */
157
+ PyArray_DTypeMeta **dtypes,
158
+ /* Input descriptors (instances). Outputs may be NULL. */
159
+ PyArray_Descr **given_descrs,
160
+ /* Exact loop descriptors to use, must not hold references on error */
161
+ PyArray_Descr **loop_descrs,
162
+ npy_intp *view_offset);
163
+
164
+
165
+ typedef int (PyArrayMethod_StridedLoop)(PyArrayMethod_Context *context,
166
+ char *const *data, const npy_intp *dimensions, const npy_intp *strides,
167
+ NpyAuxData *transferdata);
168
+
169
+
170
+ typedef int (get_loop_function)(
171
+ PyArrayMethod_Context *context,
172
+ int aligned, int move_references,
173
+ const npy_intp *strides,
174
+ PyArrayMethod_StridedLoop **out_loop,
175
+ NpyAuxData **out_transferdata,
176
+ NPY_ARRAYMETHOD_FLAGS *flags);
177
+
178
+ /**
179
+ * Query an ArrayMethod for the initial value for use in reduction.
180
+ *
181
+ * @param context The arraymethod context, mainly to access the descriptors.
182
+ * @param reduction_is_empty Whether the reduction is empty. When it is, the
183
+ * value returned may differ. In this case it is a "default" value that
184
+ * may differ from the "identity" value normally used. For example:
185
+ * - `0.0` is the default for `sum([])`. But `-0.0` is the correct
186
+ * identity otherwise as it preserves the sign for `sum([-0.0])`.
187
+ * - We use no identity for object, but return the default of `0` and `1`
188
+ * for the empty `sum([], dtype=object)` and `prod([], dtype=object)`.
189
+ * This allows `np.sum(np.array(["a", "b"], dtype=object))` to work.
190
+ * - `-inf` or `INT_MIN` for `max` is an identity, but at least `INT_MIN`
191
+ * not a good *default* when there are no items.
192
+ * @param initial Pointer to initial data to be filled (if possible)
193
+ *
194
+ * @returns -1, 0, or 1 indicating error, no initial value, and initial being
195
+ * successfully filled. Errors must not be given where 0 is correct, NumPy
196
+ * may call this even when not strictly necessary.
197
+ */
198
+ typedef int (get_reduction_initial_function)(
199
+ PyArrayMethod_Context *context, npy_bool reduction_is_empty,
200
+ char *initial);
201
+
202
+ /*
203
+ * The following functions are only used by the wrapping array method defined
204
+ * in umath/wrapping_array_method.c
205
+ */
206
+
207
+ /*
208
+ * The function to convert the given descriptors (passed in to
209
+ * `resolve_descriptors`) and translates them for the wrapped loop.
210
+ * The new descriptors MUST be viewable with the old ones, `NULL` must be
211
+ * supported (for outputs) and should normally be forwarded.
212
+ *
213
+ * The function must clean up on error.
214
+ *
215
+ * NOTE: We currently assume that this translation gives "viewable" results.
216
+ * I.e. there is no additional casting related to the wrapping process.
217
+ * In principle that could be supported, but not sure it is useful.
218
+ * This currently also means that e.g. alignment must apply identically
219
+ * to the new dtypes.
220
+ *
221
+ * TODO: Due to the fact that `resolve_descriptors` is also used for `can_cast`
222
+ * there is no way to "pass out" the result of this function. This means
223
+ * it will be called twice for every ufunc call.
224
+ * (I am considering including `auxdata` as an "optional" parameter to
225
+ * `resolve_descriptors`, so that it can be filled there if not NULL.)
226
+ */
227
+ typedef int translate_given_descrs_func(int nin, int nout,
228
+ PyArray_DTypeMeta *wrapped_dtypes[],
229
+ PyArray_Descr *given_descrs[], PyArray_Descr *new_descrs[]);
230
+
231
+ /**
232
+ * The function to convert the actual loop descriptors (as returned by the
233
+ * original `resolve_descriptors` function) to the ones the output array
234
+ * should use.
235
+ * This function must return "viewable" types, it must not mutate them in any
236
+ * form that would break the inner-loop logic. Does not need to support NULL.
237
+ *
238
+ * The function must clean up on error.
239
+ *
240
+ * @param nargs Number of arguments
241
+ * @param new_dtypes The DTypes of the output (usually probably not needed)
242
+ * @param given_descrs Original given_descrs to the resolver, necessary to
243
+ * fetch any information related to the new dtypes from the original.
244
+ * @param original_descrs The `loop_descrs` returned by the wrapped loop.
245
+ * @param loop_descrs The output descriptors, compatible to `original_descrs`.
246
+ *
247
+ * @returns 0 on success, -1 on failure.
248
+ */
249
+ typedef int translate_loop_descrs_func(int nin, int nout,
250
+ PyArray_DTypeMeta *new_dtypes[], PyArray_Descr *given_descrs[],
251
+ PyArray_Descr *original_descrs[], PyArray_Descr *loop_descrs[]);
252
+
253
+
254
+ /*
255
+ * A traverse loop working on a single array. This is similar to the general
256
+ * strided-loop function. This is designed for loops that need to visit every
257
+ * element of a single array.
258
+ *
259
+ * Currently this is used for array clearing, via the NPY_DT_get_clear_loop
260
+ * API hook, and zero-filling, via the NPY_DT_get_fill_zero_loop API hook.
261
+ * These are most useful for handling arrays storing embedded references to
262
+ * python objects or heap-allocated data.
263
+ *
264
+ * The `void *traverse_context` is passed in because we may need to pass in
265
+ * Intepreter state or similar in the future, but we don't want to pass in
266
+ * a full context (with pointers to dtypes, method, caller which all make
267
+ * no sense for a traverse function).
268
+ *
269
+ * We assume for now that this context can be just passed through in the
270
+ * the future (for structured dtypes).
271
+ *
272
+ */
273
+ typedef int (traverse_loop_function)(
274
+ void *traverse_context, PyArray_Descr *descr, char *data,
275
+ npy_intp size, npy_intp stride, NpyAuxData *auxdata);
276
+
277
+
278
+ /*
279
+ * Simplified get_loop function specific to dtype traversal
280
+ *
281
+ * It should set the flags needed for the traversal loop and set out_loop to the
282
+ * loop function, which must be a valid traverse_loop_function
283
+ * pointer. Currently this is used for zero-filling and clearing arrays storing
284
+ * embedded references.
285
+ *
286
+ */
287
+ typedef int (get_traverse_loop_function)(
288
+ void *traverse_context, PyArray_Descr *descr,
289
+ int aligned, npy_intp fixed_stride,
290
+ traverse_loop_function **out_loop, NpyAuxData **out_auxdata,
291
+ NPY_ARRAYMETHOD_FLAGS *flags);
292
+
293
+
294
+ /*
295
+ * ****************************
296
+ * DTYPE API
297
+ * ****************************
298
+ */
299
+
300
+ #define NPY_DT_ABSTRACT 1 << 1
301
+ #define NPY_DT_PARAMETRIC 1 << 2
302
+ #define NPY_DT_NUMERIC 1 << 3
303
+
304
+ /*
305
+ * These correspond to slots in the NPY_DType_Slots struct and must
306
+ * be in the same order as the members of that struct. If new slots
307
+ * get added or old slots get removed NPY_NUM_DTYPE_SLOTS must also
308
+ * be updated
309
+ */
310
+
311
+ #define NPY_DT_discover_descr_from_pyobject 1
312
+ // this slot is considered private because its API hasn't beed decided
313
+ #define _NPY_DT_is_known_scalar_type 2
314
+ #define NPY_DT_default_descr 3
315
+ #define NPY_DT_common_dtype 4
316
+ #define NPY_DT_common_instance 5
317
+ #define NPY_DT_ensure_canonical 6
318
+ #define NPY_DT_setitem 7
319
+ #define NPY_DT_getitem 8
320
+ #define NPY_DT_get_clear_loop 9
321
+ #define NPY_DT_get_fill_zero_loop 10
322
+
323
+ // These PyArray_ArrFunc slots will be deprecated and replaced eventually
324
+ // getitem and setitem can be defined as a performance optimization;
325
+ // by default the user dtypes call `legacy_getitem_using_DType` and
326
+ // `legacy_setitem_using_DType`, respectively. This functionality is
327
+ // only supported for basic NumPy DTypes.
328
+
329
+
330
+ // used to separate dtype slots from arrfuncs slots
331
+ // intended only for internal use but defined here for clarity
332
+ #define _NPY_DT_ARRFUNCS_OFFSET (1 << 10)
333
+
334
+ // Cast is disabled
335
+ // #define NPY_DT_PyArray_ArrFuncs_cast 0 + _NPY_DT_ARRFUNCS_OFFSET
336
+
337
+ #define NPY_DT_PyArray_ArrFuncs_getitem 1 + _NPY_DT_ARRFUNCS_OFFSET
338
+ #define NPY_DT_PyArray_ArrFuncs_setitem 2 + _NPY_DT_ARRFUNCS_OFFSET
339
+
340
+ #define NPY_DT_PyArray_ArrFuncs_copyswapn 3 + _NPY_DT_ARRFUNCS_OFFSET
341
+ #define NPY_DT_PyArray_ArrFuncs_copyswap 4 + _NPY_DT_ARRFUNCS_OFFSET
342
+ #define NPY_DT_PyArray_ArrFuncs_compare 5 + _NPY_DT_ARRFUNCS_OFFSET
343
+ #define NPY_DT_PyArray_ArrFuncs_argmax 6 + _NPY_DT_ARRFUNCS_OFFSET
344
+ #define NPY_DT_PyArray_ArrFuncs_dotfunc 7 + _NPY_DT_ARRFUNCS_OFFSET
345
+ #define NPY_DT_PyArray_ArrFuncs_scanfunc 8 + _NPY_DT_ARRFUNCS_OFFSET
346
+ #define NPY_DT_PyArray_ArrFuncs_fromstr 9 + _NPY_DT_ARRFUNCS_OFFSET
347
+ #define NPY_DT_PyArray_ArrFuncs_nonzero 10 + _NPY_DT_ARRFUNCS_OFFSET
348
+ #define NPY_DT_PyArray_ArrFuncs_fill 11 + _NPY_DT_ARRFUNCS_OFFSET
349
+ #define NPY_DT_PyArray_ArrFuncs_fillwithscalar 12 + _NPY_DT_ARRFUNCS_OFFSET
350
+ #define NPY_DT_PyArray_ArrFuncs_sort 13 + _NPY_DT_ARRFUNCS_OFFSET
351
+ #define NPY_DT_PyArray_ArrFuncs_argsort 14 + _NPY_DT_ARRFUNCS_OFFSET
352
+
353
+ // Casting related slots are disabled. See
354
+ // https://github.com/numpy/numpy/pull/23173#discussion_r1101098163
355
+ // #define NPY_DT_PyArray_ArrFuncs_castdict 15 + _NPY_DT_ARRFUNCS_OFFSET
356
+ // #define NPY_DT_PyArray_ArrFuncs_scalarkind 16 + _NPY_DT_ARRFUNCS_OFFSET
357
+ // #define NPY_DT_PyArray_ArrFuncs_cancastscalarkindto 17 + _NPY_DT_ARRFUNCS_OFFSET
358
+ // #define NPY_DT_PyArray_ArrFuncs_cancastto 18 + _NPY_DT_ARRFUNCS_OFFSET
359
+
360
+ // These are deprecated in NumPy 1.19, so are disabled here.
361
+ // #define NPY_DT_PyArray_ArrFuncs_fastclip 19 + _NPY_DT_ARRFUNCS_OFFSET
362
+ // #define NPY_DT_PyArray_ArrFuncs_fastputmask 20 + _NPY_DT_ARRFUNCS_OFFSET
363
+ // #define NPY_DT_PyArray_ArrFuncs_fasttake 21 + _NPY_DT_ARRFUNCS_OFFSET
364
+ #define NPY_DT_PyArray_ArrFuncs_argmin 22 + _NPY_DT_ARRFUNCS_OFFSET
365
+
366
+ // TODO: These slots probably still need some thought, and/or a way to "grow"?
367
+ typedef struct {
368
+ PyTypeObject *typeobj; /* type of python scalar or NULL */
369
+ int flags; /* flags, including parametric and abstract */
370
+ /* NULL terminated cast definitions. Use NULL for the newly created DType */
371
+ PyArrayMethod_Spec **casts;
372
+ PyType_Slot *slots;
373
+ /* Baseclass or NULL (will always subclass `np.dtype`) */
374
+ PyTypeObject *baseclass;
375
+ } PyArrayDTypeMeta_Spec;
376
+
377
+
378
+ typedef PyArray_Descr *(discover_descr_from_pyobject_function)(
379
+ PyArray_DTypeMeta *cls, PyObject *obj);
380
+
381
+ /*
382
+ * Before making this public, we should decide whether it should pass
383
+ * the type, or allow looking at the object. A possible use-case:
384
+ * `np.array(np.array([0]), dtype=np.ndarray)`
385
+ * Could consider arrays that are not `dtype=ndarray` "scalars".
386
+ */
387
+ typedef int (is_known_scalar_type_function)(
388
+ PyArray_DTypeMeta *cls, PyTypeObject *obj);
389
+
390
+ typedef PyArray_Descr *(default_descr_function)(PyArray_DTypeMeta *cls);
391
+ typedef PyArray_DTypeMeta *(common_dtype_function)(
392
+ PyArray_DTypeMeta *dtype1, PyArray_DTypeMeta *dtype2);
393
+ typedef PyArray_Descr *(common_instance_function)(
394
+ PyArray_Descr *dtype1, PyArray_Descr *dtype2);
395
+ typedef PyArray_Descr *(ensure_canonical_function)(PyArray_Descr *dtype);
396
+
397
+ /*
398
+ * TODO: These two functions are currently only used for experimental DType
399
+ * API support. Their relation should be "reversed": NumPy should
400
+ * always use them internally.
401
+ * There are open points about "casting safety" though, e.g. setting
402
+ * elements is currently always unsafe.
403
+ */
404
+ typedef int(setitemfunction)(PyArray_Descr *, PyObject *, char *);
405
+ typedef PyObject *(getitemfunction)(PyArray_Descr *, char *);
406
+
407
+
408
+ #endif /* NUMPY_CORE_INCLUDE_NUMPY___DTYPE_API_H_ */
venv/lib/python3.10/site-packages/numpy/core/include/numpy/_neighborhood_iterator_imp.h ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef NUMPY_CORE_INCLUDE_NUMPY__NEIGHBORHOOD_IMP_H_
2
+ #error You should not include this header directly
3
+ #endif
4
+ /*
5
+ * Private API (here for inline)
6
+ */
7
+ static inline int
8
+ _PyArrayNeighborhoodIter_IncrCoord(PyArrayNeighborhoodIterObject* iter);
9
+
10
+ /*
11
+ * Update to next item of the iterator
12
+ *
13
+ * Note: this simply increment the coordinates vector, last dimension
14
+ * incremented first , i.e, for dimension 3
15
+ * ...
16
+ * -1, -1, -1
17
+ * -1, -1, 0
18
+ * -1, -1, 1
19
+ * ....
20
+ * -1, 0, -1
21
+ * -1, 0, 0
22
+ * ....
23
+ * 0, -1, -1
24
+ * 0, -1, 0
25
+ * ....
26
+ */
27
+ #define _UPDATE_COORD_ITER(c) \
28
+ wb = iter->coordinates[c] < iter->bounds[c][1]; \
29
+ if (wb) { \
30
+ iter->coordinates[c] += 1; \
31
+ return 0; \
32
+ } \
33
+ else { \
34
+ iter->coordinates[c] = iter->bounds[c][0]; \
35
+ }
36
+
37
+ static inline int
38
+ _PyArrayNeighborhoodIter_IncrCoord(PyArrayNeighborhoodIterObject* iter)
39
+ {
40
+ npy_intp i, wb;
41
+
42
+ for (i = iter->nd - 1; i >= 0; --i) {
43
+ _UPDATE_COORD_ITER(i)
44
+ }
45
+
46
+ return 0;
47
+ }
48
+
49
+ /*
50
+ * Version optimized for 2d arrays, manual loop unrolling
51
+ */
52
+ static inline int
53
+ _PyArrayNeighborhoodIter_IncrCoord2D(PyArrayNeighborhoodIterObject* iter)
54
+ {
55
+ npy_intp wb;
56
+
57
+ _UPDATE_COORD_ITER(1)
58
+ _UPDATE_COORD_ITER(0)
59
+
60
+ return 0;
61
+ }
62
+ #undef _UPDATE_COORD_ITER
63
+
64
+ /*
65
+ * Advance to the next neighbour
66
+ */
67
+ static inline int
68
+ PyArrayNeighborhoodIter_Next(PyArrayNeighborhoodIterObject* iter)
69
+ {
70
+ _PyArrayNeighborhoodIter_IncrCoord (iter);
71
+ iter->dataptr = iter->translate((PyArrayIterObject*)iter, iter->coordinates);
72
+
73
+ return 0;
74
+ }
75
+
76
+ /*
77
+ * Reset functions
78
+ */
79
+ static inline int
80
+ PyArrayNeighborhoodIter_Reset(PyArrayNeighborhoodIterObject* iter)
81
+ {
82
+ npy_intp i;
83
+
84
+ for (i = 0; i < iter->nd; ++i) {
85
+ iter->coordinates[i] = iter->bounds[i][0];
86
+ }
87
+ iter->dataptr = iter->translate((PyArrayIterObject*)iter, iter->coordinates);
88
+
89
+ return 0;
90
+ }
venv/lib/python3.10/site-packages/numpy/core/include/numpy/_numpyconfig.h ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #define NPY_HAVE_ENDIAN_H 1
2
+
3
+ #define NPY_SIZEOF_SHORT 2
4
+ #define NPY_SIZEOF_INT 4
5
+ #define NPY_SIZEOF_LONG 8
6
+ #define NPY_SIZEOF_FLOAT 4
7
+ #define NPY_SIZEOF_COMPLEX_FLOAT 8
8
+ #define NPY_SIZEOF_DOUBLE 8
9
+ #define NPY_SIZEOF_COMPLEX_DOUBLE 16
10
+ #define NPY_SIZEOF_LONGDOUBLE 16
11
+ #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
12
+ #define NPY_SIZEOF_PY_INTPTR_T 8
13
+ #define NPY_SIZEOF_OFF_T 8
14
+ #define NPY_SIZEOF_PY_LONG_LONG 8
15
+ #define NPY_SIZEOF_LONGLONG 8
16
+
17
+ #define NPY_USE_C99_COMPLEX 1
18
+ #define NPY_HAVE_COMPLEX_DOUBLE 1
19
+ #define NPY_HAVE_COMPLEX_FLOAT 1
20
+ #define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
21
+ #define NPY_USE_C99_FORMATS 1
22
+
23
+ /* #undef NPY_NO_SIGNAL */
24
+ #define NPY_NO_SMP 0
25
+
26
+ #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
27
+ #define NPY_ABI_VERSION 0x01000009
28
+ #define NPY_API_VERSION 0x00000011
29
+
30
+ #ifndef __STDC_FORMAT_MACROS
31
+ #define __STDC_FORMAT_MACROS 1
32
+ #endif
venv/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef NUMPY_CORE_INCLUDE_NUMPY_ARRAYOBJECT_H_
2
+ #define NUMPY_CORE_INCLUDE_NUMPY_ARRAYOBJECT_H_
3
+ #define Py_ARRAYOBJECT_H
4
+
5
+ #include "ndarrayobject.h"
6
+ #include "npy_interrupt.h"
7
+
8
+ #ifdef NPY_NO_PREFIX
9
+ #include "noprefix.h"
10
+ #endif
11
+
12
+ #endif /* NUMPY_CORE_INCLUDE_NUMPY_ARRAYOBJECT_H_ */
venv/lib/python3.10/site-packages/numpy/core/include/numpy/arrayscalars.h ADDED
@@ -0,0 +1,186 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef NUMPY_CORE_INCLUDE_NUMPY_ARRAYSCALARS_H_
2
+ #define NUMPY_CORE_INCLUDE_NUMPY_ARRAYSCALARS_H_
3
+
4
+ #ifndef _MULTIARRAYMODULE
5
+ typedef struct {
6
+ PyObject_HEAD
7
+ npy_bool obval;
8
+ } PyBoolScalarObject;
9
+ #endif
10
+
11
+
12
+ typedef struct {
13
+ PyObject_HEAD
14
+ signed char obval;
15
+ } PyByteScalarObject;
16
+
17
+
18
+ typedef struct {
19
+ PyObject_HEAD
20
+ short obval;
21
+ } PyShortScalarObject;
22
+
23
+
24
+ typedef struct {
25
+ PyObject_HEAD
26
+ int obval;
27
+ } PyIntScalarObject;
28
+
29
+
30
+ typedef struct {
31
+ PyObject_HEAD
32
+ long obval;
33
+ } PyLongScalarObject;
34
+
35
+
36
+ typedef struct {
37
+ PyObject_HEAD
38
+ npy_longlong obval;
39
+ } PyLongLongScalarObject;
40
+
41
+
42
+ typedef struct {
43
+ PyObject_HEAD
44
+ unsigned char obval;
45
+ } PyUByteScalarObject;
46
+
47
+
48
+ typedef struct {
49
+ PyObject_HEAD
50
+ unsigned short obval;
51
+ } PyUShortScalarObject;
52
+
53
+
54
+ typedef struct {
55
+ PyObject_HEAD
56
+ unsigned int obval;
57
+ } PyUIntScalarObject;
58
+
59
+
60
+ typedef struct {
61
+ PyObject_HEAD
62
+ unsigned long obval;
63
+ } PyULongScalarObject;
64
+
65
+
66
+ typedef struct {
67
+ PyObject_HEAD
68
+ npy_ulonglong obval;
69
+ } PyULongLongScalarObject;
70
+
71
+
72
+ typedef struct {
73
+ PyObject_HEAD
74
+ npy_half obval;
75
+ } PyHalfScalarObject;
76
+
77
+
78
+ typedef struct {
79
+ PyObject_HEAD
80
+ float obval;
81
+ } PyFloatScalarObject;
82
+
83
+
84
+ typedef struct {
85
+ PyObject_HEAD
86
+ double obval;
87
+ } PyDoubleScalarObject;
88
+
89
+
90
+ typedef struct {
91
+ PyObject_HEAD
92
+ npy_longdouble obval;
93
+ } PyLongDoubleScalarObject;
94
+
95
+
96
+ typedef struct {
97
+ PyObject_HEAD
98
+ npy_cfloat obval;
99
+ } PyCFloatScalarObject;
100
+
101
+
102
+ typedef struct {
103
+ PyObject_HEAD
104
+ npy_cdouble obval;
105
+ } PyCDoubleScalarObject;
106
+
107
+
108
+ typedef struct {
109
+ PyObject_HEAD
110
+ npy_clongdouble obval;
111
+ } PyCLongDoubleScalarObject;
112
+
113
+
114
+ typedef struct {
115
+ PyObject_HEAD
116
+ PyObject * obval;
117
+ } PyObjectScalarObject;
118
+
119
+ typedef struct {
120
+ PyObject_HEAD
121
+ npy_datetime obval;
122
+ PyArray_DatetimeMetaData obmeta;
123
+ } PyDatetimeScalarObject;
124
+
125
+ typedef struct {
126
+ PyObject_HEAD
127
+ npy_timedelta obval;
128
+ PyArray_DatetimeMetaData obmeta;
129
+ } PyTimedeltaScalarObject;
130
+
131
+
132
+ typedef struct {
133
+ PyObject_HEAD
134
+ char obval;
135
+ } PyScalarObject;
136
+
137
+ #define PyStringScalarObject PyBytesObject
138
+ typedef struct {
139
+ /* note that the PyObject_HEAD macro lives right here */
140
+ PyUnicodeObject base;
141
+ Py_UCS4 *obval;
142
+ #if NPY_FEATURE_VERSION >= NPY_1_20_API_VERSION
143
+ char *buffer_fmt;
144
+ #endif
145
+ } PyUnicodeScalarObject;
146
+
147
+
148
+ typedef struct {
149
+ PyObject_VAR_HEAD
150
+ char *obval;
151
+ PyArray_Descr *descr;
152
+ int flags;
153
+ PyObject *base;
154
+ #if NPY_FEATURE_VERSION >= NPY_1_20_API_VERSION
155
+ void *_buffer_info; /* private buffer info, tagged to allow warning */
156
+ #endif
157
+ } PyVoidScalarObject;
158
+
159
+ /* Macros
160
+ Py<Cls><bitsize>ScalarObject
161
+ Py<Cls><bitsize>ArrType_Type
162
+ are defined in ndarrayobject.h
163
+ */
164
+
165
+ #define PyArrayScalar_False ((PyObject *)(&(_PyArrayScalar_BoolValues[0])))
166
+ #define PyArrayScalar_True ((PyObject *)(&(_PyArrayScalar_BoolValues[1])))
167
+ #define PyArrayScalar_FromLong(i) \
168
+ ((PyObject *)(&(_PyArrayScalar_BoolValues[((i)!=0)])))
169
+ #define PyArrayScalar_RETURN_BOOL_FROM_LONG(i) \
170
+ return Py_INCREF(PyArrayScalar_FromLong(i)), \
171
+ PyArrayScalar_FromLong(i)
172
+ #define PyArrayScalar_RETURN_FALSE \
173
+ return Py_INCREF(PyArrayScalar_False), \
174
+ PyArrayScalar_False
175
+ #define PyArrayScalar_RETURN_TRUE \
176
+ return Py_INCREF(PyArrayScalar_True), \
177
+ PyArrayScalar_True
178
+
179
+ #define PyArrayScalar_New(cls) \
180
+ Py##cls##ArrType_Type.tp_alloc(&Py##cls##ArrType_Type, 0)
181
+ #define PyArrayScalar_VAL(obj, cls) \
182
+ ((Py##cls##ScalarObject *)obj)->obval
183
+ #define PyArrayScalar_ASSIGN(obj, cls, val) \
184
+ PyArrayScalar_VAL(obj, cls) = val
185
+
186
+ #endif /* NUMPY_CORE_INCLUDE_NUMPY_ARRAYSCALARS_H_ */
venv/lib/python3.10/site-packages/numpy/core/include/numpy/experimental_dtype_api.h ADDED
@@ -0,0 +1,365 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * This header exports the new experimental DType API as proposed in
3
+ * NEPs 41 to 43. For background, please check these NEPs. Otherwise,
4
+ * this header also serves as documentation for the time being.
5
+ *
6
+ * The header includes `_dtype_api.h` which holds most definition while this
7
+ * header mainly wraps functions for public consumption.
8
+ *
9
+ * Please do not hesitate to contact @seberg with questions. This is
10
+ * developed together with https://github.com/seberg/experimental_user_dtypes
11
+ * and those interested in experimenting are encouraged to contribute there.
12
+ *
13
+ * To use the functions defined in the header, call::
14
+ *
15
+ * if (import_experimental_dtype_api(version) < 0) {
16
+ * return NULL;
17
+ * }
18
+ *
19
+ * in your module init. (A version mismatch will be reported, just update
20
+ * to the correct one, this will alert you of possible changes.)
21
+ *
22
+ * The following lists the main symbols currently exported. Please do not
23
+ * hesitate to ask for help or clarification:
24
+ *
25
+ * - PyUFunc_AddLoopFromSpec:
26
+ *
27
+ * Register a new loop for a ufunc. This uses the `PyArrayMethod_Spec`
28
+ * which must be filled in (see in-line comments).
29
+ *
30
+ * - PyUFunc_AddWrappingLoop:
31
+ *
32
+ * Register a new loop which reuses an existing one, but modifies the
33
+ * result dtypes. Please search the internal NumPy docs for more info
34
+ * at this point. (Used for physical units dtype.)
35
+ *
36
+ * - PyUFunc_AddPromoter:
37
+ *
38
+ * Register a new promoter for a ufunc. A promoter is a function stored
39
+ * in a PyCapsule (see in-line comments). It is passed the operation and
40
+ * requested DType signatures and can mutate it to attempt a new search
41
+ * for a matching loop/promoter.
42
+ * I.e. for Numba a promoter could even add the desired loop.
43
+ *
44
+ * - PyArrayInitDTypeMeta_FromSpec:
45
+ *
46
+ * Initialize a new DType. It must currently be a static Python C type
47
+ * that is declared as `PyArray_DTypeMeta` and not `PyTypeObject`.
48
+ * Further, it must subclass `np.dtype` and set its type to
49
+ * `PyArrayDTypeMeta_Type` (before calling `PyType_Read()`).
50
+ *
51
+ * - PyArray_CommonDType:
52
+ *
53
+ * Find the common-dtype ("promotion") for two DType classes. Similar
54
+ * to `np.result_type`, but works on the classes and not instances.
55
+ *
56
+ * - PyArray_PromoteDTypeSequence:
57
+ *
58
+ * Same as CommonDType, but works with an arbitrary number of DTypes.
59
+ * This function is smarter and can often return successful and unambiguous
60
+ * results when `common_dtype(common_dtype(dt1, dt2), dt3)` would
61
+ * depend on the operation order or fail. Nevertheless, DTypes should
62
+ * aim to ensure that their common-dtype implementation is associative
63
+ * and commutative! (Mainly, unsigned and signed integers are not.)
64
+ *
65
+ * For guaranteed consistent results DTypes must implement common-Dtype
66
+ * "transitively". If A promotes B and B promotes C, than A must generally
67
+ * also promote C; where "promotes" means implements the promotion.
68
+ * (There are some exceptions for abstract DTypes)
69
+ *
70
+ * - PyArray_GetDefaultDescr:
71
+ *
72
+ * Given a DType class, returns the default instance (descriptor).
73
+ * This is an inline function checking for `singleton` first and only
74
+ * calls the `default_descr` function if necessary.
75
+ *
76
+ * - PyArray_DoubleDType, etc.:
77
+ *
78
+ * Aliases to the DType classes for the builtin NumPy DTypes.
79
+ *
80
+ * WARNING
81
+ * =======
82
+ *
83
+ * By using this header, you understand that this is a fully experimental
84
+ * exposure. Details are expected to change, and some options may have no
85
+ * effect. (Please contact @seberg if you have questions!)
86
+ * If the exposure stops working, please file a bug report with NumPy.
87
+ * Further, a DType created using this API/header should still be expected
88
+ * to be incompatible with some functionality inside and outside of NumPy.
89
+ * In this case crashes must be expected. Please report any such problems
90
+ * so that they can be fixed before final exposure.
91
+ * Furthermore, expect missing checks for programming errors which the final
92
+ * API is expected to have.
93
+ *
94
+ * Symbols with a leading underscore are likely to not be included in the
95
+ * first public version, if these are central to your use-case, please let
96
+ * us know, so that we can reconsider.
97
+ *
98
+ * "Array-like" consumer API not yet under considerations
99
+ * ======================================================
100
+ *
101
+ * The new DType API is designed in a way to make it potentially useful for
102
+ * alternative "array-like" implementations. This will require careful
103
+ * exposure of details and functions and is not part of this experimental API.
104
+ *
105
+ * Brief (incompatibility) changelog
106
+ * =================================
107
+ *
108
+ * 2. None (only additions).
109
+ * 3. New `npy_intp *view_offset` argument for `resolve_descriptors`.
110
+ * This replaces the `NPY_CAST_IS_VIEW` flag. It can be set to 0 if the
111
+ * operation is a view, and is pre-initialized to `NPY_MIN_INTP` indicating
112
+ * that the operation is not a view.
113
+ */
114
+
115
+ #ifndef NUMPY_CORE_INCLUDE_NUMPY_EXPERIMENTAL_DTYPE_API_H_
116
+ #define NUMPY_CORE_INCLUDE_NUMPY_EXPERIMENTAL_DTYPE_API_H_
117
+
118
+ #include <Python.h>
119
+ #include "ndarraytypes.h"
120
+ #include "_dtype_api.h"
121
+
122
+ /*
123
+ * The contents of PyArrayMethodObject are currently opaque (is there a way
124
+ * good way to make them be `PyObject *`?)
125
+ */
126
+ typedef struct PyArrayMethodObject_tag PyArrayMethodObject;
127
+
128
+ /*
129
+ * There must be a better way?! -- Oh well, this is experimental
130
+ * (my issue with it, is that I cannot undef those helpers).
131
+ */
132
+ #if defined(PY_ARRAY_UNIQUE_SYMBOL)
133
+ #define NPY_EXP_DTYPE_API_CONCAT_HELPER2(x, y) x ## y
134
+ #define NPY_EXP_DTYPE_API_CONCAT_HELPER(arg) NPY_EXP_DTYPE_API_CONCAT_HELPER2(arg, __experimental_dtype_api_table)
135
+ #define __experimental_dtype_api_table NPY_EXP_DTYPE_API_CONCAT_HELPER(PY_ARRAY_UNIQUE_SYMBOL)
136
+ #else
137
+ #define __experimental_dtype_api_table __experimental_dtype_api_table
138
+ #endif
139
+
140
+ /* Support for correct multi-file projects: */
141
+ #if defined(NO_IMPORT) || defined(NO_IMPORT_ARRAY)
142
+ extern void **__experimental_dtype_api_table;
143
+ #else
144
+ /*
145
+ * Just a hack so I don't forget importing as much myself, I spend way too
146
+ * much time noticing it the first time around :).
147
+ */
148
+ static void
149
+ __not_imported(void)
150
+ {
151
+ printf("*****\nCritical error, dtype API not imported\n*****\n");
152
+ }
153
+
154
+ static void *__uninitialized_table[] = {
155
+ &__not_imported, &__not_imported, &__not_imported, &__not_imported,
156
+ &__not_imported, &__not_imported, &__not_imported, &__not_imported};
157
+
158
+ #if defined(PY_ARRAY_UNIQUE_SYMBOL)
159
+ void **__experimental_dtype_api_table = __uninitialized_table;
160
+ #else
161
+ static void **__experimental_dtype_api_table = __uninitialized_table;
162
+ #endif
163
+ #endif
164
+
165
+
166
+ typedef int _ufunc_addloop_fromspec_func(
167
+ PyObject *ufunc, PyArrayMethod_Spec *spec);
168
+ /*
169
+ * The main ufunc registration function. This adds a new implementation/loop
170
+ * to a ufunc. It replaces `PyUFunc_RegisterLoopForType`.
171
+ */
172
+ #define PyUFunc_AddLoopFromSpec \
173
+ (*(_ufunc_addloop_fromspec_func *)(__experimental_dtype_api_table[0]))
174
+
175
+
176
+ /* Please see the NumPy definitions in `array_method.h` for details on these */
177
+ typedef int translate_given_descrs_func(int nin, int nout,
178
+ PyArray_DTypeMeta *wrapped_dtypes[],
179
+ PyArray_Descr *given_descrs[], PyArray_Descr *new_descrs[]);
180
+ typedef int translate_loop_descrs_func(int nin, int nout,
181
+ PyArray_DTypeMeta *new_dtypes[], PyArray_Descr *given_descrs[],
182
+ PyArray_Descr *original_descrs[], PyArray_Descr *loop_descrs[]);
183
+
184
+ typedef int _ufunc_wrapping_loop_func(PyObject *ufunc_obj,
185
+ PyArray_DTypeMeta *new_dtypes[], PyArray_DTypeMeta *wrapped_dtypes[],
186
+ translate_given_descrs_func *translate_given_descrs,
187
+ translate_loop_descrs_func *translate_loop_descrs);
188
+ #define PyUFunc_AddWrappingLoop \
189
+ (*(_ufunc_wrapping_loop_func *)(__experimental_dtype_api_table[7]))
190
+
191
+ /*
192
+ * Type of the C promoter function, which must be wrapped into a
193
+ * PyCapsule with name "numpy._ufunc_promoter".
194
+ *
195
+ * Note that currently the output dtypes are always NULL unless they are
196
+ * also part of the signature. This is an implementation detail and could
197
+ * change in the future. However, in general promoters should not have a
198
+ * need for output dtypes.
199
+ * (There are potential use-cases, these are currently unsupported.)
200
+ */
201
+ typedef int promoter_function(PyObject *ufunc,
202
+ PyArray_DTypeMeta *op_dtypes[], PyArray_DTypeMeta *signature[],
203
+ PyArray_DTypeMeta *new_op_dtypes[]);
204
+
205
+ /*
206
+ * Function to register a promoter.
207
+ *
208
+ * @param ufunc The ufunc object to register the promoter with.
209
+ * @param DType_tuple A Python tuple containing DTypes or None matching the
210
+ * number of inputs and outputs of the ufunc.
211
+ * @param promoter A PyCapsule with name "numpy._ufunc_promoter" containing
212
+ * a pointer to a `promoter_function`.
213
+ */
214
+ typedef int _ufunc_addpromoter_func(
215
+ PyObject *ufunc, PyObject *DType_tuple, PyObject *promoter);
216
+ #define PyUFunc_AddPromoter \
217
+ (*(_ufunc_addpromoter_func *)(__experimental_dtype_api_table[1]))
218
+
219
+ #define PyArrayDTypeMeta_Type \
220
+ (*(PyTypeObject *)__experimental_dtype_api_table[2])
221
+ typedef int __dtypemeta_fromspec(
222
+ PyArray_DTypeMeta *DType, PyArrayDTypeMeta_Spec *dtype_spec);
223
+ /*
224
+ * Finalize creation of a DTypeMeta. You must ensure that the DTypeMeta is
225
+ * a proper subclass. The DTypeMeta object has additional fields compared to
226
+ * a normal PyTypeObject!
227
+ * The only (easy) creation of a new DType is to create a static Type which
228
+ * inherits `PyArray_DescrType`, sets its type to `PyArrayDTypeMeta_Type` and
229
+ * uses `PyArray_DTypeMeta` defined above as the C-structure.
230
+ */
231
+ #define PyArrayInitDTypeMeta_FromSpec \
232
+ ((__dtypemeta_fromspec *)(__experimental_dtype_api_table[3]))
233
+
234
+
235
+ /*
236
+ * *************************************
237
+ * WORKING WITH DTYPES
238
+ * *************************************
239
+ */
240
+
241
+ typedef PyArray_DTypeMeta *__common_dtype(
242
+ PyArray_DTypeMeta *DType1, PyArray_DTypeMeta *DType2);
243
+ #define PyArray_CommonDType \
244
+ ((__common_dtype *)(__experimental_dtype_api_table[4]))
245
+
246
+
247
+ typedef PyArray_DTypeMeta *__promote_dtype_sequence(
248
+ npy_intp num, PyArray_DTypeMeta *DTypes[]);
249
+ #define PyArray_PromoteDTypeSequence \
250
+ ((__promote_dtype_sequence *)(__experimental_dtype_api_table[5]))
251
+
252
+
253
+ typedef PyArray_Descr *__get_default_descr(
254
+ PyArray_DTypeMeta *DType);
255
+ #define _PyArray_GetDefaultDescr \
256
+ ((__get_default_descr *)(__experimental_dtype_api_table[6]))
257
+
258
+ static inline PyArray_Descr *
259
+ PyArray_GetDefaultDescr(PyArray_DTypeMeta *DType)
260
+ {
261
+ if (DType->singleton != NULL) {
262
+ Py_INCREF(DType->singleton);
263
+ return DType->singleton;
264
+ }
265
+ return _PyArray_GetDefaultDescr(DType);
266
+ }
267
+
268
+
269
+ /*
270
+ * NumPy's builtin DTypes:
271
+ */
272
+ #define PyArray_BoolDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[10])
273
+ /* Integers */
274
+ #define PyArray_ByteDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[11])
275
+ #define PyArray_UByteDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[12])
276
+ #define PyArray_ShortDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[13])
277
+ #define PyArray_UShortDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[14])
278
+ #define PyArray_IntDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[15])
279
+ #define PyArray_UIntDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[16])
280
+ #define PyArray_LongDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[17])
281
+ #define PyArray_ULongDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[18])
282
+ #define PyArray_LongLongDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[19])
283
+ #define PyArray_ULongLongDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[20])
284
+ /* Integer aliases */
285
+ #define PyArray_Int8Type (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[21])
286
+ #define PyArray_UInt8DType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[22])
287
+ #define PyArray_Int16DType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[23])
288
+ #define PyArray_UInt16DType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[24])
289
+ #define PyArray_Int32DType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[25])
290
+ #define PyArray_UInt32DType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[26])
291
+ #define PyArray_Int64DType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[27])
292
+ #define PyArray_UInt64DType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[28])
293
+ #define PyArray_IntpDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[29])
294
+ #define PyArray_UIntpDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[30])
295
+ /* Floats */
296
+ #define PyArray_HalfType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[31])
297
+ #define PyArray_FloatDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[32])
298
+ #define PyArray_DoubleDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[33])
299
+ #define PyArray_LongDoubleDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[34])
300
+ /* Complex */
301
+ #define PyArray_CFloatDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[35])
302
+ #define PyArray_CDoubleDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[36])
303
+ #define PyArray_CLongDoubleDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[37])
304
+ /* String/Bytes */
305
+ #define PyArray_StringDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[38])
306
+ #define PyArray_UnicodeDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[39])
307
+ /* Datetime/Timedelta */
308
+ #define PyArray_DatetimeDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[40])
309
+ #define PyArray_TimedeltaDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[41])
310
+ /* Object/Void */
311
+ #define PyArray_ObjectDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[42])
312
+ #define PyArray_VoidDType (*(PyArray_DTypeMeta *)__experimental_dtype_api_table[43])
313
+
314
+ /*
315
+ * ********************************
316
+ * Initialization
317
+ * ********************************
318
+ *
319
+ * Import the experimental API, the version must match the one defined in
320
+ * the header to ensure changes are taken into account. NumPy will further
321
+ * runtime-check this.
322
+ * You must call this function to use the symbols defined in this file.
323
+ */
324
+ #if !defined(NO_IMPORT) && !defined(NO_IMPORT_ARRAY)
325
+
326
+ static int
327
+ import_experimental_dtype_api(int version)
328
+ {
329
+ if (version != __EXPERIMENTAL_DTYPE_API_VERSION) {
330
+ PyErr_Format(PyExc_RuntimeError,
331
+ "DType API version %d did not match header version %d. Please "
332
+ "update the import statement and check for API changes.",
333
+ version, __EXPERIMENTAL_DTYPE_API_VERSION);
334
+ return -1;
335
+ }
336
+ if (__experimental_dtype_api_table != __uninitialized_table) {
337
+ /* already imported. */
338
+ return 0;
339
+ }
340
+
341
+ PyObject *multiarray = PyImport_ImportModule("numpy.core._multiarray_umath");
342
+ if (multiarray == NULL) {
343
+ return -1;
344
+ }
345
+
346
+ PyObject *api = PyObject_CallMethod(multiarray,
347
+ "_get_experimental_dtype_api", "i", version);
348
+ Py_DECREF(multiarray);
349
+ if (api == NULL) {
350
+ return -1;
351
+ }
352
+ __experimental_dtype_api_table = (void **)PyCapsule_GetPointer(api,
353
+ "experimental_dtype_api_table");
354
+ Py_DECREF(api);
355
+
356
+ if (__experimental_dtype_api_table == NULL) {
357
+ __experimental_dtype_api_table = __uninitialized_table;
358
+ return -1;
359
+ }
360
+ return 0;
361
+ }
362
+
363
+ #endif /* !defined(NO_IMPORT) && !defined(NO_IMPORT_ARRAY) */
364
+
365
+ #endif /* NUMPY_CORE_INCLUDE_NUMPY_EXPERIMENTAL_DTYPE_API_H_ */
venv/lib/python3.10/site-packages/numpy/core/include/numpy/halffloat.h ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef NUMPY_CORE_INCLUDE_NUMPY_HALFFLOAT_H_
2
+ #define NUMPY_CORE_INCLUDE_NUMPY_HALFFLOAT_H_
3
+
4
+ #include <Python.h>
5
+ #include <numpy/npy_math.h>
6
+
7
+ #ifdef __cplusplus
8
+ extern "C" {
9
+ #endif
10
+
11
+ /*
12
+ * Half-precision routines
13
+ */
14
+
15
+ /* Conversions */
16
+ float npy_half_to_float(npy_half h);
17
+ double npy_half_to_double(npy_half h);
18
+ npy_half npy_float_to_half(float f);
19
+ npy_half npy_double_to_half(double d);
20
+ /* Comparisons */
21
+ int npy_half_eq(npy_half h1, npy_half h2);
22
+ int npy_half_ne(npy_half h1, npy_half h2);
23
+ int npy_half_le(npy_half h1, npy_half h2);
24
+ int npy_half_lt(npy_half h1, npy_half h2);
25
+ int npy_half_ge(npy_half h1, npy_half h2);
26
+ int npy_half_gt(npy_half h1, npy_half h2);
27
+ /* faster *_nonan variants for when you know h1 and h2 are not NaN */
28
+ int npy_half_eq_nonan(npy_half h1, npy_half h2);
29
+ int npy_half_lt_nonan(npy_half h1, npy_half h2);
30
+ int npy_half_le_nonan(npy_half h1, npy_half h2);
31
+ /* Miscellaneous functions */
32
+ int npy_half_iszero(npy_half h);
33
+ int npy_half_isnan(npy_half h);
34
+ int npy_half_isinf(npy_half h);
35
+ int npy_half_isfinite(npy_half h);
36
+ int npy_half_signbit(npy_half h);
37
+ npy_half npy_half_copysign(npy_half x, npy_half y);
38
+ npy_half npy_half_spacing(npy_half h);
39
+ npy_half npy_half_nextafter(npy_half x, npy_half y);
40
+ npy_half npy_half_divmod(npy_half x, npy_half y, npy_half *modulus);
41
+
42
+ /*
43
+ * Half-precision constants
44
+ */
45
+
46
+ #define NPY_HALF_ZERO (0x0000u)
47
+ #define NPY_HALF_PZERO (0x0000u)
48
+ #define NPY_HALF_NZERO (0x8000u)
49
+ #define NPY_HALF_ONE (0x3c00u)
50
+ #define NPY_HALF_NEGONE (0xbc00u)
51
+ #define NPY_HALF_PINF (0x7c00u)
52
+ #define NPY_HALF_NINF (0xfc00u)
53
+ #define NPY_HALF_NAN (0x7e00u)
54
+
55
+ #define NPY_MAX_HALF (0x7bffu)
56
+
57
+ /*
58
+ * Bit-level conversions
59
+ */
60
+
61
+ npy_uint16 npy_floatbits_to_halfbits(npy_uint32 f);
62
+ npy_uint16 npy_doublebits_to_halfbits(npy_uint64 d);
63
+ npy_uint32 npy_halfbits_to_floatbits(npy_uint16 h);
64
+ npy_uint64 npy_halfbits_to_doublebits(npy_uint16 h);
65
+
66
+ #ifdef __cplusplus
67
+ }
68
+ #endif
69
+
70
+ #endif /* NUMPY_CORE_INCLUDE_NUMPY_HALFFLOAT_H_ */