Datasets:
Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/joblib-1.5.2.dist-info/INSTALLER +1 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/joblib-1.5.2.dist-info/METADATA +173 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/joblib-1.5.2.dist-info/RECORD +145 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/joblib-1.5.2.dist-info/REQUESTED +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/joblib-1.5.2.dist-info/WHEEL +5 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/joblib-1.5.2.dist-info/licenses/LICENSE.txt +29 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/joblib-1.5.2.dist-info/top_level.txt +1 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__config__.py +170 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__config__.pyi +102 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd +1250 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__init__.pxd +1164 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__init__.py +547 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__init__.pyi +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/__config__.cpython-310.pyc +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/__init__.cpython-310.pyc +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/_array_api_info.cpython-310.pyc +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/_distributor_init.cpython-310.pyc +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/_expired_attrs_2_0.cpython-310.pyc +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/_globals.cpython-310.pyc +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/_pytesttester.cpython-310.pyc +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/ctypeslib.cpython-310.pyc +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/dtypes.cpython-310.pyc +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/exceptions.cpython-310.pyc +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/version.cpython-310.pyc +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_array_api_info.py +346 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_array_api_info.pyi +210 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_configtool.py +39 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_configtool.pyi +1 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_distributor_init.py +15 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_distributor_init.pyi +1 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_expired_attrs_2_0.py +80 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_expired_attrs_2_0.pyi +63 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_globals.py +95 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_globals.pyi +17 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_pyinstaller/__init__.py +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_pyinstaller/__init__.pyi +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_pyinstaller/hook-numpy.py +36 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_pyinstaller/hook-numpy.pyi +13 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_pyinstaller/tests/__init__.py +16 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_pyinstaller/tests/pyinstaller-smoke.py +32 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_pyinstaller/tests/test_pyinstaller.py +35 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_pytesttester.py +200 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_pytesttester.pyi +18 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_typing/__init__.py +154 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_typing/__pycache__/__init__.cpython-310.pyc +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_typing/__pycache__/_add_docstring.cpython-310.pyc +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_typing/__pycache__/_array_like.cpython-310.pyc +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_typing/__pycache__/_char_codes.cpython-310.pyc +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_typing/__pycache__/_dtype_like.cpython-310.pyc +0 -0
- Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_typing/__pycache__/_nbit.cpython-310.pyc +0 -0
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/joblib-1.5.2.dist-info/INSTALLER
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.4
|
| 2 |
+
Name: joblib
|
| 3 |
+
Version: 1.5.2
|
| 4 |
+
Summary: Lightweight pipelining with Python functions
|
| 5 |
+
Author-email: Gael Varoquaux <gael.varoquaux@normalesup.org>
|
| 6 |
+
License: BSD 3-Clause
|
| 7 |
+
Project-URL: Homepage, https://joblib.readthedocs.io
|
| 8 |
+
Project-URL: Source, https://github.com/joblib/joblib
|
| 9 |
+
Platform: any
|
| 10 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 11 |
+
Classifier: Environment :: Console
|
| 12 |
+
Classifier: Intended Audience :: Developers
|
| 13 |
+
Classifier: Intended Audience :: Science/Research
|
| 14 |
+
Classifier: Intended Audience :: Education
|
| 15 |
+
Classifier: License :: OSI Approved :: BSD License
|
| 16 |
+
Classifier: Operating System :: OS Independent
|
| 17 |
+
Classifier: Programming Language :: Python :: 3
|
| 18 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 19 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 20 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 21 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 22 |
+
Classifier: Programming Language :: Python :: 3.13
|
| 23 |
+
Classifier: Topic :: Scientific/Engineering
|
| 24 |
+
Classifier: Topic :: Utilities
|
| 25 |
+
Classifier: Topic :: Software Development :: Libraries
|
| 26 |
+
Requires-Python: >=3.9
|
| 27 |
+
Description-Content-Type: text/x-rst
|
| 28 |
+
License-File: LICENSE.txt
|
| 29 |
+
Dynamic: license-file
|
| 30 |
+
|
| 31 |
+
|PyPi| |CIStatus| |ReadTheDocs| |Codecov|
|
| 32 |
+
|
| 33 |
+
.. |PyPi| image:: https://badge.fury.io/py/joblib.svg
|
| 34 |
+
:target: https://badge.fury.io/py/joblib
|
| 35 |
+
:alt: Joblib version
|
| 36 |
+
|
| 37 |
+
.. |CIStatus| image:: https://github.com/joblib/joblib/actions/workflows/test.yml/badge.svg
|
| 38 |
+
:target: https://github.com/joblib/joblib/actions/workflows/test.yml?query=branch%3Amain
|
| 39 |
+
:alt: CI status
|
| 40 |
+
|
| 41 |
+
.. |ReadTheDocs| image:: https://readthedocs.org/projects/joblib/badge/?version=latest
|
| 42 |
+
:target: https://joblib.readthedocs.io/en/latest/?badge=latest
|
| 43 |
+
:alt: Documentation Status
|
| 44 |
+
|
| 45 |
+
.. |Codecov| image:: https://codecov.io/gh/joblib/joblib/branch/main/graph/badge.svg
|
| 46 |
+
:target: https://codecov.io/gh/joblib/joblib
|
| 47 |
+
:alt: Codecov coverage
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
The homepage of joblib with user documentation is located on:
|
| 51 |
+
|
| 52 |
+
https://joblib.readthedocs.io
|
| 53 |
+
|
| 54 |
+
Getting the latest code
|
| 55 |
+
=======================
|
| 56 |
+
|
| 57 |
+
To get the latest code using git, simply type::
|
| 58 |
+
|
| 59 |
+
git clone https://github.com/joblib/joblib.git
|
| 60 |
+
|
| 61 |
+
If you don't have git installed, you can download a zip
|
| 62 |
+
of the latest code: https://github.com/joblib/joblib/archive/refs/heads/main.zip
|
| 63 |
+
|
| 64 |
+
Installing
|
| 65 |
+
==========
|
| 66 |
+
|
| 67 |
+
You can use `pip` to install joblib from any directory::
|
| 68 |
+
|
| 69 |
+
pip install joblib
|
| 70 |
+
|
| 71 |
+
or install it in editable mode from the source directory::
|
| 72 |
+
|
| 73 |
+
pip install -e .
|
| 74 |
+
|
| 75 |
+
Dependencies
|
| 76 |
+
============
|
| 77 |
+
|
| 78 |
+
- Joblib has no mandatory dependencies besides Python (supported versions are
|
| 79 |
+
3.9+).
|
| 80 |
+
- Joblib has an optional dependency on Numpy (at least version 1.6.1) for array
|
| 81 |
+
manipulation.
|
| 82 |
+
- Joblib includes its own vendored copy of
|
| 83 |
+
`loky <https://github.com/tomMoral/loky>`_ for process management.
|
| 84 |
+
- Joblib can efficiently dump and load numpy arrays but does not require numpy
|
| 85 |
+
to be installed.
|
| 86 |
+
- Joblib has an optional dependency on
|
| 87 |
+
`python-lz4 <https://pypi.python.org/pypi/lz4>`_ as a faster alternative to
|
| 88 |
+
zlib and gzip for compressed serialization.
|
| 89 |
+
- Joblib has an optional dependency on psutil to mitigate memory leaks in
|
| 90 |
+
parallel worker processes.
|
| 91 |
+
- Some examples require external dependencies such as pandas. See the
|
| 92 |
+
instructions in the `Building the docs`_ section for details.
|
| 93 |
+
|
| 94 |
+
Workflow to contribute
|
| 95 |
+
======================
|
| 96 |
+
|
| 97 |
+
To contribute to joblib, first create an account on `github
|
| 98 |
+
<https://github.com/>`_. Once this is done, fork the `joblib repository
|
| 99 |
+
<https://github.com/joblib/joblib>`_ to have your own repository,
|
| 100 |
+
clone it using ``git clone``. Make your changes in a branch of your clone, push
|
| 101 |
+
them to your github account, test them locally, and when you are happy with
|
| 102 |
+
them, send a pull request to the main repository.
|
| 103 |
+
|
| 104 |
+
You can use `pre-commit <https://pre-commit.com/#install>`_ to run code style checks
|
| 105 |
+
before each commit::
|
| 106 |
+
|
| 107 |
+
pip install pre-commit
|
| 108 |
+
pre-commit install
|
| 109 |
+
|
| 110 |
+
pre-commit checks can be disabled for a single commit with::
|
| 111 |
+
|
| 112 |
+
git commit -n
|
| 113 |
+
|
| 114 |
+
Running the test suite
|
| 115 |
+
======================
|
| 116 |
+
|
| 117 |
+
To run the test suite, you need the pytest (version >= 3) and coverage modules.
|
| 118 |
+
Run the test suite using::
|
| 119 |
+
|
| 120 |
+
pytest joblib
|
| 121 |
+
|
| 122 |
+
from the root of the project.
|
| 123 |
+
|
| 124 |
+
Building the docs
|
| 125 |
+
=================
|
| 126 |
+
|
| 127 |
+
To build the docs you need to have sphinx (>=1.4) and some dependencies
|
| 128 |
+
installed::
|
| 129 |
+
|
| 130 |
+
pip install -U -r .readthedocs-requirements.txt
|
| 131 |
+
|
| 132 |
+
The docs can then be built with the following command::
|
| 133 |
+
|
| 134 |
+
make doc
|
| 135 |
+
|
| 136 |
+
The html docs are located in the ``doc/_build/html`` directory.
|
| 137 |
+
|
| 138 |
+
|
| 139 |
+
Making a source tarball
|
| 140 |
+
=======================
|
| 141 |
+
|
| 142 |
+
To create a source tarball, eg for packaging or distributing, run the
|
| 143 |
+
following command::
|
| 144 |
+
|
| 145 |
+
pip install build
|
| 146 |
+
python -m build --sdist
|
| 147 |
+
|
| 148 |
+
The tarball will be created in the `dist` directory. This command will create
|
| 149 |
+
the resulting tarball that can be installed with no extra dependencies than the
|
| 150 |
+
Python standard library.
|
| 151 |
+
|
| 152 |
+
Making a release and uploading it to PyPI
|
| 153 |
+
=========================================
|
| 154 |
+
|
| 155 |
+
This command is only run by project manager, to make a release, and
|
| 156 |
+
upload in to PyPI::
|
| 157 |
+
|
| 158 |
+
pip install build
|
| 159 |
+
python -m build --sdist --wheel
|
| 160 |
+
twine upload dist/*
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
Note that the documentation should automatically get updated at each git
|
| 164 |
+
push. If that is not the case, try building th doc locally and resolve
|
| 165 |
+
any doc build error (in particular when running the examples).
|
| 166 |
+
|
| 167 |
+
Updating the changelog
|
| 168 |
+
======================
|
| 169 |
+
|
| 170 |
+
Changes are listed in the CHANGES.rst file. They must be manually updated
|
| 171 |
+
but, the following git command may be used to generate the lines::
|
| 172 |
+
|
| 173 |
+
git log --abbrev-commit --date=short --no-merges --sparse
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/joblib-1.5.2.dist-info/RECORD
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
| 6 |
+
joblib-1.5.2.dist-info/licenses/LICENSE.txt,sha256=QmEpEcGHLF5LQ_auDo7llGfNNQMyJBz3LOkGQCZPrmo,1527
|
| 7 |
+
joblib-1.5.2.dist-info/top_level.txt,sha256=P0LsoZ45gBL7ckL4lqQt7tdbrHD4xlVYhffmhHeeT_U,7
|
| 8 |
+
joblib/__init__.py,sha256=Iv9buXB2WPDJpjCT1kuRCzfDRZkAXbIAOWYUjaGEOlg,5337
|
| 9 |
+
joblib/_cloudpickle_wrapper.py,sha256=HSFxIio3jiGnwVCstAa6obbxs4-5aRAIMDDUAA-cDPc,416
|
| 10 |
+
joblib/_dask.py,sha256=xUYA_2VVc0LvPavSiFy8M7TZc6KF0lIxcQhng5kPaXU,13217
|
| 11 |
+
joblib/_memmapping_reducer.py,sha256=AZ6dqA6fXlm4-ehBCf9m1nq43jUPKman4_2whrOButc,28553
|
| 12 |
+
joblib/_multiprocessing_helpers.py,sha256=f8-Vf_8ildmdg991eLz8xk4DJJFTS_bcrhj6CgQ4lxU,1878
|
| 13 |
+
joblib/_parallel_backends.py,sha256=fgy_FgZiKeNvTWr4wKbSX4kUNx2YD6m7p5O1J96xhb4,28766
|
| 14 |
+
joblib/_store_backends.py,sha256=hKMOjAe309jUKbe-9YHAyfhjnxkcwaWsdw2m7hFo-r8,17693
|
| 15 |
+
joblib/_utils.py,sha256=J9keatbwMXMJ1oZiVhEFu0UgL_WTvoVi4Iberk0gfAg,2076
|
| 16 |
+
joblib/backports.py,sha256=mITpG-yuEADimg89_LCdUY9QH9a5xQHsRNJnd7BmAMo,5450
|
| 17 |
+
joblib/compressor.py,sha256=GDDVJmeOBqftc6tMkDupryojHhk_jIV8WrNoMiTxTdQ,19281
|
| 18 |
+
joblib/disk.py,sha256=1J5hhMsCP5LDW65luTtArUxsMAJRrPB6wxSWf6GeBns,4332
|
| 19 |
+
joblib/executor.py,sha256=fbVmE_KKywjJcIKmHO9k8M3VkaMqZXEP4YXBRz_p6xU,5229
|
| 20 |
+
joblib/externals/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 21 |
+
joblib/externals/cloudpickle/__init__.py,sha256=IzKm9MzljfhH-QmN_o-zP5QimTwbtgJeRja8nrGFanQ,308
|
| 22 |
+
joblib/externals/cloudpickle/cloudpickle.py,sha256=cNEBKdjBDlzFce_tvZL889uv71AnXTz1XBzkjKASSTo,58466
|
| 23 |
+
joblib/externals/cloudpickle/cloudpickle_fast.py,sha256=AI5ZKf2AbLNxD8lXyLDpKZyzeZ2ofFtdK1ZWFq_ec1c,323
|
| 24 |
+
joblib/externals/loky/__init__.py,sha256=8LzBTFpYfRFrjD1loIQpRF9QQ_8wwEkssJI6hYcGbfE,1105
|
| 25 |
+
joblib/externals/loky/_base.py,sha256=LsQnEoKWKGhdeqGhMc68Aqwz4MrTnEs20KAYbFiUHzo,1057
|
| 26 |
+
joblib/externals/loky/backend/__init__.py,sha256=Ix9KThV1CYk7-M5OQnJ_A_JrrrWJ-Jowa-HMMeGbp18,312
|
| 27 |
+
joblib/externals/loky/backend/_posix_reduction.py,sha256=xgCSrIaLI0k_MI0XNOBSp5e1ox1WN9idgrWbkWpMUr4,1776
|
| 28 |
+
joblib/externals/loky/backend/_win_reduction.py,sha256=WmNB0NXtyJ_o_WzfPUEGh5dPhXIeI6FkEnFNXUxO2ws,683
|
| 29 |
+
joblib/externals/loky/backend/context.py,sha256=RPdZvzkEk7iA0rtdAILSHNzl6wsHpm6XD6IL30owAPE,14284
|
| 30 |
+
joblib/externals/loky/backend/fork_exec.py,sha256=4DZ1iLBB-21rlg3Z4Kh9DTVZj35JPaWFE5rzWZaSDxk,2319
|
| 31 |
+
joblib/externals/loky/backend/popen_loky_posix.py,sha256=3G-2_-ovZtjWcHI-xSyW5zQjAZ-_Z9IGjzY1RrZH4nc,5541
|
| 32 |
+
joblib/externals/loky/backend/popen_loky_win32.py,sha256=bYkhRA0w8qUcYFwoezeGwcnlCocEdheWXc6SZ-_rVxo,5325
|
| 33 |
+
joblib/externals/loky/backend/process.py,sha256=4-Y94EoIrg4btsjTNxUBHAHhR96Nrugn_7_PGL6aU50,2018
|
| 34 |
+
joblib/externals/loky/backend/queues.py,sha256=eETFvbPHwKfdoYyOgNQCyKq_Zlm-lzH3fwwpUIh-_4U,7322
|
| 35 |
+
joblib/externals/loky/backend/reduction.py,sha256=861drQAefXTJjfFWAEWmYAS315d8lAyqWx0RgyxFw_0,6926
|
| 36 |
+
joblib/externals/loky/backend/resource_tracker.py,sha256=Jzbmb8otLR7etqhefKuZxAs1VvT1jV8d5Zev8vUcV6s,15403
|
| 37 |
+
joblib/externals/loky/backend/spawn.py,sha256=t4PzEJ3tjwoF9t8qnQUF9R7Q-LmBpDBIcHURWNznz8M,8626
|
| 38 |
+
joblib/externals/loky/backend/synchronize.py,sha256=nlDwBoLZB93m_l55qfZM_Ql-4L84PSYimoQqt5TzpDk,11768
|
| 39 |
+
joblib/externals/loky/backend/utils.py,sha256=RVsxqyET4TJdbjc9uUHJmfhlQ2v4Uq-fiT_5b5rfC0s,5757
|
| 40 |
+
joblib/externals/loky/cloudpickle_wrapper.py,sha256=jUnfhXI3qMXTlCeTUzpABQlv0VOLMJL1V7fpRlq2LgU,3609
|
| 41 |
+
joblib/externals/loky/initializers.py,sha256=dtKtRsJUmVwiJu0yZ-Ih0m8PvW_MxmouG7mShEcsStc,2567
|
| 42 |
+
joblib/externals/loky/process_executor.py,sha256=QPSKet0OCAWr6g_2fHwPt4yjQaAJsjfeJYFPiKhS9RE,52348
|
| 43 |
+
joblib/externals/loky/reusable_executor.py,sha256=d9ksrTnJS8549Oq50iG08u5pEhuMbhQ3oSYUSq0twNQ,10863
|
| 44 |
+
joblib/func_inspect.py,sha256=bhm_GpBe3H_Dmw5ripzP5BalA6wbq7ZFI3SEuAQbfek,14017
|
| 45 |
+
joblib/hashing.py,sha256=38MM0zRl0Ebk78Ij6cMdrQ8ibYZP0pCJxu3L4Yrw1sc,10694
|
| 46 |
+
joblib/logger.py,sha256=HK06qwNWJYInYIIXFYINAKCxjYxi0hoX45ckNKkogHQ,5342
|
| 47 |
+
joblib/memory.py,sha256=va7zWG9s_X6eE-Cm1junrH-QwKTnguin5cEJIhUXo98,45404
|
| 48 |
+
joblib/numpy_pickle.py,sha256=N_wQMf6_vgI71nRYLne0dc2kO6dfh0lkTaOZn8Tq5Hc,28791
|
| 49 |
+
joblib/numpy_pickle_compat.py,sha256=JOlSfMT1uDIztOyQ3dzYgp5fGVnzPVWBCqXjdIZsjLQ,8451
|
| 50 |
+
joblib/numpy_pickle_utils.py,sha256=j3GlI25QFvo-DTPn7uRptu-NtW16ztHM0DuglyQyEDI,9497
|
| 51 |
+
joblib/parallel.py,sha256=SkJYk-cTHC8oMvZU79SDXV61IZ10YIHbBYhrHB47yM8,86989
|
| 52 |
+
joblib/pool.py,sha256=JTc00PEAyPayo8mHdktmburp5OBsnNxwSQI4zzvtKYs,14134
|
| 53 |
+
joblib/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 54 |
+
joblib/test/common.py,sha256=vpjpcJgMbmr8H3skc3qsr_KC-u-ZnhVFRk2vAxmJqvA,2102
|
| 55 |
+
joblib/test/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 56 |
+
joblib/test/data/create_numpy_pickle.py,sha256=vZE7JNye9o0gYaxrn1555av6Igee0KeXacAWKNRhsu8,3334
|
| 57 |
+
joblib/test/data/joblib_0.10.0_compressed_pickle_py27_np16.gz,sha256=QYRH6Q2DSGVorjCSqWCxjTWCMOJKyew4Nl2qmfQVvQ8,769
|
| 58 |
+
joblib/test/data/joblib_0.10.0_compressed_pickle_py27_np17.gz,sha256=ofTozM_KlPJa50TR8FCwc09mMmO6OO0GQhgUBLNIsXs,757
|
| 59 |
+
joblib/test/data/joblib_0.10.0_compressed_pickle_py33_np18.gz,sha256=2eIVeA-XjOaT5IEQ6tI2UuHG3hwhiRciMmkBmPcIh4g,792
|
| 60 |
+
joblib/test/data/joblib_0.10.0_compressed_pickle_py34_np19.gz,sha256=Gr2z_1tVWDH1H3_wCVHmakknf8KqeHKT8Yz4d1vmUCM,794
|
| 61 |
+
joblib/test/data/joblib_0.10.0_compressed_pickle_py35_np19.gz,sha256=pWw_xuDbOkECqu1KGf1OFU7s2VbzC2v5F5iXhE7TwB4,790
|
| 62 |
+
joblib/test/data/joblib_0.10.0_pickle_py27_np17.pkl,sha256=icRQjj374B-AHk5znxre0T9oWUHokoHIBQ8MqKo8l-U,986
|
| 63 |
+
joblib/test/data/joblib_0.10.0_pickle_py27_np17.pkl.bz2,sha256=oYQVIyMiUxyRgWSuBBSOvCWKzToA-kUpcoQWdV4UoV4,997
|
| 64 |
+
joblib/test/data/joblib_0.10.0_pickle_py27_np17.pkl.gzip,sha256=Jpv3iGcDgKTv-O4nZsUreIbUK7qnt2cugZ-VMgNeEDQ,798
|
| 65 |
+
joblib/test/data/joblib_0.10.0_pickle_py27_np17.pkl.lzma,sha256=c0wu0x8pPv4BcStj7pE61rZpf68FLG_pNzQZ4e82zH8,660
|
| 66 |
+
joblib/test/data/joblib_0.10.0_pickle_py27_np17.pkl.xz,sha256=77FG1FDG0GHQav-1bxc4Tn9ky6ubUW_MbE0_iGmz5wc,712
|
| 67 |
+
joblib/test/data/joblib_0.10.0_pickle_py33_np18.pkl,sha256=4GTC7s_cWNVShERn2nvVbspZYJgyK_0man4TEqvdVzU,1068
|
| 68 |
+
joblib/test/data/joblib_0.10.0_pickle_py33_np18.pkl.bz2,sha256=6G1vbs_iYmz2kYJ6w4qB1k7D67UnxUMus0S4SWeBtFo,1000
|
| 69 |
+
joblib/test/data/joblib_0.10.0_pickle_py33_np18.pkl.gzip,sha256=tlRUWeJS1BXmcwtLNSNK9L0hDHekFl07CqWxTShinmY,831
|
| 70 |
+
joblib/test/data/joblib_0.10.0_pickle_py33_np18.pkl.lzma,sha256=CorPwnfv3rR5hjNtJI01-sEBMOnkSxNlRVaWTszMopA,694
|
| 71 |
+
joblib/test/data/joblib_0.10.0_pickle_py33_np18.pkl.xz,sha256=Dppj3MffOKsKETeptEtDaxPOv6MA6xnbpK5LzlDQ-oE,752
|
| 72 |
+
joblib/test/data/joblib_0.10.0_pickle_py34_np19.pkl,sha256=HL5Fb1uR9aPLjjhoOPJ2wwM1Qyo1FCZoYYd2HVw0Fos,1068
|
| 73 |
+
joblib/test/data/joblib_0.10.0_pickle_py34_np19.pkl.bz2,sha256=Pyr2fqZnwfUxXdyrBr-kRwBYY8HA_Yi7fgSguKy5pUs,1021
|
| 74 |
+
joblib/test/data/joblib_0.10.0_pickle_py34_np19.pkl.gzip,sha256=os8NJjQI9FhnlZM-Ay9dX_Uo35gZnoJCgQSIVvcBPfE,831
|
| 75 |
+
joblib/test/data/joblib_0.10.0_pickle_py34_np19.pkl.lzma,sha256=Q_0y43qU7_GqAabJ8y3PWVhOisurnCAq3GzuCu04V58,697
|
| 76 |
+
joblib/test/data/joblib_0.10.0_pickle_py34_np19.pkl.xz,sha256=BNfmiQfpeLVpdfkwlJK4hJ5Cpgl0vreVyekyc5d_PNM,752
|
| 77 |
+
joblib/test/data/joblib_0.10.0_pickle_py35_np19.pkl,sha256=l7nvLolhBDIdPFznOz3lBHiMOPBPCMi1bXop1tFSCpY,1068
|
| 78 |
+
joblib/test/data/joblib_0.10.0_pickle_py35_np19.pkl.bz2,sha256=pqGpuIS-ZU4uP8mkglHs8MaSDiVcPy7l3XHYJSppRgY,1005
|
| 79 |
+
joblib/test/data/joblib_0.10.0_pickle_py35_np19.pkl.gzip,sha256=YRFXE6LEb6qK72yPqnXdqQVY8Ts8xKUS9PWQKhLxWvk,833
|
| 80 |
+
joblib/test/data/joblib_0.10.0_pickle_py35_np19.pkl.lzma,sha256=Bf7gCUeTuTjCkbcIdyZYz69irblX4SAVQEzxCnMQhNU,701
|
| 81 |
+
joblib/test/data/joblib_0.10.0_pickle_py35_np19.pkl.xz,sha256=As8w2LGWwwNmKy3QNdKljK63Yq46gjRf_RJ0lh5_WqA,752
|
| 82 |
+
joblib/test/data/joblib_0.11.0_compressed_pickle_py36_np111.gz,sha256=1WrnXDqDoNEPYOZX1Q5Wr2463b8vVV6fw4Wm5S4bMt4,800
|
| 83 |
+
joblib/test/data/joblib_0.11.0_pickle_py36_np111.pkl,sha256=XmsOFxeC1f1aYdGETclG6yfF9rLoB11DayOAhDMULrw,1068
|
| 84 |
+
joblib/test/data/joblib_0.11.0_pickle_py36_np111.pkl.bz2,sha256=vI2yWb50LKL_NgZyd_XkoD5teIg93uI42mWnx9ee-AQ,991
|
| 85 |
+
joblib/test/data/joblib_0.11.0_pickle_py36_np111.pkl.gzip,sha256=1WrnXDqDoNEPYOZX1Q5Wr2463b8vVV6fw4Wm5S4bMt4,800
|
| 86 |
+
joblib/test/data/joblib_0.11.0_pickle_py36_np111.pkl.lzma,sha256=IWA0JlZG2ur53HgTUDl1m7q79dcVq6b0VOq33gKoJU0,715
|
| 87 |
+
joblib/test/data/joblib_0.11.0_pickle_py36_np111.pkl.xz,sha256=3Xh_NbMZdBjYx7ynfJ3Fyke28izSRSSzzNB0z5D4k9Y,752
|
| 88 |
+
joblib/test/data/joblib_0.8.4_compressed_pickle_py27_np17.gz,sha256=Sp-ZT7i6pj5on2gbptszu7RarzJpOmHJ67UKOmCPQMg,659
|
| 89 |
+
joblib/test/data/joblib_0.9.2_compressed_pickle_py27_np16.gz,sha256=NLtDrvo2XIH0KvUUAvhOqMeoXEjGW0IuTk_osu5XiDw,658
|
| 90 |
+
joblib/test/data/joblib_0.9.2_compressed_pickle_py27_np17.gz,sha256=NLtDrvo2XIH0KvUUAvhOqMeoXEjGW0IuTk_osu5XiDw,658
|
| 91 |
+
joblib/test/data/joblib_0.9.2_compressed_pickle_py34_np19.gz,sha256=nzO9iiGkG3KbBdrF3usOho8higkrDj_lmICUzxZyF_Y,673
|
| 92 |
+
joblib/test/data/joblib_0.9.2_compressed_pickle_py35_np19.gz,sha256=nzO9iiGkG3KbBdrF3usOho8higkrDj_lmICUzxZyF_Y,673
|
| 93 |
+
joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl,sha256=naijdk2xIeKdIa3mfJw0JlmOdtiN6uRM1yOJg6-M73M,670
|
| 94 |
+
joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_01.npy,sha256=DvvX2c5-7DpuCg20HnleA5bMo9awN9rWxhtGSEPSiAk,120
|
| 95 |
+
joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_02.npy,sha256=HBzzbLeB-8whuVO7CgtF3wktoOrg52WILlljzNcBBbE,120
|
| 96 |
+
joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_03.npy,sha256=oMRa4qKJhBy-uiRDt-uqOzHAqencxzKUrKVynaAJJAU,236
|
| 97 |
+
joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_04.npy,sha256=PsviRClLqT4IR5sWwbmpQR41af9mDtBFncodJBOB3wU,104
|
| 98 |
+
joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl,sha256=LynX8dLOygfxDfFywOgm7wgWOhSxLG7z-oDsU6X83Dw,670
|
| 99 |
+
joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl_01.npy,sha256=DvvX2c5-7DpuCg20HnleA5bMo9awN9rWxhtGSEPSiAk,120
|
| 100 |
+
joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl_02.npy,sha256=HBzzbLeB-8whuVO7CgtF3wktoOrg52WILlljzNcBBbE,120
|
| 101 |
+
joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl_03.npy,sha256=oMRa4qKJhBy-uiRDt-uqOzHAqencxzKUrKVynaAJJAU,236
|
| 102 |
+
joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl_04.npy,sha256=PsviRClLqT4IR5sWwbmpQR41af9mDtBFncodJBOB3wU,104
|
| 103 |
+
joblib/test/data/joblib_0.9.2_pickle_py33_np18.pkl,sha256=w9TLxpDTzp5TI6cU6lRvMsAasXEChcQgGE9s30sm_CU,691
|
| 104 |
+
joblib/test/data/joblib_0.9.2_pickle_py33_np18.pkl_01.npy,sha256=DvvX2c5-7DpuCg20HnleA5bMo9awN9rWxhtGSEPSiAk,120
|
| 105 |
+
joblib/test/data/joblib_0.9.2_pickle_py33_np18.pkl_02.npy,sha256=HBzzbLeB-8whuVO7CgtF3wktoOrg52WILlljzNcBBbE,120
|
| 106 |
+
joblib/test/data/joblib_0.9.2_pickle_py33_np18.pkl_03.npy,sha256=jt6aZKUrJdfbMJUJVsl47As5MrfRSs1avGMhbmS6vec,307
|
| 107 |
+
joblib/test/data/joblib_0.9.2_pickle_py33_np18.pkl_04.npy,sha256=PsviRClLqT4IR5sWwbmpQR41af9mDtBFncodJBOB3wU,104
|
| 108 |
+
joblib/test/data/joblib_0.9.2_pickle_py34_np19.pkl,sha256=ilOBAOaulLFvKrD32S1NfnpiK-LfzA9rC3O2I7xROuI,691
|
| 109 |
+
joblib/test/data/joblib_0.9.2_pickle_py34_np19.pkl_01.npy,sha256=DvvX2c5-7DpuCg20HnleA5bMo9awN9rWxhtGSEPSiAk,120
|
| 110 |
+
joblib/test/data/joblib_0.9.2_pickle_py34_np19.pkl_02.npy,sha256=HBzzbLeB-8whuVO7CgtF3wktoOrg52WILlljzNcBBbE,120
|
| 111 |
+
joblib/test/data/joblib_0.9.2_pickle_py34_np19.pkl_03.npy,sha256=jt6aZKUrJdfbMJUJVsl47As5MrfRSs1avGMhbmS6vec,307
|
| 112 |
+
joblib/test/data/joblib_0.9.2_pickle_py34_np19.pkl_04.npy,sha256=PsviRClLqT4IR5sWwbmpQR41af9mDtBFncodJBOB3wU,104
|
| 113 |
+
joblib/test/data/joblib_0.9.2_pickle_py35_np19.pkl,sha256=WfDVIqKcMzzh1gSAshIfzBoIpdLdZQuG79yYf5kfpOo,691
|
| 114 |
+
joblib/test/data/joblib_0.9.2_pickle_py35_np19.pkl_01.npy,sha256=DvvX2c5-7DpuCg20HnleA5bMo9awN9rWxhtGSEPSiAk,120
|
| 115 |
+
joblib/test/data/joblib_0.9.2_pickle_py35_np19.pkl_02.npy,sha256=HBzzbLeB-8whuVO7CgtF3wktoOrg52WILlljzNcBBbE,120
|
| 116 |
+
joblib/test/data/joblib_0.9.2_pickle_py35_np19.pkl_03.npy,sha256=jt6aZKUrJdfbMJUJVsl47As5MrfRSs1avGMhbmS6vec,307
|
| 117 |
+
joblib/test/data/joblib_0.9.2_pickle_py35_np19.pkl_04.npy,sha256=PsviRClLqT4IR5sWwbmpQR41af9mDtBFncodJBOB3wU,104
|
| 118 |
+
joblib/test/data/joblib_0.9.4.dev0_compressed_cache_size_pickle_py35_np19.gz,sha256=8jYfWJsx0oY2J-3LlmEigK5cClnJSW2J2rfeSTZw-Ts,802
|
| 119 |
+
joblib/test/data/joblib_0.9.4.dev0_compressed_cache_size_pickle_py35_np19.gz_01.npy.z,sha256=YT9VvT3sEl2uWlOyvH2CkyE9Sok4od9O3kWtgeuUUqE,43
|
| 120 |
+
joblib/test/data/joblib_0.9.4.dev0_compressed_cache_size_pickle_py35_np19.gz_02.npy.z,sha256=txA5RDI0PRuiU_UNKY8pGp-zQgQQ9vaVvMi60hOPaVs,43
|
| 121 |
+
joblib/test/data/joblib_0.9.4.dev0_compressed_cache_size_pickle_py35_np19.gz_03.npy.z,sha256=d3AwICvU2MpSNjh2aPIsdJeGZLlDjANAF1Soa6uM0Po,37
|
| 122 |
+
joblib/test/test_backports.py,sha256=ONt0JUPV1etZCO9DTLur1h84XmgHZYK_k73qmp4kRgg,1175
|
| 123 |
+
joblib/test/test_cloudpickle_wrapper.py,sha256=9jx3hqNVO9GXdVHCxr9mN-GiLR0XK-O5d6YPaaG8Y14,729
|
| 124 |
+
joblib/test/test_config.py,sha256=1Z102AO7Gb8Z8mHYahnZy2fxBA-9_vY0ZtWyNNk1cf4,5255
|
| 125 |
+
joblib/test/test_dask.py,sha256=X2MBEYvz5WQwzGZRN04JNgk_75iIHF96yA1F1t1sK_Y,22932
|
| 126 |
+
joblib/test/test_disk.py,sha256=0EaWGENlosrqwrSZvquPQw3jhqay1KD1NRlQ6YLHOOM,2223
|
| 127 |
+
joblib/test/test_func_inspect.py,sha256=RsORR-j48SfXrNBQbb5i-SdmfU7zk2Mr0IKvcu8m1tw,9314
|
| 128 |
+
joblib/test/test_func_inspect_special_encoding.py,sha256=5xILDjSO-xtjQAMLvMeVD-L7IG4ZURb2gvBiShaDE78,145
|
| 129 |
+
joblib/test/test_hashing.py,sha256=wZeTJMX8C8ua3fJsKAI7MKtperUfZf1fLt0ZaOjvSKw,15820
|
| 130 |
+
joblib/test/test_init.py,sha256=Y6y6Hcqa_cqwQ8S8ozUQ180y_RfkRajfZ_fDp2UXgbw,423
|
| 131 |
+
joblib/test/test_logger.py,sha256=FA9ohTNcqIFViQK60_rwZ5PEGL2zoYN5qBOrDwFqVzI,941
|
| 132 |
+
joblib/test/test_memmapping.py,sha256=z0aanbEs3yCDKShyW3IYlLkTARwdvqVTb4beTPRFmjk,43731
|
| 133 |
+
joblib/test/test_memory.py,sha256=vTlNABkQzzHtRU_cXGr9eOEvrHAw7EEBmegMbX-gqZw,50660
|
| 134 |
+
joblib/test/test_memory_async.py,sha256=tUoCI9dngR2AuJjAAKXElJIiz2Qm4AJGdXKn9c8lWaM,5245
|
| 135 |
+
joblib/test/test_missing_multiprocessing.py,sha256=FVoS91krFZogIoDFScyZuJPpaeiq6O-aLAxug0qCQyY,1171
|
| 136 |
+
joblib/test/test_module.py,sha256=IABzz5JmdeY_Adk_vZ0776JN94Ra7tWxDA7DPDNdJKI,1942
|
| 137 |
+
joblib/test/test_numpy_pickle.py,sha256=QExCnBSG-EXdVKnoDkJjNFk6kbX0FDeGeR50wtLHiso,42130
|
| 138 |
+
joblib/test/test_numpy_pickle_compat.py,sha256=paMz1G3Fr9SHdjFmKcG1ec6B5h_S-XE6WRtfHmX9r50,609
|
| 139 |
+
joblib/test/test_numpy_pickle_utils.py,sha256=iB2Ve1TYYUEN3DQiNB5qUxk_QxeIXl7Jpgv4TwkFWTY,382
|
| 140 |
+
joblib/test/test_parallel.py,sha256=_13kli8GYyclwh2QsxysXrRJa44o3gb3FEpSY61ag94,78095
|
| 141 |
+
joblib/test/test_store_backends.py,sha256=DyK1f7PTSPErzhk27gaRoMe2UQrstIz6fnvZh4hKIf0,3057
|
| 142 |
+
joblib/test/test_testing.py,sha256=jL-Ph5pzUJSXOgY2rqbjMRp2y3i3CCWmEi-Lbw4Wzr8,2520
|
| 143 |
+
joblib/test/test_utils.py,sha256=urXuyQ40OV5sLMoNx30Azh3hGr-yJqiMtHRJwBb8mw0,570
|
| 144 |
+
joblib/test/testutils.py,sha256=A1bm-A5Ydis2iZJVI2-r3aFKUufWR42NZ8Yttrp8mzg,252
|
| 145 |
+
joblib/testing.py,sha256=lK8HOBvrpXcTYUCSvpE-M2ede_dTVJzcmyw-9BrBsOc,3029
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/joblib-1.5.2.dist-info/REQUESTED
ADDED
|
File without changes
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/joblib-1.5.2.dist-info/WHEEL
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Wheel-Version: 1.0
|
| 2 |
+
Generator: setuptools (80.9.0)
|
| 3 |
+
Root-Is-Purelib: true
|
| 4 |
+
Tag: py3-none-any
|
| 5 |
+
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/joblib-1.5.2.dist-info/licenses/LICENSE.txt
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
BSD 3-Clause License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2008-2021, The joblib developers.
|
| 4 |
+
All rights reserved.
|
| 5 |
+
|
| 6 |
+
Redistribution and use in source and binary forms, with or without
|
| 7 |
+
modification, are permitted provided that the following conditions are met:
|
| 8 |
+
|
| 9 |
+
* Redistributions of source code must retain the above copyright notice, this
|
| 10 |
+
list of conditions and the following disclaimer.
|
| 11 |
+
|
| 12 |
+
* Redistributions in binary form must reproduce the above copyright notice,
|
| 13 |
+
this list of conditions and the following disclaimer in the documentation
|
| 14 |
+
and/or other materials provided with the distribution.
|
| 15 |
+
|
| 16 |
+
* Neither the name of the copyright holder nor the names of its
|
| 17 |
+
contributors may be used to endorse or promote products derived from
|
| 18 |
+
this software without specific prior written permission.
|
| 19 |
+
|
| 20 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 21 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 22 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 23 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
| 24 |
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
| 25 |
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 26 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
| 27 |
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
| 28 |
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 29 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/joblib-1.5.2.dist-info/top_level.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
joblib
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__config__.py
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file is generated by numpy's build process
|
| 2 |
+
# It contains system_info results at the time of building this package.
|
| 3 |
+
from enum import Enum
|
| 4 |
+
from numpy._core._multiarray_umath import (
|
| 5 |
+
__cpu_features__,
|
| 6 |
+
__cpu_baseline__,
|
| 7 |
+
__cpu_dispatch__,
|
| 8 |
+
)
|
| 9 |
+
|
| 10 |
+
__all__ = ["show_config"]
|
| 11 |
+
_built_with_meson = True
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
class DisplayModes(Enum):
|
| 15 |
+
stdout = "stdout"
|
| 16 |
+
dicts = "dicts"
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def _cleanup(d):
|
| 20 |
+
"""
|
| 21 |
+
Removes empty values in a `dict` recursively
|
| 22 |
+
This ensures we remove values that Meson could not provide to CONFIG
|
| 23 |
+
"""
|
| 24 |
+
if isinstance(d, dict):
|
| 25 |
+
return {k: _cleanup(v) for k, v in d.items() if v and _cleanup(v)}
|
| 26 |
+
else:
|
| 27 |
+
return d
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
CONFIG = _cleanup(
|
| 31 |
+
{
|
| 32 |
+
"Compilers": {
|
| 33 |
+
"c": {
|
| 34 |
+
"name": "gcc",
|
| 35 |
+
"linker": r"ld.bfd",
|
| 36 |
+
"version": "10.2.1",
|
| 37 |
+
"commands": r"cc",
|
| 38 |
+
"args": r"",
|
| 39 |
+
"linker args": r"",
|
| 40 |
+
},
|
| 41 |
+
"cython": {
|
| 42 |
+
"name": "cython",
|
| 43 |
+
"linker": r"cython",
|
| 44 |
+
"version": "3.1.0",
|
| 45 |
+
"commands": r"cython",
|
| 46 |
+
"args": r"",
|
| 47 |
+
"linker args": r"",
|
| 48 |
+
},
|
| 49 |
+
"c++": {
|
| 50 |
+
"name": "gcc",
|
| 51 |
+
"linker": r"ld.bfd",
|
| 52 |
+
"version": "10.2.1",
|
| 53 |
+
"commands": r"c++",
|
| 54 |
+
"args": r"",
|
| 55 |
+
"linker args": r"",
|
| 56 |
+
},
|
| 57 |
+
},
|
| 58 |
+
"Machine Information": {
|
| 59 |
+
"host": {
|
| 60 |
+
"cpu": "x86_64",
|
| 61 |
+
"family": "x86_64",
|
| 62 |
+
"endian": "little",
|
| 63 |
+
"system": "linux",
|
| 64 |
+
},
|
| 65 |
+
"build": {
|
| 66 |
+
"cpu": "x86_64",
|
| 67 |
+
"family": "x86_64",
|
| 68 |
+
"endian": "little",
|
| 69 |
+
"system": "linux",
|
| 70 |
+
},
|
| 71 |
+
"cross-compiled": bool("False".lower().replace("false", "")),
|
| 72 |
+
},
|
| 73 |
+
"Build Dependencies": {
|
| 74 |
+
"blas": {
|
| 75 |
+
"name": "scipy-openblas",
|
| 76 |
+
"found": bool("True".lower().replace("false", "")),
|
| 77 |
+
"version": "0.3.29",
|
| 78 |
+
"detection method": "pkgconfig",
|
| 79 |
+
"include directory": r"/opt/_internal/cpython-3.10.15/lib/python3.10/site-packages/scipy_openblas64/include",
|
| 80 |
+
"lib directory": r"/opt/_internal/cpython-3.10.15/lib/python3.10/site-packages/scipy_openblas64/lib",
|
| 81 |
+
"openblas configuration": r"OpenBLAS 0.3.29 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64",
|
| 82 |
+
"pc file directory": r"/project/.openblas",
|
| 83 |
+
},
|
| 84 |
+
"lapack": {
|
| 85 |
+
"name": "scipy-openblas",
|
| 86 |
+
"found": bool("True".lower().replace("false", "")),
|
| 87 |
+
"version": "0.3.29",
|
| 88 |
+
"detection method": "pkgconfig",
|
| 89 |
+
"include directory": r"/opt/_internal/cpython-3.10.15/lib/python3.10/site-packages/scipy_openblas64/include",
|
| 90 |
+
"lib directory": r"/opt/_internal/cpython-3.10.15/lib/python3.10/site-packages/scipy_openblas64/lib",
|
| 91 |
+
"openblas configuration": r"OpenBLAS 0.3.29 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64",
|
| 92 |
+
"pc file directory": r"/project/.openblas",
|
| 93 |
+
},
|
| 94 |
+
},
|
| 95 |
+
"Python Information": {
|
| 96 |
+
"path": r"/tmp/build-env-a8ncef9o/bin/python",
|
| 97 |
+
"version": "3.10",
|
| 98 |
+
},
|
| 99 |
+
"SIMD Extensions": {
|
| 100 |
+
"baseline": __cpu_baseline__,
|
| 101 |
+
"found": [
|
| 102 |
+
feature for feature in __cpu_dispatch__ if __cpu_features__[feature]
|
| 103 |
+
],
|
| 104 |
+
"not found": [
|
| 105 |
+
feature for feature in __cpu_dispatch__ if not __cpu_features__[feature]
|
| 106 |
+
],
|
| 107 |
+
},
|
| 108 |
+
}
|
| 109 |
+
)
|
| 110 |
+
|
| 111 |
+
|
| 112 |
+
def _check_pyyaml():
|
| 113 |
+
import yaml
|
| 114 |
+
|
| 115 |
+
return yaml
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
def show(mode=DisplayModes.stdout.value):
|
| 119 |
+
"""
|
| 120 |
+
Show libraries and system information on which NumPy was built
|
| 121 |
+
and is being used
|
| 122 |
+
|
| 123 |
+
Parameters
|
| 124 |
+
----------
|
| 125 |
+
mode : {`'stdout'`, `'dicts'`}, optional.
|
| 126 |
+
Indicates how to display the config information.
|
| 127 |
+
`'stdout'` prints to console, `'dicts'` returns a dictionary
|
| 128 |
+
of the configuration.
|
| 129 |
+
|
| 130 |
+
Returns
|
| 131 |
+
-------
|
| 132 |
+
out : {`dict`, `None`}
|
| 133 |
+
If mode is `'dicts'`, a dict is returned, else None
|
| 134 |
+
|
| 135 |
+
See Also
|
| 136 |
+
--------
|
| 137 |
+
get_include : Returns the directory containing NumPy C
|
| 138 |
+
header files.
|
| 139 |
+
|
| 140 |
+
Notes
|
| 141 |
+
-----
|
| 142 |
+
1. The `'stdout'` mode will give more readable
|
| 143 |
+
output if ``pyyaml`` is installed
|
| 144 |
+
|
| 145 |
+
"""
|
| 146 |
+
if mode == DisplayModes.stdout.value:
|
| 147 |
+
try: # Non-standard library, check import
|
| 148 |
+
yaml = _check_pyyaml()
|
| 149 |
+
|
| 150 |
+
print(yaml.dump(CONFIG))
|
| 151 |
+
except ModuleNotFoundError:
|
| 152 |
+
import warnings
|
| 153 |
+
import json
|
| 154 |
+
|
| 155 |
+
warnings.warn("Install `pyyaml` for better output", stacklevel=1)
|
| 156 |
+
print(json.dumps(CONFIG, indent=2))
|
| 157 |
+
elif mode == DisplayModes.dicts.value:
|
| 158 |
+
return CONFIG
|
| 159 |
+
else:
|
| 160 |
+
raise AttributeError(
|
| 161 |
+
f"Invalid `mode`, use one of: {', '.join([e.value for e in DisplayModes])}"
|
| 162 |
+
)
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
def show_config(mode=DisplayModes.stdout.value):
|
| 166 |
+
return show(mode)
|
| 167 |
+
|
| 168 |
+
|
| 169 |
+
show_config.__doc__ = show.__doc__
|
| 170 |
+
show_config.__module__ = "numpy"
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__config__.pyi
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from enum import Enum
|
| 2 |
+
from types import ModuleType
|
| 3 |
+
from typing import Final, Literal as L, TypedDict, overload, type_check_only
|
| 4 |
+
from typing_extensions import NotRequired
|
| 5 |
+
|
| 6 |
+
_CompilerConfigDictValue = TypedDict(
|
| 7 |
+
"_CompilerConfigDictValue",
|
| 8 |
+
{
|
| 9 |
+
"name": str,
|
| 10 |
+
"linker": str,
|
| 11 |
+
"version": str,
|
| 12 |
+
"commands": str,
|
| 13 |
+
"args": str,
|
| 14 |
+
"linker args": str,
|
| 15 |
+
},
|
| 16 |
+
)
|
| 17 |
+
_CompilerConfigDict = TypedDict(
|
| 18 |
+
"_CompilerConfigDict",
|
| 19 |
+
{
|
| 20 |
+
"c": _CompilerConfigDictValue,
|
| 21 |
+
"cython": _CompilerConfigDictValue,
|
| 22 |
+
"c++": _CompilerConfigDictValue,
|
| 23 |
+
},
|
| 24 |
+
)
|
| 25 |
+
_MachineInformationDict = TypedDict(
|
| 26 |
+
"_MachineInformationDict",
|
| 27 |
+
{
|
| 28 |
+
"host":_MachineInformationDictValue,
|
| 29 |
+
"build": _MachineInformationDictValue,
|
| 30 |
+
"cross-compiled": NotRequired[L[True]],
|
| 31 |
+
},
|
| 32 |
+
)
|
| 33 |
+
|
| 34 |
+
@type_check_only
|
| 35 |
+
class _MachineInformationDictValue(TypedDict):
|
| 36 |
+
cpu: str
|
| 37 |
+
family: str
|
| 38 |
+
endian: L["little", "big"]
|
| 39 |
+
system: str
|
| 40 |
+
|
| 41 |
+
_BuildDependenciesDictValue = TypedDict(
|
| 42 |
+
"_BuildDependenciesDictValue",
|
| 43 |
+
{
|
| 44 |
+
"name": str,
|
| 45 |
+
"found": NotRequired[L[True]],
|
| 46 |
+
"version": str,
|
| 47 |
+
"include directory": str,
|
| 48 |
+
"lib directory": str,
|
| 49 |
+
"openblas configuration": str,
|
| 50 |
+
"pc file directory": str,
|
| 51 |
+
},
|
| 52 |
+
)
|
| 53 |
+
|
| 54 |
+
class _BuildDependenciesDict(TypedDict):
|
| 55 |
+
blas: _BuildDependenciesDictValue
|
| 56 |
+
lapack: _BuildDependenciesDictValue
|
| 57 |
+
|
| 58 |
+
class _PythonInformationDict(TypedDict):
|
| 59 |
+
path: str
|
| 60 |
+
version: str
|
| 61 |
+
|
| 62 |
+
_SIMDExtensionsDict = TypedDict(
|
| 63 |
+
"_SIMDExtensionsDict",
|
| 64 |
+
{
|
| 65 |
+
"baseline": list[str],
|
| 66 |
+
"found": list[str],
|
| 67 |
+
"not found": list[str],
|
| 68 |
+
},
|
| 69 |
+
)
|
| 70 |
+
|
| 71 |
+
_ConfigDict = TypedDict(
|
| 72 |
+
"_ConfigDict",
|
| 73 |
+
{
|
| 74 |
+
"Compilers": _CompilerConfigDict,
|
| 75 |
+
"Machine Information": _MachineInformationDict,
|
| 76 |
+
"Build Dependencies": _BuildDependenciesDict,
|
| 77 |
+
"Python Information": _PythonInformationDict,
|
| 78 |
+
"SIMD Extensions": _SIMDExtensionsDict,
|
| 79 |
+
},
|
| 80 |
+
)
|
| 81 |
+
|
| 82 |
+
###
|
| 83 |
+
|
| 84 |
+
__all__ = ["show_config"]
|
| 85 |
+
|
| 86 |
+
CONFIG: Final[_ConfigDict] = ...
|
| 87 |
+
|
| 88 |
+
class DisplayModes(Enum):
|
| 89 |
+
stdout = "stdout"
|
| 90 |
+
dicts = "dicts"
|
| 91 |
+
|
| 92 |
+
def _check_pyyaml() -> ModuleType: ...
|
| 93 |
+
|
| 94 |
+
@overload
|
| 95 |
+
def show(mode: L["stdout"] = "stdout") -> None: ...
|
| 96 |
+
@overload
|
| 97 |
+
def show(mode: L["dicts"]) -> _ConfigDict: ...
|
| 98 |
+
|
| 99 |
+
@overload
|
| 100 |
+
def show_config(mode: L["stdout"] = "stdout") -> None: ...
|
| 101 |
+
@overload
|
| 102 |
+
def show_config(mode: L["dicts"]) -> _ConfigDict: ...
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd
ADDED
|
@@ -0,0 +1,1250 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# NumPy static imports for Cython >= 3.0
|
| 2 |
+
#
|
| 3 |
+
# If any of the PyArray_* functions are called, import_array must be
|
| 4 |
+
# called first. This is done automatically by Cython 3.0+ if a call
|
| 5 |
+
# is not detected inside of the module.
|
| 6 |
+
#
|
| 7 |
+
# Author: Dag Sverre Seljebotn
|
| 8 |
+
#
|
| 9 |
+
|
| 10 |
+
from cpython.ref cimport Py_INCREF
|
| 11 |
+
from cpython.object cimport PyObject, PyTypeObject, PyObject_TypeCheck
|
| 12 |
+
cimport libc.stdio as stdio
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
cdef extern from *:
|
| 16 |
+
# Leave a marker that the NumPy declarations came from NumPy itself and not from Cython.
|
| 17 |
+
# See https://github.com/cython/cython/issues/3573
|
| 18 |
+
"""
|
| 19 |
+
/* Using NumPy API declarations from "numpy/__init__.cython-30.pxd" */
|
| 20 |
+
"""
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
cdef extern from "numpy/arrayobject.h":
|
| 24 |
+
# It would be nice to use size_t and ssize_t, but ssize_t has special
|
| 25 |
+
# implicit conversion rules, so just use "long".
|
| 26 |
+
# Note: The actual type only matters for Cython promotion, so long
|
| 27 |
+
# is closer than int, but could lead to incorrect promotion.
|
| 28 |
+
# (Not to worrying, and always the status-quo.)
|
| 29 |
+
ctypedef signed long npy_intp
|
| 30 |
+
ctypedef unsigned long npy_uintp
|
| 31 |
+
|
| 32 |
+
ctypedef unsigned char npy_bool
|
| 33 |
+
|
| 34 |
+
ctypedef signed char npy_byte
|
| 35 |
+
ctypedef signed short npy_short
|
| 36 |
+
ctypedef signed int npy_int
|
| 37 |
+
ctypedef signed long npy_long
|
| 38 |
+
ctypedef signed long long npy_longlong
|
| 39 |
+
|
| 40 |
+
ctypedef unsigned char npy_ubyte
|
| 41 |
+
ctypedef unsigned short npy_ushort
|
| 42 |
+
ctypedef unsigned int npy_uint
|
| 43 |
+
ctypedef unsigned long npy_ulong
|
| 44 |
+
ctypedef unsigned long long npy_ulonglong
|
| 45 |
+
|
| 46 |
+
ctypedef float npy_float
|
| 47 |
+
ctypedef double npy_double
|
| 48 |
+
ctypedef long double npy_longdouble
|
| 49 |
+
|
| 50 |
+
ctypedef signed char npy_int8
|
| 51 |
+
ctypedef signed short npy_int16
|
| 52 |
+
ctypedef signed int npy_int32
|
| 53 |
+
ctypedef signed long long npy_int64
|
| 54 |
+
ctypedef signed long long npy_int96
|
| 55 |
+
ctypedef signed long long npy_int128
|
| 56 |
+
|
| 57 |
+
ctypedef unsigned char npy_uint8
|
| 58 |
+
ctypedef unsigned short npy_uint16
|
| 59 |
+
ctypedef unsigned int npy_uint32
|
| 60 |
+
ctypedef unsigned long long npy_uint64
|
| 61 |
+
ctypedef unsigned long long npy_uint96
|
| 62 |
+
ctypedef unsigned long long npy_uint128
|
| 63 |
+
|
| 64 |
+
ctypedef float npy_float32
|
| 65 |
+
ctypedef double npy_float64
|
| 66 |
+
ctypedef long double npy_float80
|
| 67 |
+
ctypedef long double npy_float96
|
| 68 |
+
ctypedef long double npy_float128
|
| 69 |
+
|
| 70 |
+
ctypedef struct npy_cfloat:
|
| 71 |
+
pass
|
| 72 |
+
|
| 73 |
+
ctypedef struct npy_cdouble:
|
| 74 |
+
pass
|
| 75 |
+
|
| 76 |
+
ctypedef struct npy_clongdouble:
|
| 77 |
+
pass
|
| 78 |
+
|
| 79 |
+
ctypedef struct npy_complex64:
|
| 80 |
+
pass
|
| 81 |
+
|
| 82 |
+
ctypedef struct npy_complex128:
|
| 83 |
+
pass
|
| 84 |
+
|
| 85 |
+
ctypedef struct npy_complex160:
|
| 86 |
+
pass
|
| 87 |
+
|
| 88 |
+
ctypedef struct npy_complex192:
|
| 89 |
+
pass
|
| 90 |
+
|
| 91 |
+
ctypedef struct npy_complex256:
|
| 92 |
+
pass
|
| 93 |
+
|
| 94 |
+
ctypedef struct PyArray_Dims:
|
| 95 |
+
npy_intp *ptr
|
| 96 |
+
int len
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
cdef enum NPY_TYPES:
|
| 100 |
+
NPY_BOOL
|
| 101 |
+
NPY_BYTE
|
| 102 |
+
NPY_UBYTE
|
| 103 |
+
NPY_SHORT
|
| 104 |
+
NPY_USHORT
|
| 105 |
+
NPY_INT
|
| 106 |
+
NPY_UINT
|
| 107 |
+
NPY_LONG
|
| 108 |
+
NPY_ULONG
|
| 109 |
+
NPY_LONGLONG
|
| 110 |
+
NPY_ULONGLONG
|
| 111 |
+
NPY_FLOAT
|
| 112 |
+
NPY_DOUBLE
|
| 113 |
+
NPY_LONGDOUBLE
|
| 114 |
+
NPY_CFLOAT
|
| 115 |
+
NPY_CDOUBLE
|
| 116 |
+
NPY_CLONGDOUBLE
|
| 117 |
+
NPY_OBJECT
|
| 118 |
+
NPY_STRING
|
| 119 |
+
NPY_UNICODE
|
| 120 |
+
NPY_VOID
|
| 121 |
+
NPY_DATETIME
|
| 122 |
+
NPY_TIMEDELTA
|
| 123 |
+
NPY_NTYPES_LEGACY
|
| 124 |
+
NPY_NOTYPE
|
| 125 |
+
|
| 126 |
+
NPY_INT8
|
| 127 |
+
NPY_INT16
|
| 128 |
+
NPY_INT32
|
| 129 |
+
NPY_INT64
|
| 130 |
+
NPY_INT128
|
| 131 |
+
NPY_INT256
|
| 132 |
+
NPY_UINT8
|
| 133 |
+
NPY_UINT16
|
| 134 |
+
NPY_UINT32
|
| 135 |
+
NPY_UINT64
|
| 136 |
+
NPY_UINT128
|
| 137 |
+
NPY_UINT256
|
| 138 |
+
NPY_FLOAT16
|
| 139 |
+
NPY_FLOAT32
|
| 140 |
+
NPY_FLOAT64
|
| 141 |
+
NPY_FLOAT80
|
| 142 |
+
NPY_FLOAT96
|
| 143 |
+
NPY_FLOAT128
|
| 144 |
+
NPY_FLOAT256
|
| 145 |
+
NPY_COMPLEX32
|
| 146 |
+
NPY_COMPLEX64
|
| 147 |
+
NPY_COMPLEX128
|
| 148 |
+
NPY_COMPLEX160
|
| 149 |
+
NPY_COMPLEX192
|
| 150 |
+
NPY_COMPLEX256
|
| 151 |
+
NPY_COMPLEX512
|
| 152 |
+
|
| 153 |
+
NPY_INTP
|
| 154 |
+
NPY_UINTP
|
| 155 |
+
NPY_DEFAULT_INT # Not a compile time constant (normally)!
|
| 156 |
+
|
| 157 |
+
ctypedef enum NPY_ORDER:
|
| 158 |
+
NPY_ANYORDER
|
| 159 |
+
NPY_CORDER
|
| 160 |
+
NPY_FORTRANORDER
|
| 161 |
+
NPY_KEEPORDER
|
| 162 |
+
|
| 163 |
+
ctypedef enum NPY_CASTING:
|
| 164 |
+
NPY_NO_CASTING
|
| 165 |
+
NPY_EQUIV_CASTING
|
| 166 |
+
NPY_SAFE_CASTING
|
| 167 |
+
NPY_SAME_KIND_CASTING
|
| 168 |
+
NPY_UNSAFE_CASTING
|
| 169 |
+
|
| 170 |
+
ctypedef enum NPY_CLIPMODE:
|
| 171 |
+
NPY_CLIP
|
| 172 |
+
NPY_WRAP
|
| 173 |
+
NPY_RAISE
|
| 174 |
+
|
| 175 |
+
ctypedef enum NPY_SCALARKIND:
|
| 176 |
+
NPY_NOSCALAR,
|
| 177 |
+
NPY_BOOL_SCALAR,
|
| 178 |
+
NPY_INTPOS_SCALAR,
|
| 179 |
+
NPY_INTNEG_SCALAR,
|
| 180 |
+
NPY_FLOAT_SCALAR,
|
| 181 |
+
NPY_COMPLEX_SCALAR,
|
| 182 |
+
NPY_OBJECT_SCALAR
|
| 183 |
+
|
| 184 |
+
ctypedef enum NPY_SORTKIND:
|
| 185 |
+
NPY_QUICKSORT
|
| 186 |
+
NPY_HEAPSORT
|
| 187 |
+
NPY_MERGESORT
|
| 188 |
+
|
| 189 |
+
ctypedef enum NPY_SEARCHSIDE:
|
| 190 |
+
NPY_SEARCHLEFT
|
| 191 |
+
NPY_SEARCHRIGHT
|
| 192 |
+
|
| 193 |
+
enum:
|
| 194 |
+
# DEPRECATED since NumPy 1.7 ! Do not use in new code!
|
| 195 |
+
NPY_C_CONTIGUOUS
|
| 196 |
+
NPY_F_CONTIGUOUS
|
| 197 |
+
NPY_CONTIGUOUS
|
| 198 |
+
NPY_FORTRAN
|
| 199 |
+
NPY_OWNDATA
|
| 200 |
+
NPY_FORCECAST
|
| 201 |
+
NPY_ENSURECOPY
|
| 202 |
+
NPY_ENSUREARRAY
|
| 203 |
+
NPY_ELEMENTSTRIDES
|
| 204 |
+
NPY_ALIGNED
|
| 205 |
+
NPY_NOTSWAPPED
|
| 206 |
+
NPY_WRITEABLE
|
| 207 |
+
NPY_ARR_HAS_DESCR
|
| 208 |
+
|
| 209 |
+
NPY_BEHAVED
|
| 210 |
+
NPY_BEHAVED_NS
|
| 211 |
+
NPY_CARRAY
|
| 212 |
+
NPY_CARRAY_RO
|
| 213 |
+
NPY_FARRAY
|
| 214 |
+
NPY_FARRAY_RO
|
| 215 |
+
NPY_DEFAULT
|
| 216 |
+
|
| 217 |
+
NPY_IN_ARRAY
|
| 218 |
+
NPY_OUT_ARRAY
|
| 219 |
+
NPY_INOUT_ARRAY
|
| 220 |
+
NPY_IN_FARRAY
|
| 221 |
+
NPY_OUT_FARRAY
|
| 222 |
+
NPY_INOUT_FARRAY
|
| 223 |
+
|
| 224 |
+
NPY_UPDATE_ALL
|
| 225 |
+
|
| 226 |
+
enum:
|
| 227 |
+
# Added in NumPy 1.7 to replace the deprecated enums above.
|
| 228 |
+
NPY_ARRAY_C_CONTIGUOUS
|
| 229 |
+
NPY_ARRAY_F_CONTIGUOUS
|
| 230 |
+
NPY_ARRAY_OWNDATA
|
| 231 |
+
NPY_ARRAY_FORCECAST
|
| 232 |
+
NPY_ARRAY_ENSURECOPY
|
| 233 |
+
NPY_ARRAY_ENSUREARRAY
|
| 234 |
+
NPY_ARRAY_ELEMENTSTRIDES
|
| 235 |
+
NPY_ARRAY_ALIGNED
|
| 236 |
+
NPY_ARRAY_NOTSWAPPED
|
| 237 |
+
NPY_ARRAY_WRITEABLE
|
| 238 |
+
NPY_ARRAY_WRITEBACKIFCOPY
|
| 239 |
+
|
| 240 |
+
NPY_ARRAY_BEHAVED
|
| 241 |
+
NPY_ARRAY_BEHAVED_NS
|
| 242 |
+
NPY_ARRAY_CARRAY
|
| 243 |
+
NPY_ARRAY_CARRAY_RO
|
| 244 |
+
NPY_ARRAY_FARRAY
|
| 245 |
+
NPY_ARRAY_FARRAY_RO
|
| 246 |
+
NPY_ARRAY_DEFAULT
|
| 247 |
+
|
| 248 |
+
NPY_ARRAY_IN_ARRAY
|
| 249 |
+
NPY_ARRAY_OUT_ARRAY
|
| 250 |
+
NPY_ARRAY_INOUT_ARRAY
|
| 251 |
+
NPY_ARRAY_IN_FARRAY
|
| 252 |
+
NPY_ARRAY_OUT_FARRAY
|
| 253 |
+
NPY_ARRAY_INOUT_FARRAY
|
| 254 |
+
|
| 255 |
+
NPY_ARRAY_UPDATE_ALL
|
| 256 |
+
|
| 257 |
+
cdef enum:
|
| 258 |
+
NPY_MAXDIMS # 64 on NumPy 2.x and 32 on NumPy 1.x
|
| 259 |
+
NPY_RAVEL_AXIS # Used for functions like PyArray_Mean
|
| 260 |
+
|
| 261 |
+
ctypedef void (*PyArray_VectorUnaryFunc)(void *, void *, npy_intp, void *, void *)
|
| 262 |
+
|
| 263 |
+
ctypedef struct PyArray_ArrayDescr:
|
| 264 |
+
# shape is a tuple, but Cython doesn't support "tuple shape"
|
| 265 |
+
# inside a non-PyObject declaration, so we have to declare it
|
| 266 |
+
# as just a PyObject*.
|
| 267 |
+
PyObject* shape
|
| 268 |
+
|
| 269 |
+
ctypedef struct PyArray_Descr:
|
| 270 |
+
pass
|
| 271 |
+
|
| 272 |
+
ctypedef class numpy.dtype [object PyArray_Descr, check_size ignore]:
|
| 273 |
+
# Use PyDataType_* macros when possible, however there are no macros
|
| 274 |
+
# for accessing some of the fields, so some are defined.
|
| 275 |
+
cdef PyTypeObject* typeobj
|
| 276 |
+
cdef char kind
|
| 277 |
+
cdef char type
|
| 278 |
+
# Numpy sometimes mutates this without warning (e.g. it'll
|
| 279 |
+
# sometimes change "|" to "<" in shared dtype objects on
|
| 280 |
+
# little-endian machines). If this matters to you, use
|
| 281 |
+
# PyArray_IsNativeByteOrder(dtype.byteorder) instead of
|
| 282 |
+
# directly accessing this field.
|
| 283 |
+
cdef char byteorder
|
| 284 |
+
cdef int type_num
|
| 285 |
+
|
| 286 |
+
@property
|
| 287 |
+
cdef inline npy_intp itemsize(self) noexcept nogil:
|
| 288 |
+
return PyDataType_ELSIZE(self)
|
| 289 |
+
|
| 290 |
+
@property
|
| 291 |
+
cdef inline npy_intp alignment(self) noexcept nogil:
|
| 292 |
+
return PyDataType_ALIGNMENT(self)
|
| 293 |
+
|
| 294 |
+
# Use fields/names with care as they may be NULL. You must check
|
| 295 |
+
# for this using PyDataType_HASFIELDS.
|
| 296 |
+
@property
|
| 297 |
+
cdef inline object fields(self):
|
| 298 |
+
return <object>PyDataType_FIELDS(self)
|
| 299 |
+
|
| 300 |
+
@property
|
| 301 |
+
cdef inline tuple names(self):
|
| 302 |
+
return <tuple>PyDataType_NAMES(self)
|
| 303 |
+
|
| 304 |
+
# Use PyDataType_HASSUBARRAY to test whether this field is
|
| 305 |
+
# valid (the pointer can be NULL). Most users should access
|
| 306 |
+
# this field via the inline helper method PyDataType_SHAPE.
|
| 307 |
+
@property
|
| 308 |
+
cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
|
| 309 |
+
return PyDataType_SUBARRAY(self)
|
| 310 |
+
|
| 311 |
+
@property
|
| 312 |
+
cdef inline npy_uint64 flags(self) noexcept nogil:
|
| 313 |
+
"""The data types flags."""
|
| 314 |
+
return PyDataType_FLAGS(self)
|
| 315 |
+
|
| 316 |
+
|
| 317 |
+
ctypedef class numpy.flatiter [object PyArrayIterObject, check_size ignore]:
|
| 318 |
+
# Use through macros
|
| 319 |
+
pass
|
| 320 |
+
|
| 321 |
+
ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
|
| 322 |
+
|
| 323 |
+
@property
|
| 324 |
+
cdef inline int numiter(self) noexcept nogil:
|
| 325 |
+
"""The number of arrays that need to be broadcast to the same shape."""
|
| 326 |
+
return PyArray_MultiIter_NUMITER(self)
|
| 327 |
+
|
| 328 |
+
@property
|
| 329 |
+
cdef inline npy_intp size(self) noexcept nogil:
|
| 330 |
+
"""The total broadcasted size."""
|
| 331 |
+
return PyArray_MultiIter_SIZE(self)
|
| 332 |
+
|
| 333 |
+
@property
|
| 334 |
+
cdef inline npy_intp index(self) noexcept nogil:
|
| 335 |
+
"""The current (1-d) index into the broadcasted result."""
|
| 336 |
+
return PyArray_MultiIter_INDEX(self)
|
| 337 |
+
|
| 338 |
+
@property
|
| 339 |
+
cdef inline int nd(self) noexcept nogil:
|
| 340 |
+
"""The number of dimensions in the broadcasted result."""
|
| 341 |
+
return PyArray_MultiIter_NDIM(self)
|
| 342 |
+
|
| 343 |
+
@property
|
| 344 |
+
cdef inline npy_intp* dimensions(self) noexcept nogil:
|
| 345 |
+
"""The shape of the broadcasted result."""
|
| 346 |
+
return PyArray_MultiIter_DIMS(self)
|
| 347 |
+
|
| 348 |
+
@property
|
| 349 |
+
cdef inline void** iters(self) noexcept nogil:
|
| 350 |
+
"""An array of iterator objects that holds the iterators for the arrays to be broadcast together.
|
| 351 |
+
On return, the iterators are adjusted for broadcasting."""
|
| 352 |
+
return PyArray_MultiIter_ITERS(self)
|
| 353 |
+
|
| 354 |
+
|
| 355 |
+
ctypedef struct PyArrayObject:
|
| 356 |
+
# For use in situations where ndarray can't replace PyArrayObject*,
|
| 357 |
+
# like PyArrayObject**.
|
| 358 |
+
pass
|
| 359 |
+
|
| 360 |
+
ctypedef class numpy.ndarray [object PyArrayObject, check_size ignore]:
|
| 361 |
+
cdef __cythonbufferdefaults__ = {"mode": "strided"}
|
| 362 |
+
|
| 363 |
+
# NOTE: no field declarations since direct access is deprecated since NumPy 1.7
|
| 364 |
+
# Instead, we use properties that map to the corresponding C-API functions.
|
| 365 |
+
|
| 366 |
+
@property
|
| 367 |
+
cdef inline PyObject* base(self) noexcept nogil:
|
| 368 |
+
"""Returns a borrowed reference to the object owning the data/memory.
|
| 369 |
+
"""
|
| 370 |
+
return PyArray_BASE(self)
|
| 371 |
+
|
| 372 |
+
@property
|
| 373 |
+
cdef inline dtype descr(self):
|
| 374 |
+
"""Returns an owned reference to the dtype of the array.
|
| 375 |
+
"""
|
| 376 |
+
return <dtype>PyArray_DESCR(self)
|
| 377 |
+
|
| 378 |
+
@property
|
| 379 |
+
cdef inline int ndim(self) noexcept nogil:
|
| 380 |
+
"""Returns the number of dimensions in the array.
|
| 381 |
+
"""
|
| 382 |
+
return PyArray_NDIM(self)
|
| 383 |
+
|
| 384 |
+
@property
|
| 385 |
+
cdef inline npy_intp *shape(self) noexcept nogil:
|
| 386 |
+
"""Returns a pointer to the dimensions/shape of the array.
|
| 387 |
+
The number of elements matches the number of dimensions of the array (ndim).
|
| 388 |
+
Can return NULL for 0-dimensional arrays.
|
| 389 |
+
"""
|
| 390 |
+
return PyArray_DIMS(self)
|
| 391 |
+
|
| 392 |
+
@property
|
| 393 |
+
cdef inline npy_intp *strides(self) noexcept nogil:
|
| 394 |
+
"""Returns a pointer to the strides of the array.
|
| 395 |
+
The number of elements matches the number of dimensions of the array (ndim).
|
| 396 |
+
"""
|
| 397 |
+
return PyArray_STRIDES(self)
|
| 398 |
+
|
| 399 |
+
@property
|
| 400 |
+
cdef inline npy_intp size(self) noexcept nogil:
|
| 401 |
+
"""Returns the total size (in number of elements) of the array.
|
| 402 |
+
"""
|
| 403 |
+
return PyArray_SIZE(self)
|
| 404 |
+
|
| 405 |
+
@property
|
| 406 |
+
cdef inline char* data(self) noexcept nogil:
|
| 407 |
+
"""The pointer to the data buffer as a char*.
|
| 408 |
+
This is provided for legacy reasons to avoid direct struct field access.
|
| 409 |
+
For new code that needs this access, you probably want to cast the result
|
| 410 |
+
of `PyArray_DATA()` instead, which returns a 'void*'.
|
| 411 |
+
"""
|
| 412 |
+
return PyArray_BYTES(self)
|
| 413 |
+
|
| 414 |
+
|
| 415 |
+
int _import_array() except -1
|
| 416 |
+
# A second definition so _import_array isn't marked as used when we use it here.
|
| 417 |
+
# Do not use - subject to change any time.
|
| 418 |
+
int __pyx_import_array "_import_array"() except -1
|
| 419 |
+
|
| 420 |
+
#
|
| 421 |
+
# Macros from ndarrayobject.h
|
| 422 |
+
#
|
| 423 |
+
bint PyArray_CHKFLAGS(ndarray m, int flags) nogil
|
| 424 |
+
bint PyArray_IS_C_CONTIGUOUS(ndarray arr) nogil
|
| 425 |
+
bint PyArray_IS_F_CONTIGUOUS(ndarray arr) nogil
|
| 426 |
+
bint PyArray_ISCONTIGUOUS(ndarray m) nogil
|
| 427 |
+
bint PyArray_ISWRITEABLE(ndarray m) nogil
|
| 428 |
+
bint PyArray_ISALIGNED(ndarray m) nogil
|
| 429 |
+
|
| 430 |
+
int PyArray_NDIM(ndarray) nogil
|
| 431 |
+
bint PyArray_ISONESEGMENT(ndarray) nogil
|
| 432 |
+
bint PyArray_ISFORTRAN(ndarray) nogil
|
| 433 |
+
int PyArray_FORTRANIF(ndarray) nogil
|
| 434 |
+
|
| 435 |
+
void* PyArray_DATA(ndarray) nogil
|
| 436 |
+
char* PyArray_BYTES(ndarray) nogil
|
| 437 |
+
|
| 438 |
+
npy_intp* PyArray_DIMS(ndarray) nogil
|
| 439 |
+
npy_intp* PyArray_STRIDES(ndarray) nogil
|
| 440 |
+
npy_intp PyArray_DIM(ndarray, size_t) nogil
|
| 441 |
+
npy_intp PyArray_STRIDE(ndarray, size_t) nogil
|
| 442 |
+
|
| 443 |
+
PyObject *PyArray_BASE(ndarray) nogil # returns borrowed reference!
|
| 444 |
+
PyArray_Descr *PyArray_DESCR(ndarray) nogil # returns borrowed reference to dtype!
|
| 445 |
+
PyArray_Descr *PyArray_DTYPE(ndarray) nogil # returns borrowed reference to dtype! NP 1.7+ alias for descr.
|
| 446 |
+
int PyArray_FLAGS(ndarray) nogil
|
| 447 |
+
void PyArray_CLEARFLAGS(ndarray, int flags) nogil # Added in NumPy 1.7
|
| 448 |
+
void PyArray_ENABLEFLAGS(ndarray, int flags) nogil # Added in NumPy 1.7
|
| 449 |
+
npy_intp PyArray_ITEMSIZE(ndarray) nogil
|
| 450 |
+
int PyArray_TYPE(ndarray arr) nogil
|
| 451 |
+
|
| 452 |
+
object PyArray_GETITEM(ndarray arr, void *itemptr)
|
| 453 |
+
int PyArray_SETITEM(ndarray arr, void *itemptr, object obj) except -1
|
| 454 |
+
|
| 455 |
+
bint PyTypeNum_ISBOOL(int) nogil
|
| 456 |
+
bint PyTypeNum_ISUNSIGNED(int) nogil
|
| 457 |
+
bint PyTypeNum_ISSIGNED(int) nogil
|
| 458 |
+
bint PyTypeNum_ISINTEGER(int) nogil
|
| 459 |
+
bint PyTypeNum_ISFLOAT(int) nogil
|
| 460 |
+
bint PyTypeNum_ISNUMBER(int) nogil
|
| 461 |
+
bint PyTypeNum_ISSTRING(int) nogil
|
| 462 |
+
bint PyTypeNum_ISCOMPLEX(int) nogil
|
| 463 |
+
bint PyTypeNum_ISFLEXIBLE(int) nogil
|
| 464 |
+
bint PyTypeNum_ISUSERDEF(int) nogil
|
| 465 |
+
bint PyTypeNum_ISEXTENDED(int) nogil
|
| 466 |
+
bint PyTypeNum_ISOBJECT(int) nogil
|
| 467 |
+
|
| 468 |
+
npy_intp PyDataType_ELSIZE(dtype) nogil
|
| 469 |
+
npy_intp PyDataType_ALIGNMENT(dtype) nogil
|
| 470 |
+
PyObject* PyDataType_METADATA(dtype) nogil
|
| 471 |
+
PyArray_ArrayDescr* PyDataType_SUBARRAY(dtype) nogil
|
| 472 |
+
PyObject* PyDataType_NAMES(dtype) nogil
|
| 473 |
+
PyObject* PyDataType_FIELDS(dtype) nogil
|
| 474 |
+
|
| 475 |
+
bint PyDataType_ISBOOL(dtype) nogil
|
| 476 |
+
bint PyDataType_ISUNSIGNED(dtype) nogil
|
| 477 |
+
bint PyDataType_ISSIGNED(dtype) nogil
|
| 478 |
+
bint PyDataType_ISINTEGER(dtype) nogil
|
| 479 |
+
bint PyDataType_ISFLOAT(dtype) nogil
|
| 480 |
+
bint PyDataType_ISNUMBER(dtype) nogil
|
| 481 |
+
bint PyDataType_ISSTRING(dtype) nogil
|
| 482 |
+
bint PyDataType_ISCOMPLEX(dtype) nogil
|
| 483 |
+
bint PyDataType_ISFLEXIBLE(dtype) nogil
|
| 484 |
+
bint PyDataType_ISUSERDEF(dtype) nogil
|
| 485 |
+
bint PyDataType_ISEXTENDED(dtype) nogil
|
| 486 |
+
bint PyDataType_ISOBJECT(dtype) nogil
|
| 487 |
+
bint PyDataType_HASFIELDS(dtype) nogil
|
| 488 |
+
bint PyDataType_HASSUBARRAY(dtype) nogil
|
| 489 |
+
npy_uint64 PyDataType_FLAGS(dtype) nogil
|
| 490 |
+
|
| 491 |
+
bint PyArray_ISBOOL(ndarray) nogil
|
| 492 |
+
bint PyArray_ISUNSIGNED(ndarray) nogil
|
| 493 |
+
bint PyArray_ISSIGNED(ndarray) nogil
|
| 494 |
+
bint PyArray_ISINTEGER(ndarray) nogil
|
| 495 |
+
bint PyArray_ISFLOAT(ndarray) nogil
|
| 496 |
+
bint PyArray_ISNUMBER(ndarray) nogil
|
| 497 |
+
bint PyArray_ISSTRING(ndarray) nogil
|
| 498 |
+
bint PyArray_ISCOMPLEX(ndarray) nogil
|
| 499 |
+
bint PyArray_ISFLEXIBLE(ndarray) nogil
|
| 500 |
+
bint PyArray_ISUSERDEF(ndarray) nogil
|
| 501 |
+
bint PyArray_ISEXTENDED(ndarray) nogil
|
| 502 |
+
bint PyArray_ISOBJECT(ndarray) nogil
|
| 503 |
+
bint PyArray_HASFIELDS(ndarray) nogil
|
| 504 |
+
|
| 505 |
+
bint PyArray_ISVARIABLE(ndarray) nogil
|
| 506 |
+
|
| 507 |
+
bint PyArray_SAFEALIGNEDCOPY(ndarray) nogil
|
| 508 |
+
bint PyArray_ISNBO(char) nogil # works on ndarray.byteorder
|
| 509 |
+
bint PyArray_IsNativeByteOrder(char) nogil # works on ndarray.byteorder
|
| 510 |
+
bint PyArray_ISNOTSWAPPED(ndarray) nogil
|
| 511 |
+
bint PyArray_ISBYTESWAPPED(ndarray) nogil
|
| 512 |
+
|
| 513 |
+
bint PyArray_FLAGSWAP(ndarray, int) nogil
|
| 514 |
+
|
| 515 |
+
bint PyArray_ISCARRAY(ndarray) nogil
|
| 516 |
+
bint PyArray_ISCARRAY_RO(ndarray) nogil
|
| 517 |
+
bint PyArray_ISFARRAY(ndarray) nogil
|
| 518 |
+
bint PyArray_ISFARRAY_RO(ndarray) nogil
|
| 519 |
+
bint PyArray_ISBEHAVED(ndarray) nogil
|
| 520 |
+
bint PyArray_ISBEHAVED_RO(ndarray) nogil
|
| 521 |
+
|
| 522 |
+
|
| 523 |
+
bint PyDataType_ISNOTSWAPPED(dtype) nogil
|
| 524 |
+
bint PyDataType_ISBYTESWAPPED(dtype) nogil
|
| 525 |
+
|
| 526 |
+
bint PyArray_DescrCheck(object)
|
| 527 |
+
|
| 528 |
+
bint PyArray_Check(object)
|
| 529 |
+
bint PyArray_CheckExact(object)
|
| 530 |
+
|
| 531 |
+
# Cannot be supported due to out arg:
|
| 532 |
+
# bint PyArray_HasArrayInterfaceType(object, dtype, object, object&)
|
| 533 |
+
# bint PyArray_HasArrayInterface(op, out)
|
| 534 |
+
|
| 535 |
+
|
| 536 |
+
bint PyArray_IsZeroDim(object)
|
| 537 |
+
# Cannot be supported due to ## ## in macro:
|
| 538 |
+
# bint PyArray_IsScalar(object, verbatim work)
|
| 539 |
+
bint PyArray_CheckScalar(object)
|
| 540 |
+
bint PyArray_IsPythonNumber(object)
|
| 541 |
+
bint PyArray_IsPythonScalar(object)
|
| 542 |
+
bint PyArray_IsAnyScalar(object)
|
| 543 |
+
bint PyArray_CheckAnyScalar(object)
|
| 544 |
+
|
| 545 |
+
ndarray PyArray_GETCONTIGUOUS(ndarray)
|
| 546 |
+
bint PyArray_SAMESHAPE(ndarray, ndarray) nogil
|
| 547 |
+
npy_intp PyArray_SIZE(ndarray) nogil
|
| 548 |
+
npy_intp PyArray_NBYTES(ndarray) nogil
|
| 549 |
+
|
| 550 |
+
object PyArray_FROM_O(object)
|
| 551 |
+
object PyArray_FROM_OF(object m, int flags)
|
| 552 |
+
object PyArray_FROM_OT(object m, int type)
|
| 553 |
+
object PyArray_FROM_OTF(object m, int type, int flags)
|
| 554 |
+
object PyArray_FROMANY(object m, int type, int min, int max, int flags)
|
| 555 |
+
object PyArray_ZEROS(int nd, npy_intp* dims, int type, int fortran)
|
| 556 |
+
object PyArray_EMPTY(int nd, npy_intp* dims, int type, int fortran)
|
| 557 |
+
void PyArray_FILLWBYTE(ndarray, int val)
|
| 558 |
+
object PyArray_ContiguousFromAny(op, int, int min_depth, int max_depth)
|
| 559 |
+
unsigned char PyArray_EquivArrTypes(ndarray a1, ndarray a2)
|
| 560 |
+
bint PyArray_EquivByteorders(int b1, int b2) nogil
|
| 561 |
+
object PyArray_SimpleNew(int nd, npy_intp* dims, int typenum)
|
| 562 |
+
object PyArray_SimpleNewFromData(int nd, npy_intp* dims, int typenum, void* data)
|
| 563 |
+
#object PyArray_SimpleNewFromDescr(int nd, npy_intp* dims, dtype descr)
|
| 564 |
+
object PyArray_ToScalar(void* data, ndarray arr)
|
| 565 |
+
|
| 566 |
+
void* PyArray_GETPTR1(ndarray m, npy_intp i) nogil
|
| 567 |
+
void* PyArray_GETPTR2(ndarray m, npy_intp i, npy_intp j) nogil
|
| 568 |
+
void* PyArray_GETPTR3(ndarray m, npy_intp i, npy_intp j, npy_intp k) nogil
|
| 569 |
+
void* PyArray_GETPTR4(ndarray m, npy_intp i, npy_intp j, npy_intp k, npy_intp l) nogil
|
| 570 |
+
|
| 571 |
+
# Cannot be supported due to out arg
|
| 572 |
+
# void PyArray_DESCR_REPLACE(descr)
|
| 573 |
+
|
| 574 |
+
|
| 575 |
+
object PyArray_Copy(ndarray)
|
| 576 |
+
object PyArray_FromObject(object op, int type, int min_depth, int max_depth)
|
| 577 |
+
object PyArray_ContiguousFromObject(object op, int type, int min_depth, int max_depth)
|
| 578 |
+
object PyArray_CopyFromObject(object op, int type, int min_depth, int max_depth)
|
| 579 |
+
|
| 580 |
+
object PyArray_Cast(ndarray mp, int type_num)
|
| 581 |
+
object PyArray_Take(ndarray ap, object items, int axis)
|
| 582 |
+
object PyArray_Put(ndarray ap, object items, object values)
|
| 583 |
+
|
| 584 |
+
void PyArray_ITER_RESET(flatiter it) nogil
|
| 585 |
+
void PyArray_ITER_NEXT(flatiter it) nogil
|
| 586 |
+
void PyArray_ITER_GOTO(flatiter it, npy_intp* destination) nogil
|
| 587 |
+
void PyArray_ITER_GOTO1D(flatiter it, npy_intp ind) nogil
|
| 588 |
+
void* PyArray_ITER_DATA(flatiter it) nogil
|
| 589 |
+
bint PyArray_ITER_NOTDONE(flatiter it) nogil
|
| 590 |
+
|
| 591 |
+
void PyArray_MultiIter_RESET(broadcast multi) nogil
|
| 592 |
+
void PyArray_MultiIter_NEXT(broadcast multi) nogil
|
| 593 |
+
void PyArray_MultiIter_GOTO(broadcast multi, npy_intp dest) nogil
|
| 594 |
+
void PyArray_MultiIter_GOTO1D(broadcast multi, npy_intp ind) nogil
|
| 595 |
+
void* PyArray_MultiIter_DATA(broadcast multi, npy_intp i) nogil
|
| 596 |
+
void PyArray_MultiIter_NEXTi(broadcast multi, npy_intp i) nogil
|
| 597 |
+
bint PyArray_MultiIter_NOTDONE(broadcast multi) nogil
|
| 598 |
+
npy_intp PyArray_MultiIter_SIZE(broadcast multi) nogil
|
| 599 |
+
int PyArray_MultiIter_NDIM(broadcast multi) nogil
|
| 600 |
+
npy_intp PyArray_MultiIter_INDEX(broadcast multi) nogil
|
| 601 |
+
int PyArray_MultiIter_NUMITER(broadcast multi) nogil
|
| 602 |
+
npy_intp* PyArray_MultiIter_DIMS(broadcast multi) nogil
|
| 603 |
+
void** PyArray_MultiIter_ITERS(broadcast multi) nogil
|
| 604 |
+
|
| 605 |
+
# Functions from __multiarray_api.h
|
| 606 |
+
|
| 607 |
+
# Functions taking dtype and returning object/ndarray are disabled
|
| 608 |
+
# for now as they steal dtype references. I'm conservative and disable
|
| 609 |
+
# more than is probably needed until it can be checked further.
|
| 610 |
+
int PyArray_INCREF (ndarray) except * # uses PyArray_Item_INCREF...
|
| 611 |
+
int PyArray_XDECREF (ndarray) except * # uses PyArray_Item_DECREF...
|
| 612 |
+
dtype PyArray_DescrFromType (int)
|
| 613 |
+
object PyArray_TypeObjectFromType (int)
|
| 614 |
+
char * PyArray_Zero (ndarray)
|
| 615 |
+
char * PyArray_One (ndarray)
|
| 616 |
+
#object PyArray_CastToType (ndarray, dtype, int)
|
| 617 |
+
int PyArray_CanCastSafely (int, int) # writes errors
|
| 618 |
+
npy_bool PyArray_CanCastTo (dtype, dtype) # writes errors
|
| 619 |
+
int PyArray_ObjectType (object, int) except 0
|
| 620 |
+
dtype PyArray_DescrFromObject (object, dtype)
|
| 621 |
+
#ndarray* PyArray_ConvertToCommonType (object, int *)
|
| 622 |
+
dtype PyArray_DescrFromScalar (object)
|
| 623 |
+
dtype PyArray_DescrFromTypeObject (object)
|
| 624 |
+
npy_intp PyArray_Size (object)
|
| 625 |
+
#object PyArray_Scalar (void *, dtype, object)
|
| 626 |
+
#object PyArray_FromScalar (object, dtype)
|
| 627 |
+
void PyArray_ScalarAsCtype (object, void *)
|
| 628 |
+
#int PyArray_CastScalarToCtype (object, void *, dtype)
|
| 629 |
+
#int PyArray_CastScalarDirect (object, dtype, void *, int)
|
| 630 |
+
#PyArray_VectorUnaryFunc * PyArray_GetCastFunc (dtype, int)
|
| 631 |
+
#object PyArray_FromAny (object, dtype, int, int, int, object)
|
| 632 |
+
object PyArray_EnsureArray (object)
|
| 633 |
+
object PyArray_EnsureAnyArray (object)
|
| 634 |
+
#object PyArray_FromFile (stdio.FILE *, dtype, npy_intp, char *)
|
| 635 |
+
#object PyArray_FromString (char *, npy_intp, dtype, npy_intp, char *)
|
| 636 |
+
#object PyArray_FromBuffer (object, dtype, npy_intp, npy_intp)
|
| 637 |
+
#object PyArray_FromIter (object, dtype, npy_intp)
|
| 638 |
+
object PyArray_Return (ndarray)
|
| 639 |
+
#object PyArray_GetField (ndarray, dtype, int)
|
| 640 |
+
#int PyArray_SetField (ndarray, dtype, int, object) except -1
|
| 641 |
+
object PyArray_Byteswap (ndarray, npy_bool)
|
| 642 |
+
object PyArray_Resize (ndarray, PyArray_Dims *, int, NPY_ORDER)
|
| 643 |
+
int PyArray_CopyInto (ndarray, ndarray) except -1
|
| 644 |
+
int PyArray_CopyAnyInto (ndarray, ndarray) except -1
|
| 645 |
+
int PyArray_CopyObject (ndarray, object) except -1
|
| 646 |
+
object PyArray_NewCopy (ndarray, NPY_ORDER)
|
| 647 |
+
object PyArray_ToList (ndarray)
|
| 648 |
+
object PyArray_ToString (ndarray, NPY_ORDER)
|
| 649 |
+
int PyArray_ToFile (ndarray, stdio.FILE *, char *, char *) except -1
|
| 650 |
+
int PyArray_Dump (object, object, int) except -1
|
| 651 |
+
object PyArray_Dumps (object, int)
|
| 652 |
+
int PyArray_ValidType (int) # Cannot error
|
| 653 |
+
void PyArray_UpdateFlags (ndarray, int)
|
| 654 |
+
object PyArray_New (type, int, npy_intp *, int, npy_intp *, void *, int, int, object)
|
| 655 |
+
#object PyArray_NewFromDescr (type, dtype, int, npy_intp *, npy_intp *, void *, int, object)
|
| 656 |
+
#dtype PyArray_DescrNew (dtype)
|
| 657 |
+
dtype PyArray_DescrNewFromType (int)
|
| 658 |
+
double PyArray_GetPriority (object, double) # clears errors as of 1.25
|
| 659 |
+
object PyArray_IterNew (object)
|
| 660 |
+
object PyArray_MultiIterNew (int, ...)
|
| 661 |
+
|
| 662 |
+
int PyArray_PyIntAsInt (object) except? -1
|
| 663 |
+
npy_intp PyArray_PyIntAsIntp (object)
|
| 664 |
+
int PyArray_Broadcast (broadcast) except -1
|
| 665 |
+
int PyArray_FillWithScalar (ndarray, object) except -1
|
| 666 |
+
npy_bool PyArray_CheckStrides (int, int, npy_intp, npy_intp, npy_intp *, npy_intp *)
|
| 667 |
+
dtype PyArray_DescrNewByteorder (dtype, char)
|
| 668 |
+
object PyArray_IterAllButAxis (object, int *)
|
| 669 |
+
#object PyArray_CheckFromAny (object, dtype, int, int, int, object)
|
| 670 |
+
#object PyArray_FromArray (ndarray, dtype, int)
|
| 671 |
+
object PyArray_FromInterface (object)
|
| 672 |
+
object PyArray_FromStructInterface (object)
|
| 673 |
+
#object PyArray_FromArrayAttr (object, dtype, object)
|
| 674 |
+
#NPY_SCALARKIND PyArray_ScalarKind (int, ndarray*)
|
| 675 |
+
int PyArray_CanCoerceScalar (int, int, NPY_SCALARKIND)
|
| 676 |
+
npy_bool PyArray_CanCastScalar (type, type)
|
| 677 |
+
int PyArray_RemoveSmallest (broadcast) except -1
|
| 678 |
+
int PyArray_ElementStrides (object)
|
| 679 |
+
void PyArray_Item_INCREF (char *, dtype) except *
|
| 680 |
+
void PyArray_Item_XDECREF (char *, dtype) except *
|
| 681 |
+
object PyArray_Transpose (ndarray, PyArray_Dims *)
|
| 682 |
+
object PyArray_TakeFrom (ndarray, object, int, ndarray, NPY_CLIPMODE)
|
| 683 |
+
object PyArray_PutTo (ndarray, object, object, NPY_CLIPMODE)
|
| 684 |
+
object PyArray_PutMask (ndarray, object, object)
|
| 685 |
+
object PyArray_Repeat (ndarray, object, int)
|
| 686 |
+
object PyArray_Choose (ndarray, object, ndarray, NPY_CLIPMODE)
|
| 687 |
+
int PyArray_Sort (ndarray, int, NPY_SORTKIND) except -1
|
| 688 |
+
object PyArray_ArgSort (ndarray, int, NPY_SORTKIND)
|
| 689 |
+
object PyArray_SearchSorted (ndarray, object, NPY_SEARCHSIDE, PyObject *)
|
| 690 |
+
object PyArray_ArgMax (ndarray, int, ndarray)
|
| 691 |
+
object PyArray_ArgMin (ndarray, int, ndarray)
|
| 692 |
+
object PyArray_Reshape (ndarray, object)
|
| 693 |
+
object PyArray_Newshape (ndarray, PyArray_Dims *, NPY_ORDER)
|
| 694 |
+
object PyArray_Squeeze (ndarray)
|
| 695 |
+
#object PyArray_View (ndarray, dtype, type)
|
| 696 |
+
object PyArray_SwapAxes (ndarray, int, int)
|
| 697 |
+
object PyArray_Max (ndarray, int, ndarray)
|
| 698 |
+
object PyArray_Min (ndarray, int, ndarray)
|
| 699 |
+
object PyArray_Ptp (ndarray, int, ndarray)
|
| 700 |
+
object PyArray_Mean (ndarray, int, int, ndarray)
|
| 701 |
+
object PyArray_Trace (ndarray, int, int, int, int, ndarray)
|
| 702 |
+
object PyArray_Diagonal (ndarray, int, int, int)
|
| 703 |
+
object PyArray_Clip (ndarray, object, object, ndarray)
|
| 704 |
+
object PyArray_Conjugate (ndarray, ndarray)
|
| 705 |
+
object PyArray_Nonzero (ndarray)
|
| 706 |
+
object PyArray_Std (ndarray, int, int, ndarray, int)
|
| 707 |
+
object PyArray_Sum (ndarray, int, int, ndarray)
|
| 708 |
+
object PyArray_CumSum (ndarray, int, int, ndarray)
|
| 709 |
+
object PyArray_Prod (ndarray, int, int, ndarray)
|
| 710 |
+
object PyArray_CumProd (ndarray, int, int, ndarray)
|
| 711 |
+
object PyArray_All (ndarray, int, ndarray)
|
| 712 |
+
object PyArray_Any (ndarray, int, ndarray)
|
| 713 |
+
object PyArray_Compress (ndarray, object, int, ndarray)
|
| 714 |
+
object PyArray_Flatten (ndarray, NPY_ORDER)
|
| 715 |
+
object PyArray_Ravel (ndarray, NPY_ORDER)
|
| 716 |
+
npy_intp PyArray_MultiplyList (npy_intp *, int)
|
| 717 |
+
int PyArray_MultiplyIntList (int *, int)
|
| 718 |
+
void * PyArray_GetPtr (ndarray, npy_intp*)
|
| 719 |
+
int PyArray_CompareLists (npy_intp *, npy_intp *, int)
|
| 720 |
+
#int PyArray_AsCArray (object*, void *, npy_intp *, int, dtype)
|
| 721 |
+
int PyArray_Free (object, void *)
|
| 722 |
+
#int PyArray_Converter (object, object*)
|
| 723 |
+
int PyArray_IntpFromSequence (object, npy_intp *, int) except -1
|
| 724 |
+
object PyArray_Concatenate (object, int)
|
| 725 |
+
object PyArray_InnerProduct (object, object)
|
| 726 |
+
object PyArray_MatrixProduct (object, object)
|
| 727 |
+
object PyArray_Correlate (object, object, int)
|
| 728 |
+
#int PyArray_DescrConverter (object, dtype*) except 0
|
| 729 |
+
#int PyArray_DescrConverter2 (object, dtype*) except 0
|
| 730 |
+
int PyArray_IntpConverter (object, PyArray_Dims *) except 0
|
| 731 |
+
#int PyArray_BufferConverter (object, chunk) except 0
|
| 732 |
+
int PyArray_AxisConverter (object, int *) except 0
|
| 733 |
+
int PyArray_BoolConverter (object, npy_bool *) except 0
|
| 734 |
+
int PyArray_ByteorderConverter (object, char *) except 0
|
| 735 |
+
int PyArray_OrderConverter (object, NPY_ORDER *) except 0
|
| 736 |
+
unsigned char PyArray_EquivTypes (dtype, dtype) # clears errors
|
| 737 |
+
#object PyArray_Zeros (int, npy_intp *, dtype, int)
|
| 738 |
+
#object PyArray_Empty (int, npy_intp *, dtype, int)
|
| 739 |
+
object PyArray_Where (object, object, object)
|
| 740 |
+
object PyArray_Arange (double, double, double, int)
|
| 741 |
+
#object PyArray_ArangeObj (object, object, object, dtype)
|
| 742 |
+
int PyArray_SortkindConverter (object, NPY_SORTKIND *) except 0
|
| 743 |
+
object PyArray_LexSort (object, int)
|
| 744 |
+
object PyArray_Round (ndarray, int, ndarray)
|
| 745 |
+
unsigned char PyArray_EquivTypenums (int, int)
|
| 746 |
+
int PyArray_RegisterDataType (dtype) except -1
|
| 747 |
+
int PyArray_RegisterCastFunc (dtype, int, PyArray_VectorUnaryFunc *) except -1
|
| 748 |
+
int PyArray_RegisterCanCast (dtype, int, NPY_SCALARKIND) except -1
|
| 749 |
+
#void PyArray_InitArrFuncs (PyArray_ArrFuncs *)
|
| 750 |
+
object PyArray_IntTupleFromIntp (int, npy_intp *)
|
| 751 |
+
int PyArray_ClipmodeConverter (object, NPY_CLIPMODE *) except 0
|
| 752 |
+
#int PyArray_OutputConverter (object, ndarray*) except 0
|
| 753 |
+
object PyArray_BroadcastToShape (object, npy_intp *, int)
|
| 754 |
+
#int PyArray_DescrAlignConverter (object, dtype*) except 0
|
| 755 |
+
#int PyArray_DescrAlignConverter2 (object, dtype*) except 0
|
| 756 |
+
int PyArray_SearchsideConverter (object, void *) except 0
|
| 757 |
+
object PyArray_CheckAxis (ndarray, int *, int)
|
| 758 |
+
npy_intp PyArray_OverflowMultiplyList (npy_intp *, int)
|
| 759 |
+
int PyArray_SetBaseObject(ndarray, base) except -1 # NOTE: steals a reference to base! Use "set_array_base()" instead.
|
| 760 |
+
|
| 761 |
+
# The memory handler functions require the NumPy 1.22 API
|
| 762 |
+
# and may require defining NPY_TARGET_VERSION
|
| 763 |
+
ctypedef struct PyDataMemAllocator:
|
| 764 |
+
void *ctx
|
| 765 |
+
void* (*malloc) (void *ctx, size_t size)
|
| 766 |
+
void* (*calloc) (void *ctx, size_t nelem, size_t elsize)
|
| 767 |
+
void* (*realloc) (void *ctx, void *ptr, size_t new_size)
|
| 768 |
+
void (*free) (void *ctx, void *ptr, size_t size)
|
| 769 |
+
|
| 770 |
+
ctypedef struct PyDataMem_Handler:
|
| 771 |
+
char* name
|
| 772 |
+
npy_uint8 version
|
| 773 |
+
PyDataMemAllocator allocator
|
| 774 |
+
|
| 775 |
+
object PyDataMem_SetHandler(object handler)
|
| 776 |
+
object PyDataMem_GetHandler()
|
| 777 |
+
|
| 778 |
+
# additional datetime related functions are defined below
|
| 779 |
+
|
| 780 |
+
|
| 781 |
+
# Typedefs that matches the runtime dtype objects in
|
| 782 |
+
# the numpy module.
|
| 783 |
+
|
| 784 |
+
# The ones that are commented out needs an IFDEF function
|
| 785 |
+
# in Cython to enable them only on the right systems.
|
| 786 |
+
|
| 787 |
+
ctypedef npy_int8 int8_t
|
| 788 |
+
ctypedef npy_int16 int16_t
|
| 789 |
+
ctypedef npy_int32 int32_t
|
| 790 |
+
ctypedef npy_int64 int64_t
|
| 791 |
+
#ctypedef npy_int96 int96_t
|
| 792 |
+
#ctypedef npy_int128 int128_t
|
| 793 |
+
|
| 794 |
+
ctypedef npy_uint8 uint8_t
|
| 795 |
+
ctypedef npy_uint16 uint16_t
|
| 796 |
+
ctypedef npy_uint32 uint32_t
|
| 797 |
+
ctypedef npy_uint64 uint64_t
|
| 798 |
+
#ctypedef npy_uint96 uint96_t
|
| 799 |
+
#ctypedef npy_uint128 uint128_t
|
| 800 |
+
|
| 801 |
+
ctypedef npy_float32 float32_t
|
| 802 |
+
ctypedef npy_float64 float64_t
|
| 803 |
+
#ctypedef npy_float80 float80_t
|
| 804 |
+
#ctypedef npy_float128 float128_t
|
| 805 |
+
|
| 806 |
+
ctypedef float complex complex64_t
|
| 807 |
+
ctypedef double complex complex128_t
|
| 808 |
+
|
| 809 |
+
ctypedef npy_longlong longlong_t
|
| 810 |
+
ctypedef npy_ulonglong ulonglong_t
|
| 811 |
+
|
| 812 |
+
ctypedef npy_intp intp_t
|
| 813 |
+
ctypedef npy_uintp uintp_t
|
| 814 |
+
|
| 815 |
+
ctypedef npy_double float_t
|
| 816 |
+
ctypedef npy_double double_t
|
| 817 |
+
ctypedef npy_longdouble longdouble_t
|
| 818 |
+
|
| 819 |
+
ctypedef float complex cfloat_t
|
| 820 |
+
ctypedef double complex cdouble_t
|
| 821 |
+
ctypedef double complex complex_t
|
| 822 |
+
ctypedef long double complex clongdouble_t
|
| 823 |
+
|
| 824 |
+
cdef inline object PyArray_MultiIterNew1(a):
|
| 825 |
+
return PyArray_MultiIterNew(1, <void*>a)
|
| 826 |
+
|
| 827 |
+
cdef inline object PyArray_MultiIterNew2(a, b):
|
| 828 |
+
return PyArray_MultiIterNew(2, <void*>a, <void*>b)
|
| 829 |
+
|
| 830 |
+
cdef inline object PyArray_MultiIterNew3(a, b, c):
|
| 831 |
+
return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
|
| 832 |
+
|
| 833 |
+
cdef inline object PyArray_MultiIterNew4(a, b, c, d):
|
| 834 |
+
return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
|
| 835 |
+
|
| 836 |
+
cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
|
| 837 |
+
return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
|
| 838 |
+
|
| 839 |
+
cdef inline tuple PyDataType_SHAPE(dtype d):
|
| 840 |
+
if PyDataType_HASSUBARRAY(d):
|
| 841 |
+
return <tuple>d.subarray.shape
|
| 842 |
+
else:
|
| 843 |
+
return ()
|
| 844 |
+
|
| 845 |
+
|
| 846 |
+
cdef extern from "numpy/ndarrayobject.h":
|
| 847 |
+
PyTypeObject PyTimedeltaArrType_Type
|
| 848 |
+
PyTypeObject PyDatetimeArrType_Type
|
| 849 |
+
ctypedef int64_t npy_timedelta
|
| 850 |
+
ctypedef int64_t npy_datetime
|
| 851 |
+
|
| 852 |
+
cdef extern from "numpy/ndarraytypes.h":
|
| 853 |
+
ctypedef struct PyArray_DatetimeMetaData:
|
| 854 |
+
NPY_DATETIMEUNIT base
|
| 855 |
+
int64_t num
|
| 856 |
+
|
| 857 |
+
ctypedef struct npy_datetimestruct:
|
| 858 |
+
int64_t year
|
| 859 |
+
int32_t month, day, hour, min, sec, us, ps, as
|
| 860 |
+
|
| 861 |
+
# Iterator API added in v1.6
|
| 862 |
+
#
|
| 863 |
+
# These don't match the definition in the C API because Cython can't wrap
|
| 864 |
+
# function pointers that return functions.
|
| 865 |
+
# https://github.com/cython/cython/issues/6720
|
| 866 |
+
ctypedef int (*NpyIter_IterNextFunc "NpyIter_IterNextFunc *")(NpyIter* it) noexcept nogil
|
| 867 |
+
ctypedef void (*NpyIter_GetMultiIndexFunc "NpyIter_GetMultiIndexFunc *")(NpyIter* it, npy_intp* outcoords) noexcept nogil
|
| 868 |
+
|
| 869 |
+
|
| 870 |
+
cdef extern from "numpy/arrayscalars.h":
|
| 871 |
+
|
| 872 |
+
# abstract types
|
| 873 |
+
ctypedef class numpy.generic [object PyObject]:
|
| 874 |
+
pass
|
| 875 |
+
ctypedef class numpy.number [object PyObject]:
|
| 876 |
+
pass
|
| 877 |
+
ctypedef class numpy.integer [object PyObject]:
|
| 878 |
+
pass
|
| 879 |
+
ctypedef class numpy.signedinteger [object PyObject]:
|
| 880 |
+
pass
|
| 881 |
+
ctypedef class numpy.unsignedinteger [object PyObject]:
|
| 882 |
+
pass
|
| 883 |
+
ctypedef class numpy.inexact [object PyObject]:
|
| 884 |
+
pass
|
| 885 |
+
ctypedef class numpy.floating [object PyObject]:
|
| 886 |
+
pass
|
| 887 |
+
ctypedef class numpy.complexfloating [object PyObject]:
|
| 888 |
+
pass
|
| 889 |
+
ctypedef class numpy.flexible [object PyObject]:
|
| 890 |
+
pass
|
| 891 |
+
ctypedef class numpy.character [object PyObject]:
|
| 892 |
+
pass
|
| 893 |
+
|
| 894 |
+
ctypedef struct PyDatetimeScalarObject:
|
| 895 |
+
# PyObject_HEAD
|
| 896 |
+
npy_datetime obval
|
| 897 |
+
PyArray_DatetimeMetaData obmeta
|
| 898 |
+
|
| 899 |
+
ctypedef struct PyTimedeltaScalarObject:
|
| 900 |
+
# PyObject_HEAD
|
| 901 |
+
npy_timedelta obval
|
| 902 |
+
PyArray_DatetimeMetaData obmeta
|
| 903 |
+
|
| 904 |
+
ctypedef enum NPY_DATETIMEUNIT:
|
| 905 |
+
NPY_FR_Y
|
| 906 |
+
NPY_FR_M
|
| 907 |
+
NPY_FR_W
|
| 908 |
+
NPY_FR_D
|
| 909 |
+
NPY_FR_B
|
| 910 |
+
NPY_FR_h
|
| 911 |
+
NPY_FR_m
|
| 912 |
+
NPY_FR_s
|
| 913 |
+
NPY_FR_ms
|
| 914 |
+
NPY_FR_us
|
| 915 |
+
NPY_FR_ns
|
| 916 |
+
NPY_FR_ps
|
| 917 |
+
NPY_FR_fs
|
| 918 |
+
NPY_FR_as
|
| 919 |
+
NPY_FR_GENERIC
|
| 920 |
+
|
| 921 |
+
|
| 922 |
+
cdef extern from "numpy/arrayobject.h":
|
| 923 |
+
# These are part of the C-API defined in `__multiarray_api.h`
|
| 924 |
+
|
| 925 |
+
# NumPy internal definitions in datetime_strings.c:
|
| 926 |
+
int get_datetime_iso_8601_strlen "NpyDatetime_GetDatetimeISO8601StrLen" (
|
| 927 |
+
int local, NPY_DATETIMEUNIT base)
|
| 928 |
+
int make_iso_8601_datetime "NpyDatetime_MakeISO8601Datetime" (
|
| 929 |
+
npy_datetimestruct *dts, char *outstr, npy_intp outlen,
|
| 930 |
+
int local, int utc, NPY_DATETIMEUNIT base, int tzoffset,
|
| 931 |
+
NPY_CASTING casting) except -1
|
| 932 |
+
|
| 933 |
+
# NumPy internal definition in datetime.c:
|
| 934 |
+
# May return 1 to indicate that object does not appear to be a datetime
|
| 935 |
+
# (returns 0 on success).
|
| 936 |
+
int convert_pydatetime_to_datetimestruct "NpyDatetime_ConvertPyDateTimeToDatetimeStruct" (
|
| 937 |
+
PyObject *obj, npy_datetimestruct *out,
|
| 938 |
+
NPY_DATETIMEUNIT *out_bestunit, int apply_tzinfo) except -1
|
| 939 |
+
int convert_datetime64_to_datetimestruct "NpyDatetime_ConvertDatetime64ToDatetimeStruct" (
|
| 940 |
+
PyArray_DatetimeMetaData *meta, npy_datetime dt,
|
| 941 |
+
npy_datetimestruct *out) except -1
|
| 942 |
+
int convert_datetimestruct_to_datetime64 "NpyDatetime_ConvertDatetimeStructToDatetime64"(
|
| 943 |
+
PyArray_DatetimeMetaData *meta, const npy_datetimestruct *dts,
|
| 944 |
+
npy_datetime *out) except -1
|
| 945 |
+
|
| 946 |
+
|
| 947 |
+
#
|
| 948 |
+
# ufunc API
|
| 949 |
+
#
|
| 950 |
+
|
| 951 |
+
cdef extern from "numpy/ufuncobject.h":
|
| 952 |
+
|
| 953 |
+
ctypedef void (*PyUFuncGenericFunction) (char **, npy_intp *, npy_intp *, void *)
|
| 954 |
+
|
| 955 |
+
ctypedef class numpy.ufunc [object PyUFuncObject, check_size ignore]:
|
| 956 |
+
cdef:
|
| 957 |
+
int nin, nout, nargs
|
| 958 |
+
int identity
|
| 959 |
+
PyUFuncGenericFunction *functions
|
| 960 |
+
void **data
|
| 961 |
+
int ntypes
|
| 962 |
+
int check_return
|
| 963 |
+
char *name
|
| 964 |
+
char *types
|
| 965 |
+
char *doc
|
| 966 |
+
void *ptr
|
| 967 |
+
PyObject *obj
|
| 968 |
+
PyObject *userloops
|
| 969 |
+
|
| 970 |
+
cdef enum:
|
| 971 |
+
PyUFunc_Zero
|
| 972 |
+
PyUFunc_One
|
| 973 |
+
PyUFunc_None
|
| 974 |
+
UFUNC_FPE_DIVIDEBYZERO
|
| 975 |
+
UFUNC_FPE_OVERFLOW
|
| 976 |
+
UFUNC_FPE_UNDERFLOW
|
| 977 |
+
UFUNC_FPE_INVALID
|
| 978 |
+
|
| 979 |
+
object PyUFunc_FromFuncAndData(PyUFuncGenericFunction *,
|
| 980 |
+
void **, char *, int, int, int, int, char *, char *, int)
|
| 981 |
+
int PyUFunc_RegisterLoopForType(ufunc, int,
|
| 982 |
+
PyUFuncGenericFunction, int *, void *) except -1
|
| 983 |
+
void PyUFunc_f_f_As_d_d \
|
| 984 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 985 |
+
void PyUFunc_d_d \
|
| 986 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 987 |
+
void PyUFunc_f_f \
|
| 988 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 989 |
+
void PyUFunc_g_g \
|
| 990 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 991 |
+
void PyUFunc_F_F_As_D_D \
|
| 992 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 993 |
+
void PyUFunc_F_F \
|
| 994 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 995 |
+
void PyUFunc_D_D \
|
| 996 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 997 |
+
void PyUFunc_G_G \
|
| 998 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 999 |
+
void PyUFunc_O_O \
|
| 1000 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 1001 |
+
void PyUFunc_ff_f_As_dd_d \
|
| 1002 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 1003 |
+
void PyUFunc_ff_f \
|
| 1004 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 1005 |
+
void PyUFunc_dd_d \
|
| 1006 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 1007 |
+
void PyUFunc_gg_g \
|
| 1008 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 1009 |
+
void PyUFunc_FF_F_As_DD_D \
|
| 1010 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 1011 |
+
void PyUFunc_DD_D \
|
| 1012 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 1013 |
+
void PyUFunc_FF_F \
|
| 1014 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 1015 |
+
void PyUFunc_GG_G \
|
| 1016 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 1017 |
+
void PyUFunc_OO_O \
|
| 1018 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 1019 |
+
void PyUFunc_O_O_method \
|
| 1020 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 1021 |
+
void PyUFunc_OO_O_method \
|
| 1022 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 1023 |
+
void PyUFunc_On_Om \
|
| 1024 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 1025 |
+
void PyUFunc_clearfperr()
|
| 1026 |
+
int PyUFunc_getfperr()
|
| 1027 |
+
int PyUFunc_ReplaceLoopBySignature \
|
| 1028 |
+
(ufunc, PyUFuncGenericFunction, int *, PyUFuncGenericFunction *)
|
| 1029 |
+
object PyUFunc_FromFuncAndDataAndSignature \
|
| 1030 |
+
(PyUFuncGenericFunction *, void **, char *, int, int, int,
|
| 1031 |
+
int, char *, char *, int, char *)
|
| 1032 |
+
|
| 1033 |
+
int _import_umath() except -1
|
| 1034 |
+
|
| 1035 |
+
cdef inline void set_array_base(ndarray arr, object base) except *:
|
| 1036 |
+
Py_INCREF(base) # important to do this before stealing the reference below!
|
| 1037 |
+
PyArray_SetBaseObject(arr, base)
|
| 1038 |
+
|
| 1039 |
+
cdef inline object get_array_base(ndarray arr):
|
| 1040 |
+
base = PyArray_BASE(arr)
|
| 1041 |
+
if base is NULL:
|
| 1042 |
+
return None
|
| 1043 |
+
return <object>base
|
| 1044 |
+
|
| 1045 |
+
# Versions of the import_* functions which are more suitable for
|
| 1046 |
+
# Cython code.
|
| 1047 |
+
cdef inline int import_array() except -1:
|
| 1048 |
+
try:
|
| 1049 |
+
__pyx_import_array()
|
| 1050 |
+
except Exception:
|
| 1051 |
+
raise ImportError("numpy._core.multiarray failed to import")
|
| 1052 |
+
|
| 1053 |
+
cdef inline int import_umath() except -1:
|
| 1054 |
+
try:
|
| 1055 |
+
_import_umath()
|
| 1056 |
+
except Exception:
|
| 1057 |
+
raise ImportError("numpy._core.umath failed to import")
|
| 1058 |
+
|
| 1059 |
+
cdef inline int import_ufunc() except -1:
|
| 1060 |
+
try:
|
| 1061 |
+
_import_umath()
|
| 1062 |
+
except Exception:
|
| 1063 |
+
raise ImportError("numpy._core.umath failed to import")
|
| 1064 |
+
|
| 1065 |
+
|
| 1066 |
+
cdef inline bint is_timedelta64_object(object obj) noexcept:
|
| 1067 |
+
"""
|
| 1068 |
+
Cython equivalent of `isinstance(obj, np.timedelta64)`
|
| 1069 |
+
|
| 1070 |
+
Parameters
|
| 1071 |
+
----------
|
| 1072 |
+
obj : object
|
| 1073 |
+
|
| 1074 |
+
Returns
|
| 1075 |
+
-------
|
| 1076 |
+
bool
|
| 1077 |
+
"""
|
| 1078 |
+
return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)
|
| 1079 |
+
|
| 1080 |
+
|
| 1081 |
+
cdef inline bint is_datetime64_object(object obj) noexcept:
|
| 1082 |
+
"""
|
| 1083 |
+
Cython equivalent of `isinstance(obj, np.datetime64)`
|
| 1084 |
+
|
| 1085 |
+
Parameters
|
| 1086 |
+
----------
|
| 1087 |
+
obj : object
|
| 1088 |
+
|
| 1089 |
+
Returns
|
| 1090 |
+
-------
|
| 1091 |
+
bool
|
| 1092 |
+
"""
|
| 1093 |
+
return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)
|
| 1094 |
+
|
| 1095 |
+
|
| 1096 |
+
cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil:
|
| 1097 |
+
"""
|
| 1098 |
+
returns the int64 value underlying scalar numpy datetime64 object
|
| 1099 |
+
|
| 1100 |
+
Note that to interpret this as a datetime, the corresponding unit is
|
| 1101 |
+
also needed. That can be found using `get_datetime64_unit`.
|
| 1102 |
+
"""
|
| 1103 |
+
return (<PyDatetimeScalarObject*>obj).obval
|
| 1104 |
+
|
| 1105 |
+
|
| 1106 |
+
cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil:
|
| 1107 |
+
"""
|
| 1108 |
+
returns the int64 value underlying scalar numpy timedelta64 object
|
| 1109 |
+
"""
|
| 1110 |
+
return (<PyTimedeltaScalarObject*>obj).obval
|
| 1111 |
+
|
| 1112 |
+
|
| 1113 |
+
cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil:
|
| 1114 |
+
"""
|
| 1115 |
+
returns the unit part of the dtype for a numpy datetime64 object.
|
| 1116 |
+
"""
|
| 1117 |
+
return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base
|
| 1118 |
+
|
| 1119 |
+
|
| 1120 |
+
cdef extern from "numpy/arrayobject.h":
|
| 1121 |
+
|
| 1122 |
+
ctypedef struct NpyIter:
|
| 1123 |
+
pass
|
| 1124 |
+
|
| 1125 |
+
cdef enum:
|
| 1126 |
+
NPY_FAIL
|
| 1127 |
+
NPY_SUCCEED
|
| 1128 |
+
|
| 1129 |
+
cdef enum:
|
| 1130 |
+
# Track an index representing C order
|
| 1131 |
+
NPY_ITER_C_INDEX
|
| 1132 |
+
# Track an index representing Fortran order
|
| 1133 |
+
NPY_ITER_F_INDEX
|
| 1134 |
+
# Track a multi-index
|
| 1135 |
+
NPY_ITER_MULTI_INDEX
|
| 1136 |
+
# User code external to the iterator does the 1-dimensional innermost loop
|
| 1137 |
+
NPY_ITER_EXTERNAL_LOOP
|
| 1138 |
+
# Convert all the operands to a common data type
|
| 1139 |
+
NPY_ITER_COMMON_DTYPE
|
| 1140 |
+
# Operands may hold references, requiring API access during iteration
|
| 1141 |
+
NPY_ITER_REFS_OK
|
| 1142 |
+
# Zero-sized operands should be permitted, iteration checks IterSize for 0
|
| 1143 |
+
NPY_ITER_ZEROSIZE_OK
|
| 1144 |
+
# Permits reductions (size-0 stride with dimension size > 1)
|
| 1145 |
+
NPY_ITER_REDUCE_OK
|
| 1146 |
+
# Enables sub-range iteration
|
| 1147 |
+
NPY_ITER_RANGED
|
| 1148 |
+
# Enables buffering
|
| 1149 |
+
NPY_ITER_BUFFERED
|
| 1150 |
+
# When buffering is enabled, grows the inner loop if possible
|
| 1151 |
+
NPY_ITER_GROWINNER
|
| 1152 |
+
# Delay allocation of buffers until first Reset* call
|
| 1153 |
+
NPY_ITER_DELAY_BUFALLOC
|
| 1154 |
+
# When NPY_KEEPORDER is specified, disable reversing negative-stride axes
|
| 1155 |
+
NPY_ITER_DONT_NEGATE_STRIDES
|
| 1156 |
+
NPY_ITER_COPY_IF_OVERLAP
|
| 1157 |
+
# The operand will be read from and written to
|
| 1158 |
+
NPY_ITER_READWRITE
|
| 1159 |
+
# The operand will only be read from
|
| 1160 |
+
NPY_ITER_READONLY
|
| 1161 |
+
# The operand will only be written to
|
| 1162 |
+
NPY_ITER_WRITEONLY
|
| 1163 |
+
# The operand's data must be in native byte order
|
| 1164 |
+
NPY_ITER_NBO
|
| 1165 |
+
# The operand's data must be aligned
|
| 1166 |
+
NPY_ITER_ALIGNED
|
| 1167 |
+
# The operand's data must be contiguous (within the inner loop)
|
| 1168 |
+
NPY_ITER_CONTIG
|
| 1169 |
+
# The operand may be copied to satisfy requirements
|
| 1170 |
+
NPY_ITER_COPY
|
| 1171 |
+
# The operand may be copied with WRITEBACKIFCOPY to satisfy requirements
|
| 1172 |
+
NPY_ITER_UPDATEIFCOPY
|
| 1173 |
+
# Allocate the operand if it is NULL
|
| 1174 |
+
NPY_ITER_ALLOCATE
|
| 1175 |
+
# If an operand is allocated, don't use any subtype
|
| 1176 |
+
NPY_ITER_NO_SUBTYPE
|
| 1177 |
+
# This is a virtual array slot, operand is NULL but temporary data is there
|
| 1178 |
+
NPY_ITER_VIRTUAL
|
| 1179 |
+
# Require that the dimension match the iterator dimensions exactly
|
| 1180 |
+
NPY_ITER_NO_BROADCAST
|
| 1181 |
+
# A mask is being used on this array, affects buffer -> array copy
|
| 1182 |
+
NPY_ITER_WRITEMASKED
|
| 1183 |
+
# This array is the mask for all WRITEMASKED operands
|
| 1184 |
+
NPY_ITER_ARRAYMASK
|
| 1185 |
+
# Assume iterator order data access for COPY_IF_OVERLAP
|
| 1186 |
+
NPY_ITER_OVERLAP_ASSUME_ELEMENTWISE
|
| 1187 |
+
|
| 1188 |
+
# construction and destruction functions
|
| 1189 |
+
NpyIter* NpyIter_New(ndarray arr, npy_uint32 flags, NPY_ORDER order,
|
| 1190 |
+
NPY_CASTING casting, dtype datatype) except NULL
|
| 1191 |
+
NpyIter* NpyIter_MultiNew(npy_intp nop, PyArrayObject** op, npy_uint32 flags,
|
| 1192 |
+
NPY_ORDER order, NPY_CASTING casting, npy_uint32*
|
| 1193 |
+
op_flags, PyArray_Descr** op_dtypes) except NULL
|
| 1194 |
+
NpyIter* NpyIter_AdvancedNew(npy_intp nop, PyArrayObject** op,
|
| 1195 |
+
npy_uint32 flags, NPY_ORDER order,
|
| 1196 |
+
NPY_CASTING casting, npy_uint32* op_flags,
|
| 1197 |
+
PyArray_Descr** op_dtypes, int oa_ndim,
|
| 1198 |
+
int** op_axes, const npy_intp* itershape,
|
| 1199 |
+
npy_intp buffersize) except NULL
|
| 1200 |
+
NpyIter* NpyIter_Copy(NpyIter* it) except NULL
|
| 1201 |
+
int NpyIter_RemoveAxis(NpyIter* it, int axis) except NPY_FAIL
|
| 1202 |
+
int NpyIter_RemoveMultiIndex(NpyIter* it) except NPY_FAIL
|
| 1203 |
+
int NpyIter_EnableExternalLoop(NpyIter* it) except NPY_FAIL
|
| 1204 |
+
int NpyIter_Deallocate(NpyIter* it) except NPY_FAIL
|
| 1205 |
+
int NpyIter_Reset(NpyIter* it, char** errmsg) except NPY_FAIL
|
| 1206 |
+
int NpyIter_ResetToIterIndexRange(NpyIter* it, npy_intp istart,
|
| 1207 |
+
npy_intp iend, char** errmsg) except NPY_FAIL
|
| 1208 |
+
int NpyIter_ResetBasePointers(NpyIter* it, char** baseptrs, char** errmsg) except NPY_FAIL
|
| 1209 |
+
int NpyIter_GotoMultiIndex(NpyIter* it, const npy_intp* multi_index) except NPY_FAIL
|
| 1210 |
+
int NpyIter_GotoIndex(NpyIter* it, npy_intp index) except NPY_FAIL
|
| 1211 |
+
npy_intp NpyIter_GetIterSize(NpyIter* it) nogil
|
| 1212 |
+
npy_intp NpyIter_GetIterIndex(NpyIter* it) nogil
|
| 1213 |
+
void NpyIter_GetIterIndexRange(NpyIter* it, npy_intp* istart,
|
| 1214 |
+
npy_intp* iend) nogil
|
| 1215 |
+
int NpyIter_GotoIterIndex(NpyIter* it, npy_intp iterindex) except NPY_FAIL
|
| 1216 |
+
npy_bool NpyIter_HasDelayedBufAlloc(NpyIter* it) nogil
|
| 1217 |
+
npy_bool NpyIter_HasExternalLoop(NpyIter* it) nogil
|
| 1218 |
+
npy_bool NpyIter_HasMultiIndex(NpyIter* it) nogil
|
| 1219 |
+
npy_bool NpyIter_HasIndex(NpyIter* it) nogil
|
| 1220 |
+
npy_bool NpyIter_RequiresBuffering(NpyIter* it) nogil
|
| 1221 |
+
npy_bool NpyIter_IsBuffered(NpyIter* it) nogil
|
| 1222 |
+
npy_bool NpyIter_IsGrowInner(NpyIter* it) nogil
|
| 1223 |
+
npy_intp NpyIter_GetBufferSize(NpyIter* it) nogil
|
| 1224 |
+
int NpyIter_GetNDim(NpyIter* it) nogil
|
| 1225 |
+
int NpyIter_GetNOp(NpyIter* it) nogil
|
| 1226 |
+
npy_intp* NpyIter_GetAxisStrideArray(NpyIter* it, int axis) except NULL
|
| 1227 |
+
int NpyIter_GetShape(NpyIter* it, npy_intp* outshape) nogil
|
| 1228 |
+
PyArray_Descr** NpyIter_GetDescrArray(NpyIter* it)
|
| 1229 |
+
PyArrayObject** NpyIter_GetOperandArray(NpyIter* it)
|
| 1230 |
+
ndarray NpyIter_GetIterView(NpyIter* it, npy_intp i)
|
| 1231 |
+
void NpyIter_GetReadFlags(NpyIter* it, char* outreadflags)
|
| 1232 |
+
void NpyIter_GetWriteFlags(NpyIter* it, char* outwriteflags)
|
| 1233 |
+
int NpyIter_CreateCompatibleStrides(NpyIter* it, npy_intp itemsize,
|
| 1234 |
+
npy_intp* outstrides) except NPY_FAIL
|
| 1235 |
+
npy_bool NpyIter_IsFirstVisit(NpyIter* it, int iop) nogil
|
| 1236 |
+
# functions for iterating an NpyIter object
|
| 1237 |
+
#
|
| 1238 |
+
# These don't match the definition in the C API because Cython can't wrap
|
| 1239 |
+
# function pointers that return functions.
|
| 1240 |
+
NpyIter_IterNextFunc NpyIter_GetIterNext(NpyIter* it, char** errmsg) except NULL
|
| 1241 |
+
NpyIter_GetMultiIndexFunc NpyIter_GetGetMultiIndex(NpyIter* it,
|
| 1242 |
+
char** errmsg) except NULL
|
| 1243 |
+
char** NpyIter_GetDataPtrArray(NpyIter* it) nogil
|
| 1244 |
+
char** NpyIter_GetInitialDataPtrArray(NpyIter* it) nogil
|
| 1245 |
+
npy_intp* NpyIter_GetIndexPtr(NpyIter* it)
|
| 1246 |
+
npy_intp* NpyIter_GetInnerStrideArray(NpyIter* it) nogil
|
| 1247 |
+
npy_intp* NpyIter_GetInnerLoopSizePtr(NpyIter* it) nogil
|
| 1248 |
+
void NpyIter_GetInnerFixedStrideArray(NpyIter* it, npy_intp* outstrides) nogil
|
| 1249 |
+
npy_bool NpyIter_IterationNeedsAPI(NpyIter* it) nogil
|
| 1250 |
+
void NpyIter_DebugPrint(NpyIter* it)
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__init__.pxd
ADDED
|
@@ -0,0 +1,1164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# NumPy static imports for Cython < 3.0
|
| 2 |
+
#
|
| 3 |
+
# If any of the PyArray_* functions are called, import_array must be
|
| 4 |
+
# called first.
|
| 5 |
+
#
|
| 6 |
+
# Author: Dag Sverre Seljebotn
|
| 7 |
+
#
|
| 8 |
+
|
| 9 |
+
DEF _buffer_format_string_len = 255
|
| 10 |
+
|
| 11 |
+
cimport cpython.buffer as pybuf
|
| 12 |
+
from cpython.ref cimport Py_INCREF
|
| 13 |
+
from cpython.mem cimport PyObject_Malloc, PyObject_Free
|
| 14 |
+
from cpython.object cimport PyObject, PyTypeObject
|
| 15 |
+
from cpython.buffer cimport PyObject_GetBuffer
|
| 16 |
+
from cpython.type cimport type
|
| 17 |
+
cimport libc.stdio as stdio
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
cdef extern from *:
|
| 21 |
+
# Leave a marker that the NumPy declarations came from NumPy itself and not from Cython.
|
| 22 |
+
# See https://github.com/cython/cython/issues/3573
|
| 23 |
+
"""
|
| 24 |
+
/* Using NumPy API declarations from "numpy/__init__.pxd" */
|
| 25 |
+
"""
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
cdef extern from "Python.h":
|
| 29 |
+
ctypedef int Py_intptr_t
|
| 30 |
+
bint PyObject_TypeCheck(object obj, PyTypeObject* type)
|
| 31 |
+
|
| 32 |
+
cdef extern from "numpy/arrayobject.h":
|
| 33 |
+
# It would be nice to use size_t and ssize_t, but ssize_t has special
|
| 34 |
+
# implicit conversion rules, so just use "long".
|
| 35 |
+
# Note: The actual type only matters for Cython promotion, so long
|
| 36 |
+
# is closer than int, but could lead to incorrect promotion.
|
| 37 |
+
# (Not to worrying, and always the status-quo.)
|
| 38 |
+
ctypedef signed long npy_intp
|
| 39 |
+
ctypedef unsigned long npy_uintp
|
| 40 |
+
|
| 41 |
+
ctypedef unsigned char npy_bool
|
| 42 |
+
|
| 43 |
+
ctypedef signed char npy_byte
|
| 44 |
+
ctypedef signed short npy_short
|
| 45 |
+
ctypedef signed int npy_int
|
| 46 |
+
ctypedef signed long npy_long
|
| 47 |
+
ctypedef signed long long npy_longlong
|
| 48 |
+
|
| 49 |
+
ctypedef unsigned char npy_ubyte
|
| 50 |
+
ctypedef unsigned short npy_ushort
|
| 51 |
+
ctypedef unsigned int npy_uint
|
| 52 |
+
ctypedef unsigned long npy_ulong
|
| 53 |
+
ctypedef unsigned long long npy_ulonglong
|
| 54 |
+
|
| 55 |
+
ctypedef float npy_float
|
| 56 |
+
ctypedef double npy_double
|
| 57 |
+
ctypedef long double npy_longdouble
|
| 58 |
+
|
| 59 |
+
ctypedef signed char npy_int8
|
| 60 |
+
ctypedef signed short npy_int16
|
| 61 |
+
ctypedef signed int npy_int32
|
| 62 |
+
ctypedef signed long long npy_int64
|
| 63 |
+
ctypedef signed long long npy_int96
|
| 64 |
+
ctypedef signed long long npy_int128
|
| 65 |
+
|
| 66 |
+
ctypedef unsigned char npy_uint8
|
| 67 |
+
ctypedef unsigned short npy_uint16
|
| 68 |
+
ctypedef unsigned int npy_uint32
|
| 69 |
+
ctypedef unsigned long long npy_uint64
|
| 70 |
+
ctypedef unsigned long long npy_uint96
|
| 71 |
+
ctypedef unsigned long long npy_uint128
|
| 72 |
+
|
| 73 |
+
ctypedef float npy_float32
|
| 74 |
+
ctypedef double npy_float64
|
| 75 |
+
ctypedef long double npy_float80
|
| 76 |
+
ctypedef long double npy_float96
|
| 77 |
+
ctypedef long double npy_float128
|
| 78 |
+
|
| 79 |
+
ctypedef struct npy_cfloat:
|
| 80 |
+
pass
|
| 81 |
+
|
| 82 |
+
ctypedef struct npy_cdouble:
|
| 83 |
+
pass
|
| 84 |
+
|
| 85 |
+
ctypedef struct npy_clongdouble:
|
| 86 |
+
pass
|
| 87 |
+
|
| 88 |
+
ctypedef struct npy_complex64:
|
| 89 |
+
pass
|
| 90 |
+
|
| 91 |
+
ctypedef struct npy_complex128:
|
| 92 |
+
pass
|
| 93 |
+
|
| 94 |
+
ctypedef struct npy_complex160:
|
| 95 |
+
pass
|
| 96 |
+
|
| 97 |
+
ctypedef struct npy_complex192:
|
| 98 |
+
pass
|
| 99 |
+
|
| 100 |
+
ctypedef struct npy_complex256:
|
| 101 |
+
pass
|
| 102 |
+
|
| 103 |
+
ctypedef struct PyArray_Dims:
|
| 104 |
+
npy_intp *ptr
|
| 105 |
+
int len
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
cdef enum NPY_TYPES:
|
| 109 |
+
NPY_BOOL
|
| 110 |
+
NPY_BYTE
|
| 111 |
+
NPY_UBYTE
|
| 112 |
+
NPY_SHORT
|
| 113 |
+
NPY_USHORT
|
| 114 |
+
NPY_INT
|
| 115 |
+
NPY_UINT
|
| 116 |
+
NPY_LONG
|
| 117 |
+
NPY_ULONG
|
| 118 |
+
NPY_LONGLONG
|
| 119 |
+
NPY_ULONGLONG
|
| 120 |
+
NPY_FLOAT
|
| 121 |
+
NPY_DOUBLE
|
| 122 |
+
NPY_LONGDOUBLE
|
| 123 |
+
NPY_CFLOAT
|
| 124 |
+
NPY_CDOUBLE
|
| 125 |
+
NPY_CLONGDOUBLE
|
| 126 |
+
NPY_OBJECT
|
| 127 |
+
NPY_STRING
|
| 128 |
+
NPY_UNICODE
|
| 129 |
+
NPY_VOID
|
| 130 |
+
NPY_DATETIME
|
| 131 |
+
NPY_TIMEDELTA
|
| 132 |
+
NPY_NTYPES_LEGACY
|
| 133 |
+
NPY_NOTYPE
|
| 134 |
+
|
| 135 |
+
NPY_INT8
|
| 136 |
+
NPY_INT16
|
| 137 |
+
NPY_INT32
|
| 138 |
+
NPY_INT64
|
| 139 |
+
NPY_INT128
|
| 140 |
+
NPY_INT256
|
| 141 |
+
NPY_UINT8
|
| 142 |
+
NPY_UINT16
|
| 143 |
+
NPY_UINT32
|
| 144 |
+
NPY_UINT64
|
| 145 |
+
NPY_UINT128
|
| 146 |
+
NPY_UINT256
|
| 147 |
+
NPY_FLOAT16
|
| 148 |
+
NPY_FLOAT32
|
| 149 |
+
NPY_FLOAT64
|
| 150 |
+
NPY_FLOAT80
|
| 151 |
+
NPY_FLOAT96
|
| 152 |
+
NPY_FLOAT128
|
| 153 |
+
NPY_FLOAT256
|
| 154 |
+
NPY_COMPLEX32
|
| 155 |
+
NPY_COMPLEX64
|
| 156 |
+
NPY_COMPLEX128
|
| 157 |
+
NPY_COMPLEX160
|
| 158 |
+
NPY_COMPLEX192
|
| 159 |
+
NPY_COMPLEX256
|
| 160 |
+
NPY_COMPLEX512
|
| 161 |
+
|
| 162 |
+
NPY_INTP
|
| 163 |
+
NPY_UINTP
|
| 164 |
+
NPY_DEFAULT_INT # Not a compile time constant (normally)!
|
| 165 |
+
|
| 166 |
+
ctypedef enum NPY_ORDER:
|
| 167 |
+
NPY_ANYORDER
|
| 168 |
+
NPY_CORDER
|
| 169 |
+
NPY_FORTRANORDER
|
| 170 |
+
NPY_KEEPORDER
|
| 171 |
+
|
| 172 |
+
ctypedef enum NPY_CASTING:
|
| 173 |
+
NPY_NO_CASTING
|
| 174 |
+
NPY_EQUIV_CASTING
|
| 175 |
+
NPY_SAFE_CASTING
|
| 176 |
+
NPY_SAME_KIND_CASTING
|
| 177 |
+
NPY_UNSAFE_CASTING
|
| 178 |
+
|
| 179 |
+
ctypedef enum NPY_CLIPMODE:
|
| 180 |
+
NPY_CLIP
|
| 181 |
+
NPY_WRAP
|
| 182 |
+
NPY_RAISE
|
| 183 |
+
|
| 184 |
+
ctypedef enum NPY_SCALARKIND:
|
| 185 |
+
NPY_NOSCALAR,
|
| 186 |
+
NPY_BOOL_SCALAR,
|
| 187 |
+
NPY_INTPOS_SCALAR,
|
| 188 |
+
NPY_INTNEG_SCALAR,
|
| 189 |
+
NPY_FLOAT_SCALAR,
|
| 190 |
+
NPY_COMPLEX_SCALAR,
|
| 191 |
+
NPY_OBJECT_SCALAR
|
| 192 |
+
|
| 193 |
+
ctypedef enum NPY_SORTKIND:
|
| 194 |
+
NPY_QUICKSORT
|
| 195 |
+
NPY_HEAPSORT
|
| 196 |
+
NPY_MERGESORT
|
| 197 |
+
|
| 198 |
+
ctypedef enum NPY_SEARCHSIDE:
|
| 199 |
+
NPY_SEARCHLEFT
|
| 200 |
+
NPY_SEARCHRIGHT
|
| 201 |
+
|
| 202 |
+
enum:
|
| 203 |
+
# DEPRECATED since NumPy 1.7 ! Do not use in new code!
|
| 204 |
+
NPY_C_CONTIGUOUS
|
| 205 |
+
NPY_F_CONTIGUOUS
|
| 206 |
+
NPY_CONTIGUOUS
|
| 207 |
+
NPY_FORTRAN
|
| 208 |
+
NPY_OWNDATA
|
| 209 |
+
NPY_FORCECAST
|
| 210 |
+
NPY_ENSURECOPY
|
| 211 |
+
NPY_ENSUREARRAY
|
| 212 |
+
NPY_ELEMENTSTRIDES
|
| 213 |
+
NPY_ALIGNED
|
| 214 |
+
NPY_NOTSWAPPED
|
| 215 |
+
NPY_WRITEABLE
|
| 216 |
+
NPY_ARR_HAS_DESCR
|
| 217 |
+
|
| 218 |
+
NPY_BEHAVED
|
| 219 |
+
NPY_BEHAVED_NS
|
| 220 |
+
NPY_CARRAY
|
| 221 |
+
NPY_CARRAY_RO
|
| 222 |
+
NPY_FARRAY
|
| 223 |
+
NPY_FARRAY_RO
|
| 224 |
+
NPY_DEFAULT
|
| 225 |
+
|
| 226 |
+
NPY_IN_ARRAY
|
| 227 |
+
NPY_OUT_ARRAY
|
| 228 |
+
NPY_INOUT_ARRAY
|
| 229 |
+
NPY_IN_FARRAY
|
| 230 |
+
NPY_OUT_FARRAY
|
| 231 |
+
NPY_INOUT_FARRAY
|
| 232 |
+
|
| 233 |
+
NPY_UPDATE_ALL
|
| 234 |
+
|
| 235 |
+
enum:
|
| 236 |
+
# Added in NumPy 1.7 to replace the deprecated enums above.
|
| 237 |
+
NPY_ARRAY_C_CONTIGUOUS
|
| 238 |
+
NPY_ARRAY_F_CONTIGUOUS
|
| 239 |
+
NPY_ARRAY_OWNDATA
|
| 240 |
+
NPY_ARRAY_FORCECAST
|
| 241 |
+
NPY_ARRAY_ENSURECOPY
|
| 242 |
+
NPY_ARRAY_ENSUREARRAY
|
| 243 |
+
NPY_ARRAY_ELEMENTSTRIDES
|
| 244 |
+
NPY_ARRAY_ALIGNED
|
| 245 |
+
NPY_ARRAY_NOTSWAPPED
|
| 246 |
+
NPY_ARRAY_WRITEABLE
|
| 247 |
+
NPY_ARRAY_WRITEBACKIFCOPY
|
| 248 |
+
|
| 249 |
+
NPY_ARRAY_BEHAVED
|
| 250 |
+
NPY_ARRAY_BEHAVED_NS
|
| 251 |
+
NPY_ARRAY_CARRAY
|
| 252 |
+
NPY_ARRAY_CARRAY_RO
|
| 253 |
+
NPY_ARRAY_FARRAY
|
| 254 |
+
NPY_ARRAY_FARRAY_RO
|
| 255 |
+
NPY_ARRAY_DEFAULT
|
| 256 |
+
|
| 257 |
+
NPY_ARRAY_IN_ARRAY
|
| 258 |
+
NPY_ARRAY_OUT_ARRAY
|
| 259 |
+
NPY_ARRAY_INOUT_ARRAY
|
| 260 |
+
NPY_ARRAY_IN_FARRAY
|
| 261 |
+
NPY_ARRAY_OUT_FARRAY
|
| 262 |
+
NPY_ARRAY_INOUT_FARRAY
|
| 263 |
+
|
| 264 |
+
NPY_ARRAY_UPDATE_ALL
|
| 265 |
+
|
| 266 |
+
cdef enum:
|
| 267 |
+
NPY_MAXDIMS # 64 on NumPy 2.x and 32 on NumPy 1.x
|
| 268 |
+
NPY_RAVEL_AXIS # Used for functions like PyArray_Mean
|
| 269 |
+
|
| 270 |
+
ctypedef void (*PyArray_VectorUnaryFunc)(void *, void *, npy_intp, void *, void *)
|
| 271 |
+
|
| 272 |
+
ctypedef struct PyArray_ArrayDescr:
|
| 273 |
+
# shape is a tuple, but Cython doesn't support "tuple shape"
|
| 274 |
+
# inside a non-PyObject declaration, so we have to declare it
|
| 275 |
+
# as just a PyObject*.
|
| 276 |
+
PyObject* shape
|
| 277 |
+
|
| 278 |
+
ctypedef struct PyArray_Descr:
|
| 279 |
+
pass
|
| 280 |
+
|
| 281 |
+
ctypedef class numpy.dtype [object PyArray_Descr, check_size ignore]:
|
| 282 |
+
# Use PyDataType_* macros when possible, however there are no macros
|
| 283 |
+
# for accessing some of the fields, so some are defined.
|
| 284 |
+
cdef PyTypeObject* typeobj
|
| 285 |
+
cdef char kind
|
| 286 |
+
cdef char type
|
| 287 |
+
# Numpy sometimes mutates this without warning (e.g. it'll
|
| 288 |
+
# sometimes change "|" to "<" in shared dtype objects on
|
| 289 |
+
# little-endian machines). If this matters to you, use
|
| 290 |
+
# PyArray_IsNativeByteOrder(dtype.byteorder) instead of
|
| 291 |
+
# directly accessing this field.
|
| 292 |
+
cdef char byteorder
|
| 293 |
+
# Flags are not directly accessible on Cython <3. Use PyDataType_FLAGS.
|
| 294 |
+
# cdef char flags
|
| 295 |
+
cdef int type_num
|
| 296 |
+
# itemsize/elsize, alignment, fields, names, and subarray must
|
| 297 |
+
# use the `PyDataType_*` accessor macros. With Cython 3 you can
|
| 298 |
+
# still use getter attributes `dtype.itemsize`
|
| 299 |
+
|
| 300 |
+
ctypedef class numpy.flatiter [object PyArrayIterObject, check_size ignore]:
|
| 301 |
+
# Use through macros
|
| 302 |
+
pass
|
| 303 |
+
|
| 304 |
+
ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
|
| 305 |
+
cdef int numiter
|
| 306 |
+
cdef npy_intp size, index
|
| 307 |
+
cdef int nd
|
| 308 |
+
cdef npy_intp *dimensions
|
| 309 |
+
cdef void **iters
|
| 310 |
+
|
| 311 |
+
ctypedef struct PyArrayObject:
|
| 312 |
+
# For use in situations where ndarray can't replace PyArrayObject*,
|
| 313 |
+
# like PyArrayObject**.
|
| 314 |
+
pass
|
| 315 |
+
|
| 316 |
+
ctypedef class numpy.ndarray [object PyArrayObject, check_size ignore]:
|
| 317 |
+
cdef __cythonbufferdefaults__ = {"mode": "strided"}
|
| 318 |
+
|
| 319 |
+
cdef:
|
| 320 |
+
# Only taking a few of the most commonly used and stable fields.
|
| 321 |
+
# One should use PyArray_* macros instead to access the C fields.
|
| 322 |
+
char *data
|
| 323 |
+
int ndim "nd"
|
| 324 |
+
npy_intp *shape "dimensions"
|
| 325 |
+
npy_intp *strides
|
| 326 |
+
dtype descr # deprecated since NumPy 1.7 !
|
| 327 |
+
PyObject* base # NOT PUBLIC, DO NOT USE !
|
| 328 |
+
|
| 329 |
+
|
| 330 |
+
int _import_array() except -1
|
| 331 |
+
# A second definition so _import_array isn't marked as used when we use it here.
|
| 332 |
+
# Do not use - subject to change any time.
|
| 333 |
+
int __pyx_import_array "_import_array"() except -1
|
| 334 |
+
|
| 335 |
+
#
|
| 336 |
+
# Macros from ndarrayobject.h
|
| 337 |
+
#
|
| 338 |
+
bint PyArray_CHKFLAGS(ndarray m, int flags) nogil
|
| 339 |
+
bint PyArray_IS_C_CONTIGUOUS(ndarray arr) nogil
|
| 340 |
+
bint PyArray_IS_F_CONTIGUOUS(ndarray arr) nogil
|
| 341 |
+
bint PyArray_ISCONTIGUOUS(ndarray m) nogil
|
| 342 |
+
bint PyArray_ISWRITEABLE(ndarray m) nogil
|
| 343 |
+
bint PyArray_ISALIGNED(ndarray m) nogil
|
| 344 |
+
|
| 345 |
+
int PyArray_NDIM(ndarray) nogil
|
| 346 |
+
bint PyArray_ISONESEGMENT(ndarray) nogil
|
| 347 |
+
bint PyArray_ISFORTRAN(ndarray) nogil
|
| 348 |
+
int PyArray_FORTRANIF(ndarray) nogil
|
| 349 |
+
|
| 350 |
+
void* PyArray_DATA(ndarray) nogil
|
| 351 |
+
char* PyArray_BYTES(ndarray) nogil
|
| 352 |
+
|
| 353 |
+
npy_intp* PyArray_DIMS(ndarray) nogil
|
| 354 |
+
npy_intp* PyArray_STRIDES(ndarray) nogil
|
| 355 |
+
npy_intp PyArray_DIM(ndarray, size_t) nogil
|
| 356 |
+
npy_intp PyArray_STRIDE(ndarray, size_t) nogil
|
| 357 |
+
|
| 358 |
+
PyObject *PyArray_BASE(ndarray) nogil # returns borrowed reference!
|
| 359 |
+
PyArray_Descr *PyArray_DESCR(ndarray) nogil # returns borrowed reference to dtype!
|
| 360 |
+
PyArray_Descr *PyArray_DTYPE(ndarray) nogil # returns borrowed reference to dtype! NP 1.7+ alias for descr.
|
| 361 |
+
int PyArray_FLAGS(ndarray) nogil
|
| 362 |
+
void PyArray_CLEARFLAGS(ndarray, int flags) nogil # Added in NumPy 1.7
|
| 363 |
+
void PyArray_ENABLEFLAGS(ndarray, int flags) nogil # Added in NumPy 1.7
|
| 364 |
+
npy_intp PyArray_ITEMSIZE(ndarray) nogil
|
| 365 |
+
int PyArray_TYPE(ndarray arr) nogil
|
| 366 |
+
|
| 367 |
+
object PyArray_GETITEM(ndarray arr, void *itemptr)
|
| 368 |
+
int PyArray_SETITEM(ndarray arr, void *itemptr, object obj) except -1
|
| 369 |
+
|
| 370 |
+
bint PyTypeNum_ISBOOL(int) nogil
|
| 371 |
+
bint PyTypeNum_ISUNSIGNED(int) nogil
|
| 372 |
+
bint PyTypeNum_ISSIGNED(int) nogil
|
| 373 |
+
bint PyTypeNum_ISINTEGER(int) nogil
|
| 374 |
+
bint PyTypeNum_ISFLOAT(int) nogil
|
| 375 |
+
bint PyTypeNum_ISNUMBER(int) nogil
|
| 376 |
+
bint PyTypeNum_ISSTRING(int) nogil
|
| 377 |
+
bint PyTypeNum_ISCOMPLEX(int) nogil
|
| 378 |
+
bint PyTypeNum_ISFLEXIBLE(int) nogil
|
| 379 |
+
bint PyTypeNum_ISUSERDEF(int) nogil
|
| 380 |
+
bint PyTypeNum_ISEXTENDED(int) nogil
|
| 381 |
+
bint PyTypeNum_ISOBJECT(int) nogil
|
| 382 |
+
|
| 383 |
+
npy_intp PyDataType_ELSIZE(dtype) nogil
|
| 384 |
+
npy_intp PyDataType_ALIGNMENT(dtype) nogil
|
| 385 |
+
PyObject* PyDataType_METADATA(dtype) nogil
|
| 386 |
+
PyArray_ArrayDescr* PyDataType_SUBARRAY(dtype) nogil
|
| 387 |
+
PyObject* PyDataType_NAMES(dtype) nogil
|
| 388 |
+
PyObject* PyDataType_FIELDS(dtype) nogil
|
| 389 |
+
|
| 390 |
+
bint PyDataType_ISBOOL(dtype) nogil
|
| 391 |
+
bint PyDataType_ISUNSIGNED(dtype) nogil
|
| 392 |
+
bint PyDataType_ISSIGNED(dtype) nogil
|
| 393 |
+
bint PyDataType_ISINTEGER(dtype) nogil
|
| 394 |
+
bint PyDataType_ISFLOAT(dtype) nogil
|
| 395 |
+
bint PyDataType_ISNUMBER(dtype) nogil
|
| 396 |
+
bint PyDataType_ISSTRING(dtype) nogil
|
| 397 |
+
bint PyDataType_ISCOMPLEX(dtype) nogil
|
| 398 |
+
bint PyDataType_ISFLEXIBLE(dtype) nogil
|
| 399 |
+
bint PyDataType_ISUSERDEF(dtype) nogil
|
| 400 |
+
bint PyDataType_ISEXTENDED(dtype) nogil
|
| 401 |
+
bint PyDataType_ISOBJECT(dtype) nogil
|
| 402 |
+
bint PyDataType_HASFIELDS(dtype) nogil
|
| 403 |
+
bint PyDataType_HASSUBARRAY(dtype) nogil
|
| 404 |
+
npy_uint64 PyDataType_FLAGS(dtype) nogil
|
| 405 |
+
|
| 406 |
+
bint PyArray_ISBOOL(ndarray) nogil
|
| 407 |
+
bint PyArray_ISUNSIGNED(ndarray) nogil
|
| 408 |
+
bint PyArray_ISSIGNED(ndarray) nogil
|
| 409 |
+
bint PyArray_ISINTEGER(ndarray) nogil
|
| 410 |
+
bint PyArray_ISFLOAT(ndarray) nogil
|
| 411 |
+
bint PyArray_ISNUMBER(ndarray) nogil
|
| 412 |
+
bint PyArray_ISSTRING(ndarray) nogil
|
| 413 |
+
bint PyArray_ISCOMPLEX(ndarray) nogil
|
| 414 |
+
bint PyArray_ISFLEXIBLE(ndarray) nogil
|
| 415 |
+
bint PyArray_ISUSERDEF(ndarray) nogil
|
| 416 |
+
bint PyArray_ISEXTENDED(ndarray) nogil
|
| 417 |
+
bint PyArray_ISOBJECT(ndarray) nogil
|
| 418 |
+
bint PyArray_HASFIELDS(ndarray) nogil
|
| 419 |
+
|
| 420 |
+
bint PyArray_ISVARIABLE(ndarray) nogil
|
| 421 |
+
|
| 422 |
+
bint PyArray_SAFEALIGNEDCOPY(ndarray) nogil
|
| 423 |
+
bint PyArray_ISNBO(char) nogil # works on ndarray.byteorder
|
| 424 |
+
bint PyArray_IsNativeByteOrder(char) nogil # works on ndarray.byteorder
|
| 425 |
+
bint PyArray_ISNOTSWAPPED(ndarray) nogil
|
| 426 |
+
bint PyArray_ISBYTESWAPPED(ndarray) nogil
|
| 427 |
+
|
| 428 |
+
bint PyArray_FLAGSWAP(ndarray, int) nogil
|
| 429 |
+
|
| 430 |
+
bint PyArray_ISCARRAY(ndarray) nogil
|
| 431 |
+
bint PyArray_ISCARRAY_RO(ndarray) nogil
|
| 432 |
+
bint PyArray_ISFARRAY(ndarray) nogil
|
| 433 |
+
bint PyArray_ISFARRAY_RO(ndarray) nogil
|
| 434 |
+
bint PyArray_ISBEHAVED(ndarray) nogil
|
| 435 |
+
bint PyArray_ISBEHAVED_RO(ndarray) nogil
|
| 436 |
+
|
| 437 |
+
|
| 438 |
+
bint PyDataType_ISNOTSWAPPED(dtype) nogil
|
| 439 |
+
bint PyDataType_ISBYTESWAPPED(dtype) nogil
|
| 440 |
+
|
| 441 |
+
bint PyArray_DescrCheck(object)
|
| 442 |
+
|
| 443 |
+
bint PyArray_Check(object)
|
| 444 |
+
bint PyArray_CheckExact(object)
|
| 445 |
+
|
| 446 |
+
# Cannot be supported due to out arg:
|
| 447 |
+
# bint PyArray_HasArrayInterfaceType(object, dtype, object, object&)
|
| 448 |
+
# bint PyArray_HasArrayInterface(op, out)
|
| 449 |
+
|
| 450 |
+
|
| 451 |
+
bint PyArray_IsZeroDim(object)
|
| 452 |
+
# Cannot be supported due to ## ## in macro:
|
| 453 |
+
# bint PyArray_IsScalar(object, verbatim work)
|
| 454 |
+
bint PyArray_CheckScalar(object)
|
| 455 |
+
bint PyArray_IsPythonNumber(object)
|
| 456 |
+
bint PyArray_IsPythonScalar(object)
|
| 457 |
+
bint PyArray_IsAnyScalar(object)
|
| 458 |
+
bint PyArray_CheckAnyScalar(object)
|
| 459 |
+
|
| 460 |
+
ndarray PyArray_GETCONTIGUOUS(ndarray)
|
| 461 |
+
bint PyArray_SAMESHAPE(ndarray, ndarray) nogil
|
| 462 |
+
npy_intp PyArray_SIZE(ndarray) nogil
|
| 463 |
+
npy_intp PyArray_NBYTES(ndarray) nogil
|
| 464 |
+
|
| 465 |
+
object PyArray_FROM_O(object)
|
| 466 |
+
object PyArray_FROM_OF(object m, int flags)
|
| 467 |
+
object PyArray_FROM_OT(object m, int type)
|
| 468 |
+
object PyArray_FROM_OTF(object m, int type, int flags)
|
| 469 |
+
object PyArray_FROMANY(object m, int type, int min, int max, int flags)
|
| 470 |
+
object PyArray_ZEROS(int nd, npy_intp* dims, int type, int fortran)
|
| 471 |
+
object PyArray_EMPTY(int nd, npy_intp* dims, int type, int fortran)
|
| 472 |
+
void PyArray_FILLWBYTE(ndarray, int val)
|
| 473 |
+
object PyArray_ContiguousFromAny(op, int, int min_depth, int max_depth)
|
| 474 |
+
unsigned char PyArray_EquivArrTypes(ndarray a1, ndarray a2)
|
| 475 |
+
bint PyArray_EquivByteorders(int b1, int b2) nogil
|
| 476 |
+
object PyArray_SimpleNew(int nd, npy_intp* dims, int typenum)
|
| 477 |
+
object PyArray_SimpleNewFromData(int nd, npy_intp* dims, int typenum, void* data)
|
| 478 |
+
#object PyArray_SimpleNewFromDescr(int nd, npy_intp* dims, dtype descr)
|
| 479 |
+
object PyArray_ToScalar(void* data, ndarray arr)
|
| 480 |
+
|
| 481 |
+
void* PyArray_GETPTR1(ndarray m, npy_intp i) nogil
|
| 482 |
+
void* PyArray_GETPTR2(ndarray m, npy_intp i, npy_intp j) nogil
|
| 483 |
+
void* PyArray_GETPTR3(ndarray m, npy_intp i, npy_intp j, npy_intp k) nogil
|
| 484 |
+
void* PyArray_GETPTR4(ndarray m, npy_intp i, npy_intp j, npy_intp k, npy_intp l) nogil
|
| 485 |
+
|
| 486 |
+
# Cannot be supported due to out arg
|
| 487 |
+
# void PyArray_DESCR_REPLACE(descr)
|
| 488 |
+
|
| 489 |
+
|
| 490 |
+
object PyArray_Copy(ndarray)
|
| 491 |
+
object PyArray_FromObject(object op, int type, int min_depth, int max_depth)
|
| 492 |
+
object PyArray_ContiguousFromObject(object op, int type, int min_depth, int max_depth)
|
| 493 |
+
object PyArray_CopyFromObject(object op, int type, int min_depth, int max_depth)
|
| 494 |
+
|
| 495 |
+
object PyArray_Cast(ndarray mp, int type_num)
|
| 496 |
+
object PyArray_Take(ndarray ap, object items, int axis)
|
| 497 |
+
object PyArray_Put(ndarray ap, object items, object values)
|
| 498 |
+
|
| 499 |
+
void PyArray_ITER_RESET(flatiter it) nogil
|
| 500 |
+
void PyArray_ITER_NEXT(flatiter it) nogil
|
| 501 |
+
void PyArray_ITER_GOTO(flatiter it, npy_intp* destination) nogil
|
| 502 |
+
void PyArray_ITER_GOTO1D(flatiter it, npy_intp ind) nogil
|
| 503 |
+
void* PyArray_ITER_DATA(flatiter it) nogil
|
| 504 |
+
bint PyArray_ITER_NOTDONE(flatiter it) nogil
|
| 505 |
+
|
| 506 |
+
void PyArray_MultiIter_RESET(broadcast multi) nogil
|
| 507 |
+
void PyArray_MultiIter_NEXT(broadcast multi) nogil
|
| 508 |
+
void PyArray_MultiIter_GOTO(broadcast multi, npy_intp dest) nogil
|
| 509 |
+
void PyArray_MultiIter_GOTO1D(broadcast multi, npy_intp ind) nogil
|
| 510 |
+
void* PyArray_MultiIter_DATA(broadcast multi, npy_intp i) nogil
|
| 511 |
+
void PyArray_MultiIter_NEXTi(broadcast multi, npy_intp i) nogil
|
| 512 |
+
bint PyArray_MultiIter_NOTDONE(broadcast multi) nogil
|
| 513 |
+
npy_intp PyArray_MultiIter_SIZE(broadcast multi) nogil
|
| 514 |
+
int PyArray_MultiIter_NDIM(broadcast multi) nogil
|
| 515 |
+
npy_intp PyArray_MultiIter_INDEX(broadcast multi) nogil
|
| 516 |
+
int PyArray_MultiIter_NUMITER(broadcast multi) nogil
|
| 517 |
+
npy_intp* PyArray_MultiIter_DIMS(broadcast multi) nogil
|
| 518 |
+
void** PyArray_MultiIter_ITERS(broadcast multi) nogil
|
| 519 |
+
|
| 520 |
+
# Functions from __multiarray_api.h
|
| 521 |
+
|
| 522 |
+
# Functions taking dtype and returning object/ndarray are disabled
|
| 523 |
+
# for now as they steal dtype references. I'm conservative and disable
|
| 524 |
+
# more than is probably needed until it can be checked further.
|
| 525 |
+
int PyArray_INCREF (ndarray) except * # uses PyArray_Item_INCREF...
|
| 526 |
+
int PyArray_XDECREF (ndarray) except * # uses PyArray_Item_DECREF...
|
| 527 |
+
dtype PyArray_DescrFromType (int)
|
| 528 |
+
object PyArray_TypeObjectFromType (int)
|
| 529 |
+
char * PyArray_Zero (ndarray)
|
| 530 |
+
char * PyArray_One (ndarray)
|
| 531 |
+
#object PyArray_CastToType (ndarray, dtype, int)
|
| 532 |
+
int PyArray_CanCastSafely (int, int) # writes errors
|
| 533 |
+
npy_bool PyArray_CanCastTo (dtype, dtype) # writes errors
|
| 534 |
+
int PyArray_ObjectType (object, int) except 0
|
| 535 |
+
dtype PyArray_DescrFromObject (object, dtype)
|
| 536 |
+
#ndarray* PyArray_ConvertToCommonType (object, int *)
|
| 537 |
+
dtype PyArray_DescrFromScalar (object)
|
| 538 |
+
dtype PyArray_DescrFromTypeObject (object)
|
| 539 |
+
npy_intp PyArray_Size (object)
|
| 540 |
+
#object PyArray_Scalar (void *, dtype, object)
|
| 541 |
+
#object PyArray_FromScalar (object, dtype)
|
| 542 |
+
void PyArray_ScalarAsCtype (object, void *)
|
| 543 |
+
#int PyArray_CastScalarToCtype (object, void *, dtype)
|
| 544 |
+
#int PyArray_CastScalarDirect (object, dtype, void *, int)
|
| 545 |
+
#PyArray_VectorUnaryFunc * PyArray_GetCastFunc (dtype, int)
|
| 546 |
+
#object PyArray_FromAny (object, dtype, int, int, int, object)
|
| 547 |
+
object PyArray_EnsureArray (object)
|
| 548 |
+
object PyArray_EnsureAnyArray (object)
|
| 549 |
+
#object PyArray_FromFile (stdio.FILE *, dtype, npy_intp, char *)
|
| 550 |
+
#object PyArray_FromString (char *, npy_intp, dtype, npy_intp, char *)
|
| 551 |
+
#object PyArray_FromBuffer (object, dtype, npy_intp, npy_intp)
|
| 552 |
+
#object PyArray_FromIter (object, dtype, npy_intp)
|
| 553 |
+
object PyArray_Return (ndarray)
|
| 554 |
+
#object PyArray_GetField (ndarray, dtype, int)
|
| 555 |
+
#int PyArray_SetField (ndarray, dtype, int, object) except -1
|
| 556 |
+
object PyArray_Byteswap (ndarray, npy_bool)
|
| 557 |
+
object PyArray_Resize (ndarray, PyArray_Dims *, int, NPY_ORDER)
|
| 558 |
+
int PyArray_CopyInto (ndarray, ndarray) except -1
|
| 559 |
+
int PyArray_CopyAnyInto (ndarray, ndarray) except -1
|
| 560 |
+
int PyArray_CopyObject (ndarray, object) except -1
|
| 561 |
+
object PyArray_NewCopy (ndarray, NPY_ORDER)
|
| 562 |
+
object PyArray_ToList (ndarray)
|
| 563 |
+
object PyArray_ToString (ndarray, NPY_ORDER)
|
| 564 |
+
int PyArray_ToFile (ndarray, stdio.FILE *, char *, char *) except -1
|
| 565 |
+
int PyArray_Dump (object, object, int) except -1
|
| 566 |
+
object PyArray_Dumps (object, int)
|
| 567 |
+
int PyArray_ValidType (int) # Cannot error
|
| 568 |
+
void PyArray_UpdateFlags (ndarray, int)
|
| 569 |
+
object PyArray_New (type, int, npy_intp *, int, npy_intp *, void *, int, int, object)
|
| 570 |
+
#object PyArray_NewFromDescr (type, dtype, int, npy_intp *, npy_intp *, void *, int, object)
|
| 571 |
+
#dtype PyArray_DescrNew (dtype)
|
| 572 |
+
dtype PyArray_DescrNewFromType (int)
|
| 573 |
+
double PyArray_GetPriority (object, double) # clears errors as of 1.25
|
| 574 |
+
object PyArray_IterNew (object)
|
| 575 |
+
object PyArray_MultiIterNew (int, ...)
|
| 576 |
+
|
| 577 |
+
int PyArray_PyIntAsInt (object) except? -1
|
| 578 |
+
npy_intp PyArray_PyIntAsIntp (object)
|
| 579 |
+
int PyArray_Broadcast (broadcast) except -1
|
| 580 |
+
int PyArray_FillWithScalar (ndarray, object) except -1
|
| 581 |
+
npy_bool PyArray_CheckStrides (int, int, npy_intp, npy_intp, npy_intp *, npy_intp *)
|
| 582 |
+
dtype PyArray_DescrNewByteorder (dtype, char)
|
| 583 |
+
object PyArray_IterAllButAxis (object, int *)
|
| 584 |
+
#object PyArray_CheckFromAny (object, dtype, int, int, int, object)
|
| 585 |
+
#object PyArray_FromArray (ndarray, dtype, int)
|
| 586 |
+
object PyArray_FromInterface (object)
|
| 587 |
+
object PyArray_FromStructInterface (object)
|
| 588 |
+
#object PyArray_FromArrayAttr (object, dtype, object)
|
| 589 |
+
#NPY_SCALARKIND PyArray_ScalarKind (int, ndarray*)
|
| 590 |
+
int PyArray_CanCoerceScalar (int, int, NPY_SCALARKIND)
|
| 591 |
+
npy_bool PyArray_CanCastScalar (type, type)
|
| 592 |
+
int PyArray_RemoveSmallest (broadcast) except -1
|
| 593 |
+
int PyArray_ElementStrides (object)
|
| 594 |
+
void PyArray_Item_INCREF (char *, dtype) except *
|
| 595 |
+
void PyArray_Item_XDECREF (char *, dtype) except *
|
| 596 |
+
object PyArray_Transpose (ndarray, PyArray_Dims *)
|
| 597 |
+
object PyArray_TakeFrom (ndarray, object, int, ndarray, NPY_CLIPMODE)
|
| 598 |
+
object PyArray_PutTo (ndarray, object, object, NPY_CLIPMODE)
|
| 599 |
+
object PyArray_PutMask (ndarray, object, object)
|
| 600 |
+
object PyArray_Repeat (ndarray, object, int)
|
| 601 |
+
object PyArray_Choose (ndarray, object, ndarray, NPY_CLIPMODE)
|
| 602 |
+
int PyArray_Sort (ndarray, int, NPY_SORTKIND) except -1
|
| 603 |
+
object PyArray_ArgSort (ndarray, int, NPY_SORTKIND)
|
| 604 |
+
object PyArray_SearchSorted (ndarray, object, NPY_SEARCHSIDE, PyObject *)
|
| 605 |
+
object PyArray_ArgMax (ndarray, int, ndarray)
|
| 606 |
+
object PyArray_ArgMin (ndarray, int, ndarray)
|
| 607 |
+
object PyArray_Reshape (ndarray, object)
|
| 608 |
+
object PyArray_Newshape (ndarray, PyArray_Dims *, NPY_ORDER)
|
| 609 |
+
object PyArray_Squeeze (ndarray)
|
| 610 |
+
#object PyArray_View (ndarray, dtype, type)
|
| 611 |
+
object PyArray_SwapAxes (ndarray, int, int)
|
| 612 |
+
object PyArray_Max (ndarray, int, ndarray)
|
| 613 |
+
object PyArray_Min (ndarray, int, ndarray)
|
| 614 |
+
object PyArray_Ptp (ndarray, int, ndarray)
|
| 615 |
+
object PyArray_Mean (ndarray, int, int, ndarray)
|
| 616 |
+
object PyArray_Trace (ndarray, int, int, int, int, ndarray)
|
| 617 |
+
object PyArray_Diagonal (ndarray, int, int, int)
|
| 618 |
+
object PyArray_Clip (ndarray, object, object, ndarray)
|
| 619 |
+
object PyArray_Conjugate (ndarray, ndarray)
|
| 620 |
+
object PyArray_Nonzero (ndarray)
|
| 621 |
+
object PyArray_Std (ndarray, int, int, ndarray, int)
|
| 622 |
+
object PyArray_Sum (ndarray, int, int, ndarray)
|
| 623 |
+
object PyArray_CumSum (ndarray, int, int, ndarray)
|
| 624 |
+
object PyArray_Prod (ndarray, int, int, ndarray)
|
| 625 |
+
object PyArray_CumProd (ndarray, int, int, ndarray)
|
| 626 |
+
object PyArray_All (ndarray, int, ndarray)
|
| 627 |
+
object PyArray_Any (ndarray, int, ndarray)
|
| 628 |
+
object PyArray_Compress (ndarray, object, int, ndarray)
|
| 629 |
+
object PyArray_Flatten (ndarray, NPY_ORDER)
|
| 630 |
+
object PyArray_Ravel (ndarray, NPY_ORDER)
|
| 631 |
+
npy_intp PyArray_MultiplyList (npy_intp *, int)
|
| 632 |
+
int PyArray_MultiplyIntList (int *, int)
|
| 633 |
+
void * PyArray_GetPtr (ndarray, npy_intp*)
|
| 634 |
+
int PyArray_CompareLists (npy_intp *, npy_intp *, int)
|
| 635 |
+
#int PyArray_AsCArray (object*, void *, npy_intp *, int, dtype)
|
| 636 |
+
int PyArray_Free (object, void *)
|
| 637 |
+
#int PyArray_Converter (object, object*)
|
| 638 |
+
int PyArray_IntpFromSequence (object, npy_intp *, int) except -1
|
| 639 |
+
object PyArray_Concatenate (object, int)
|
| 640 |
+
object PyArray_InnerProduct (object, object)
|
| 641 |
+
object PyArray_MatrixProduct (object, object)
|
| 642 |
+
object PyArray_Correlate (object, object, int)
|
| 643 |
+
#int PyArray_DescrConverter (object, dtype*) except 0
|
| 644 |
+
#int PyArray_DescrConverter2 (object, dtype*) except 0
|
| 645 |
+
int PyArray_IntpConverter (object, PyArray_Dims *) except 0
|
| 646 |
+
#int PyArray_BufferConverter (object, chunk) except 0
|
| 647 |
+
int PyArray_AxisConverter (object, int *) except 0
|
| 648 |
+
int PyArray_BoolConverter (object, npy_bool *) except 0
|
| 649 |
+
int PyArray_ByteorderConverter (object, char *) except 0
|
| 650 |
+
int PyArray_OrderConverter (object, NPY_ORDER *) except 0
|
| 651 |
+
unsigned char PyArray_EquivTypes (dtype, dtype) # clears errors
|
| 652 |
+
#object PyArray_Zeros (int, npy_intp *, dtype, int)
|
| 653 |
+
#object PyArray_Empty (int, npy_intp *, dtype, int)
|
| 654 |
+
object PyArray_Where (object, object, object)
|
| 655 |
+
object PyArray_Arange (double, double, double, int)
|
| 656 |
+
#object PyArray_ArangeObj (object, object, object, dtype)
|
| 657 |
+
int PyArray_SortkindConverter (object, NPY_SORTKIND *) except 0
|
| 658 |
+
object PyArray_LexSort (object, int)
|
| 659 |
+
object PyArray_Round (ndarray, int, ndarray)
|
| 660 |
+
unsigned char PyArray_EquivTypenums (int, int)
|
| 661 |
+
int PyArray_RegisterDataType (dtype) except -1
|
| 662 |
+
int PyArray_RegisterCastFunc (dtype, int, PyArray_VectorUnaryFunc *) except -1
|
| 663 |
+
int PyArray_RegisterCanCast (dtype, int, NPY_SCALARKIND) except -1
|
| 664 |
+
#void PyArray_InitArrFuncs (PyArray_ArrFuncs *)
|
| 665 |
+
object PyArray_IntTupleFromIntp (int, npy_intp *)
|
| 666 |
+
int PyArray_ClipmodeConverter (object, NPY_CLIPMODE *) except 0
|
| 667 |
+
#int PyArray_OutputConverter (object, ndarray*) except 0
|
| 668 |
+
object PyArray_BroadcastToShape (object, npy_intp *, int)
|
| 669 |
+
#int PyArray_DescrAlignConverter (object, dtype*) except 0
|
| 670 |
+
#int PyArray_DescrAlignConverter2 (object, dtype*) except 0
|
| 671 |
+
int PyArray_SearchsideConverter (object, void *) except 0
|
| 672 |
+
object PyArray_CheckAxis (ndarray, int *, int)
|
| 673 |
+
npy_intp PyArray_OverflowMultiplyList (npy_intp *, int)
|
| 674 |
+
int PyArray_SetBaseObject(ndarray, base) except -1 # NOTE: steals a reference to base! Use "set_array_base()" instead.
|
| 675 |
+
|
| 676 |
+
# The memory handler functions require the NumPy 1.22 API
|
| 677 |
+
# and may require defining NPY_TARGET_VERSION
|
| 678 |
+
ctypedef struct PyDataMemAllocator:
|
| 679 |
+
void *ctx
|
| 680 |
+
void* (*malloc) (void *ctx, size_t size)
|
| 681 |
+
void* (*calloc) (void *ctx, size_t nelem, size_t elsize)
|
| 682 |
+
void* (*realloc) (void *ctx, void *ptr, size_t new_size)
|
| 683 |
+
void (*free) (void *ctx, void *ptr, size_t size)
|
| 684 |
+
|
| 685 |
+
ctypedef struct PyDataMem_Handler:
|
| 686 |
+
char* name
|
| 687 |
+
npy_uint8 version
|
| 688 |
+
PyDataMemAllocator allocator
|
| 689 |
+
|
| 690 |
+
object PyDataMem_SetHandler(object handler)
|
| 691 |
+
object PyDataMem_GetHandler()
|
| 692 |
+
|
| 693 |
+
# additional datetime related functions are defined below
|
| 694 |
+
|
| 695 |
+
|
| 696 |
+
# Typedefs that matches the runtime dtype objects in
|
| 697 |
+
# the numpy module.
|
| 698 |
+
|
| 699 |
+
# The ones that are commented out needs an IFDEF function
|
| 700 |
+
# in Cython to enable them only on the right systems.
|
| 701 |
+
|
| 702 |
+
ctypedef npy_int8 int8_t
|
| 703 |
+
ctypedef npy_int16 int16_t
|
| 704 |
+
ctypedef npy_int32 int32_t
|
| 705 |
+
ctypedef npy_int64 int64_t
|
| 706 |
+
#ctypedef npy_int96 int96_t
|
| 707 |
+
#ctypedef npy_int128 int128_t
|
| 708 |
+
|
| 709 |
+
ctypedef npy_uint8 uint8_t
|
| 710 |
+
ctypedef npy_uint16 uint16_t
|
| 711 |
+
ctypedef npy_uint32 uint32_t
|
| 712 |
+
ctypedef npy_uint64 uint64_t
|
| 713 |
+
#ctypedef npy_uint96 uint96_t
|
| 714 |
+
#ctypedef npy_uint128 uint128_t
|
| 715 |
+
|
| 716 |
+
ctypedef npy_float32 float32_t
|
| 717 |
+
ctypedef npy_float64 float64_t
|
| 718 |
+
#ctypedef npy_float80 float80_t
|
| 719 |
+
#ctypedef npy_float128 float128_t
|
| 720 |
+
|
| 721 |
+
ctypedef float complex complex64_t
|
| 722 |
+
ctypedef double complex complex128_t
|
| 723 |
+
|
| 724 |
+
ctypedef npy_longlong longlong_t
|
| 725 |
+
ctypedef npy_ulonglong ulonglong_t
|
| 726 |
+
|
| 727 |
+
ctypedef npy_intp intp_t
|
| 728 |
+
ctypedef npy_uintp uintp_t
|
| 729 |
+
|
| 730 |
+
ctypedef npy_double float_t
|
| 731 |
+
ctypedef npy_double double_t
|
| 732 |
+
ctypedef npy_longdouble longdouble_t
|
| 733 |
+
|
| 734 |
+
ctypedef float complex cfloat_t
|
| 735 |
+
ctypedef double complex cdouble_t
|
| 736 |
+
ctypedef double complex complex_t
|
| 737 |
+
ctypedef long double complex clongdouble_t
|
| 738 |
+
|
| 739 |
+
cdef inline object PyArray_MultiIterNew1(a):
|
| 740 |
+
return PyArray_MultiIterNew(1, <void*>a)
|
| 741 |
+
|
| 742 |
+
cdef inline object PyArray_MultiIterNew2(a, b):
|
| 743 |
+
return PyArray_MultiIterNew(2, <void*>a, <void*>b)
|
| 744 |
+
|
| 745 |
+
cdef inline object PyArray_MultiIterNew3(a, b, c):
|
| 746 |
+
return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
|
| 747 |
+
|
| 748 |
+
cdef inline object PyArray_MultiIterNew4(a, b, c, d):
|
| 749 |
+
return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
|
| 750 |
+
|
| 751 |
+
cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
|
| 752 |
+
return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
|
| 753 |
+
|
| 754 |
+
cdef inline tuple PyDataType_SHAPE(dtype d):
|
| 755 |
+
if PyDataType_HASSUBARRAY(d):
|
| 756 |
+
return <tuple>d.subarray.shape
|
| 757 |
+
else:
|
| 758 |
+
return ()
|
| 759 |
+
|
| 760 |
+
|
| 761 |
+
cdef extern from "numpy/ndarrayobject.h":
|
| 762 |
+
PyTypeObject PyTimedeltaArrType_Type
|
| 763 |
+
PyTypeObject PyDatetimeArrType_Type
|
| 764 |
+
ctypedef int64_t npy_timedelta
|
| 765 |
+
ctypedef int64_t npy_datetime
|
| 766 |
+
|
| 767 |
+
cdef extern from "numpy/ndarraytypes.h":
|
| 768 |
+
ctypedef struct PyArray_DatetimeMetaData:
|
| 769 |
+
NPY_DATETIMEUNIT base
|
| 770 |
+
int64_t num
|
| 771 |
+
|
| 772 |
+
ctypedef struct npy_datetimestruct:
|
| 773 |
+
int64_t year
|
| 774 |
+
int32_t month, day, hour, min, sec, us, ps, as
|
| 775 |
+
|
| 776 |
+
# Iterator API added in v1.6
|
| 777 |
+
#
|
| 778 |
+
# These don't match the definition in the C API because Cython can't wrap
|
| 779 |
+
# function pointers that return functions.
|
| 780 |
+
# https://github.com/cython/cython/issues/6720
|
| 781 |
+
ctypedef int (*NpyIter_IterNextFunc "NpyIter_IterNextFunc *")(NpyIter* it) noexcept nogil
|
| 782 |
+
ctypedef void (*NpyIter_GetMultiIndexFunc "NpyIter_GetMultiIndexFunc *")(NpyIter* it, npy_intp* outcoords) noexcept nogil
|
| 783 |
+
|
| 784 |
+
cdef extern from "numpy/arrayscalars.h":
|
| 785 |
+
|
| 786 |
+
# abstract types
|
| 787 |
+
ctypedef class numpy.generic [object PyObject]:
|
| 788 |
+
pass
|
| 789 |
+
ctypedef class numpy.number [object PyObject]:
|
| 790 |
+
pass
|
| 791 |
+
ctypedef class numpy.integer [object PyObject]:
|
| 792 |
+
pass
|
| 793 |
+
ctypedef class numpy.signedinteger [object PyObject]:
|
| 794 |
+
pass
|
| 795 |
+
ctypedef class numpy.unsignedinteger [object PyObject]:
|
| 796 |
+
pass
|
| 797 |
+
ctypedef class numpy.inexact [object PyObject]:
|
| 798 |
+
pass
|
| 799 |
+
ctypedef class numpy.floating [object PyObject]:
|
| 800 |
+
pass
|
| 801 |
+
ctypedef class numpy.complexfloating [object PyObject]:
|
| 802 |
+
pass
|
| 803 |
+
ctypedef class numpy.flexible [object PyObject]:
|
| 804 |
+
pass
|
| 805 |
+
ctypedef class numpy.character [object PyObject]:
|
| 806 |
+
pass
|
| 807 |
+
|
| 808 |
+
ctypedef struct PyDatetimeScalarObject:
|
| 809 |
+
# PyObject_HEAD
|
| 810 |
+
npy_datetime obval
|
| 811 |
+
PyArray_DatetimeMetaData obmeta
|
| 812 |
+
|
| 813 |
+
ctypedef struct PyTimedeltaScalarObject:
|
| 814 |
+
# PyObject_HEAD
|
| 815 |
+
npy_timedelta obval
|
| 816 |
+
PyArray_DatetimeMetaData obmeta
|
| 817 |
+
|
| 818 |
+
ctypedef enum NPY_DATETIMEUNIT:
|
| 819 |
+
NPY_FR_Y
|
| 820 |
+
NPY_FR_M
|
| 821 |
+
NPY_FR_W
|
| 822 |
+
NPY_FR_D
|
| 823 |
+
NPY_FR_B
|
| 824 |
+
NPY_FR_h
|
| 825 |
+
NPY_FR_m
|
| 826 |
+
NPY_FR_s
|
| 827 |
+
NPY_FR_ms
|
| 828 |
+
NPY_FR_us
|
| 829 |
+
NPY_FR_ns
|
| 830 |
+
NPY_FR_ps
|
| 831 |
+
NPY_FR_fs
|
| 832 |
+
NPY_FR_as
|
| 833 |
+
NPY_FR_GENERIC
|
| 834 |
+
|
| 835 |
+
|
| 836 |
+
cdef extern from "numpy/arrayobject.h":
|
| 837 |
+
# These are part of the C-API defined in `__multiarray_api.h`
|
| 838 |
+
|
| 839 |
+
# NumPy internal definitions in datetime_strings.c:
|
| 840 |
+
int get_datetime_iso_8601_strlen "NpyDatetime_GetDatetimeISO8601StrLen" (
|
| 841 |
+
int local, NPY_DATETIMEUNIT base)
|
| 842 |
+
int make_iso_8601_datetime "NpyDatetime_MakeISO8601Datetime" (
|
| 843 |
+
npy_datetimestruct *dts, char *outstr, npy_intp outlen,
|
| 844 |
+
int local, int utc, NPY_DATETIMEUNIT base, int tzoffset,
|
| 845 |
+
NPY_CASTING casting) except -1
|
| 846 |
+
|
| 847 |
+
# NumPy internal definition in datetime.c:
|
| 848 |
+
# May return 1 to indicate that object does not appear to be a datetime
|
| 849 |
+
# (returns 0 on success).
|
| 850 |
+
int convert_pydatetime_to_datetimestruct "NpyDatetime_ConvertPyDateTimeToDatetimeStruct" (
|
| 851 |
+
PyObject *obj, npy_datetimestruct *out,
|
| 852 |
+
NPY_DATETIMEUNIT *out_bestunit, int apply_tzinfo) except -1
|
| 853 |
+
int convert_datetime64_to_datetimestruct "NpyDatetime_ConvertDatetime64ToDatetimeStruct" (
|
| 854 |
+
PyArray_DatetimeMetaData *meta, npy_datetime dt,
|
| 855 |
+
npy_datetimestruct *out) except -1
|
| 856 |
+
int convert_datetimestruct_to_datetime64 "NpyDatetime_ConvertDatetimeStructToDatetime64"(
|
| 857 |
+
PyArray_DatetimeMetaData *meta, const npy_datetimestruct *dts,
|
| 858 |
+
npy_datetime *out) except -1
|
| 859 |
+
|
| 860 |
+
|
| 861 |
+
#
|
| 862 |
+
# ufunc API
|
| 863 |
+
#
|
| 864 |
+
|
| 865 |
+
cdef extern from "numpy/ufuncobject.h":
|
| 866 |
+
|
| 867 |
+
ctypedef void (*PyUFuncGenericFunction) (char **, npy_intp *, npy_intp *, void *)
|
| 868 |
+
|
| 869 |
+
ctypedef class numpy.ufunc [object PyUFuncObject, check_size ignore]:
|
| 870 |
+
cdef:
|
| 871 |
+
int nin, nout, nargs
|
| 872 |
+
int identity
|
| 873 |
+
PyUFuncGenericFunction *functions
|
| 874 |
+
void **data
|
| 875 |
+
int ntypes
|
| 876 |
+
int check_return
|
| 877 |
+
char *name
|
| 878 |
+
char *types
|
| 879 |
+
char *doc
|
| 880 |
+
void *ptr
|
| 881 |
+
PyObject *obj
|
| 882 |
+
PyObject *userloops
|
| 883 |
+
|
| 884 |
+
cdef enum:
|
| 885 |
+
PyUFunc_Zero
|
| 886 |
+
PyUFunc_One
|
| 887 |
+
PyUFunc_None
|
| 888 |
+
UFUNC_FPE_DIVIDEBYZERO
|
| 889 |
+
UFUNC_FPE_OVERFLOW
|
| 890 |
+
UFUNC_FPE_UNDERFLOW
|
| 891 |
+
UFUNC_FPE_INVALID
|
| 892 |
+
|
| 893 |
+
object PyUFunc_FromFuncAndData(PyUFuncGenericFunction *,
|
| 894 |
+
void **, char *, int, int, int, int, char *, char *, int)
|
| 895 |
+
int PyUFunc_RegisterLoopForType(ufunc, int,
|
| 896 |
+
PyUFuncGenericFunction, int *, void *) except -1
|
| 897 |
+
void PyUFunc_f_f_As_d_d \
|
| 898 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 899 |
+
void PyUFunc_d_d \
|
| 900 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 901 |
+
void PyUFunc_f_f \
|
| 902 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 903 |
+
void PyUFunc_g_g \
|
| 904 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 905 |
+
void PyUFunc_F_F_As_D_D \
|
| 906 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 907 |
+
void PyUFunc_F_F \
|
| 908 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 909 |
+
void PyUFunc_D_D \
|
| 910 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 911 |
+
void PyUFunc_G_G \
|
| 912 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 913 |
+
void PyUFunc_O_O \
|
| 914 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 915 |
+
void PyUFunc_ff_f_As_dd_d \
|
| 916 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 917 |
+
void PyUFunc_ff_f \
|
| 918 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 919 |
+
void PyUFunc_dd_d \
|
| 920 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 921 |
+
void PyUFunc_gg_g \
|
| 922 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 923 |
+
void PyUFunc_FF_F_As_DD_D \
|
| 924 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 925 |
+
void PyUFunc_DD_D \
|
| 926 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 927 |
+
void PyUFunc_FF_F \
|
| 928 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 929 |
+
void PyUFunc_GG_G \
|
| 930 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 931 |
+
void PyUFunc_OO_O \
|
| 932 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 933 |
+
void PyUFunc_O_O_method \
|
| 934 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 935 |
+
void PyUFunc_OO_O_method \
|
| 936 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 937 |
+
void PyUFunc_On_Om \
|
| 938 |
+
(char **, npy_intp *, npy_intp *, void *)
|
| 939 |
+
void PyUFunc_clearfperr()
|
| 940 |
+
int PyUFunc_getfperr()
|
| 941 |
+
int PyUFunc_ReplaceLoopBySignature \
|
| 942 |
+
(ufunc, PyUFuncGenericFunction, int *, PyUFuncGenericFunction *)
|
| 943 |
+
object PyUFunc_FromFuncAndDataAndSignature \
|
| 944 |
+
(PyUFuncGenericFunction *, void **, char *, int, int, int,
|
| 945 |
+
int, char *, char *, int, char *)
|
| 946 |
+
|
| 947 |
+
int _import_umath() except -1
|
| 948 |
+
|
| 949 |
+
cdef inline void set_array_base(ndarray arr, object base):
|
| 950 |
+
Py_INCREF(base) # important to do this before stealing the reference below!
|
| 951 |
+
PyArray_SetBaseObject(arr, base)
|
| 952 |
+
|
| 953 |
+
cdef inline object get_array_base(ndarray arr):
|
| 954 |
+
base = PyArray_BASE(arr)
|
| 955 |
+
if base is NULL:
|
| 956 |
+
return None
|
| 957 |
+
return <object>base
|
| 958 |
+
|
| 959 |
+
# Versions of the import_* functions which are more suitable for
|
| 960 |
+
# Cython code.
|
| 961 |
+
cdef inline int import_array() except -1:
|
| 962 |
+
try:
|
| 963 |
+
__pyx_import_array()
|
| 964 |
+
except Exception:
|
| 965 |
+
raise ImportError("numpy._core.multiarray failed to import")
|
| 966 |
+
|
| 967 |
+
cdef inline int import_umath() except -1:
|
| 968 |
+
try:
|
| 969 |
+
_import_umath()
|
| 970 |
+
except Exception:
|
| 971 |
+
raise ImportError("numpy._core.umath failed to import")
|
| 972 |
+
|
| 973 |
+
cdef inline int import_ufunc() except -1:
|
| 974 |
+
try:
|
| 975 |
+
_import_umath()
|
| 976 |
+
except Exception:
|
| 977 |
+
raise ImportError("numpy._core.umath failed to import")
|
| 978 |
+
|
| 979 |
+
|
| 980 |
+
cdef inline bint is_timedelta64_object(object obj):
|
| 981 |
+
"""
|
| 982 |
+
Cython equivalent of `isinstance(obj, np.timedelta64)`
|
| 983 |
+
|
| 984 |
+
Parameters
|
| 985 |
+
----------
|
| 986 |
+
obj : object
|
| 987 |
+
|
| 988 |
+
Returns
|
| 989 |
+
-------
|
| 990 |
+
bool
|
| 991 |
+
"""
|
| 992 |
+
return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)
|
| 993 |
+
|
| 994 |
+
|
| 995 |
+
cdef inline bint is_datetime64_object(object obj):
|
| 996 |
+
"""
|
| 997 |
+
Cython equivalent of `isinstance(obj, np.datetime64)`
|
| 998 |
+
|
| 999 |
+
Parameters
|
| 1000 |
+
----------
|
| 1001 |
+
obj : object
|
| 1002 |
+
|
| 1003 |
+
Returns
|
| 1004 |
+
-------
|
| 1005 |
+
bool
|
| 1006 |
+
"""
|
| 1007 |
+
return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)
|
| 1008 |
+
|
| 1009 |
+
|
| 1010 |
+
cdef inline npy_datetime get_datetime64_value(object obj) nogil:
|
| 1011 |
+
"""
|
| 1012 |
+
returns the int64 value underlying scalar numpy datetime64 object
|
| 1013 |
+
|
| 1014 |
+
Note that to interpret this as a datetime, the corresponding unit is
|
| 1015 |
+
also needed. That can be found using `get_datetime64_unit`.
|
| 1016 |
+
"""
|
| 1017 |
+
return (<PyDatetimeScalarObject*>obj).obval
|
| 1018 |
+
|
| 1019 |
+
|
| 1020 |
+
cdef inline npy_timedelta get_timedelta64_value(object obj) nogil:
|
| 1021 |
+
"""
|
| 1022 |
+
returns the int64 value underlying scalar numpy timedelta64 object
|
| 1023 |
+
"""
|
| 1024 |
+
return (<PyTimedeltaScalarObject*>obj).obval
|
| 1025 |
+
|
| 1026 |
+
|
| 1027 |
+
cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:
|
| 1028 |
+
"""
|
| 1029 |
+
returns the unit part of the dtype for a numpy datetime64 object.
|
| 1030 |
+
"""
|
| 1031 |
+
return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base
|
| 1032 |
+
|
| 1033 |
+
|
| 1034 |
+
cdef extern from "numpy/arrayobject.h":
|
| 1035 |
+
|
| 1036 |
+
ctypedef struct NpyIter:
|
| 1037 |
+
pass
|
| 1038 |
+
|
| 1039 |
+
cdef enum:
|
| 1040 |
+
NPY_FAIL
|
| 1041 |
+
NPY_SUCCEED
|
| 1042 |
+
|
| 1043 |
+
cdef enum:
|
| 1044 |
+
# Track an index representing C order
|
| 1045 |
+
NPY_ITER_C_INDEX
|
| 1046 |
+
# Track an index representing Fortran order
|
| 1047 |
+
NPY_ITER_F_INDEX
|
| 1048 |
+
# Track a multi-index
|
| 1049 |
+
NPY_ITER_MULTI_INDEX
|
| 1050 |
+
# User code external to the iterator does the 1-dimensional innermost loop
|
| 1051 |
+
NPY_ITER_EXTERNAL_LOOP
|
| 1052 |
+
# Convert all the operands to a common data type
|
| 1053 |
+
NPY_ITER_COMMON_DTYPE
|
| 1054 |
+
# Operands may hold references, requiring API access during iteration
|
| 1055 |
+
NPY_ITER_REFS_OK
|
| 1056 |
+
# Zero-sized operands should be permitted, iteration checks IterSize for 0
|
| 1057 |
+
NPY_ITER_ZEROSIZE_OK
|
| 1058 |
+
# Permits reductions (size-0 stride with dimension size > 1)
|
| 1059 |
+
NPY_ITER_REDUCE_OK
|
| 1060 |
+
# Enables sub-range iteration
|
| 1061 |
+
NPY_ITER_RANGED
|
| 1062 |
+
# Enables buffering
|
| 1063 |
+
NPY_ITER_BUFFERED
|
| 1064 |
+
# When buffering is enabled, grows the inner loop if possible
|
| 1065 |
+
NPY_ITER_GROWINNER
|
| 1066 |
+
# Delay allocation of buffers until first Reset* call
|
| 1067 |
+
NPY_ITER_DELAY_BUFALLOC
|
| 1068 |
+
# When NPY_KEEPORDER is specified, disable reversing negative-stride axes
|
| 1069 |
+
NPY_ITER_DONT_NEGATE_STRIDES
|
| 1070 |
+
NPY_ITER_COPY_IF_OVERLAP
|
| 1071 |
+
# The operand will be read from and written to
|
| 1072 |
+
NPY_ITER_READWRITE
|
| 1073 |
+
# The operand will only be read from
|
| 1074 |
+
NPY_ITER_READONLY
|
| 1075 |
+
# The operand will only be written to
|
| 1076 |
+
NPY_ITER_WRITEONLY
|
| 1077 |
+
# The operand's data must be in native byte order
|
| 1078 |
+
NPY_ITER_NBO
|
| 1079 |
+
# The operand's data must be aligned
|
| 1080 |
+
NPY_ITER_ALIGNED
|
| 1081 |
+
# The operand's data must be contiguous (within the inner loop)
|
| 1082 |
+
NPY_ITER_CONTIG
|
| 1083 |
+
# The operand may be copied to satisfy requirements
|
| 1084 |
+
NPY_ITER_COPY
|
| 1085 |
+
# The operand may be copied with WRITEBACKIFCOPY to satisfy requirements
|
| 1086 |
+
NPY_ITER_UPDATEIFCOPY
|
| 1087 |
+
# Allocate the operand if it is NULL
|
| 1088 |
+
NPY_ITER_ALLOCATE
|
| 1089 |
+
# If an operand is allocated, don't use any subtype
|
| 1090 |
+
NPY_ITER_NO_SUBTYPE
|
| 1091 |
+
# This is a virtual array slot, operand is NULL but temporary data is there
|
| 1092 |
+
NPY_ITER_VIRTUAL
|
| 1093 |
+
# Require that the dimension match the iterator dimensions exactly
|
| 1094 |
+
NPY_ITER_NO_BROADCAST
|
| 1095 |
+
# A mask is being used on this array, affects buffer -> array copy
|
| 1096 |
+
NPY_ITER_WRITEMASKED
|
| 1097 |
+
# This array is the mask for all WRITEMASKED operands
|
| 1098 |
+
NPY_ITER_ARRAYMASK
|
| 1099 |
+
# Assume iterator order data access for COPY_IF_OVERLAP
|
| 1100 |
+
NPY_ITER_OVERLAP_ASSUME_ELEMENTWISE
|
| 1101 |
+
|
| 1102 |
+
# construction and destruction functions
|
| 1103 |
+
NpyIter* NpyIter_New(ndarray arr, npy_uint32 flags, NPY_ORDER order,
|
| 1104 |
+
NPY_CASTING casting, dtype datatype) except NULL
|
| 1105 |
+
NpyIter* NpyIter_MultiNew(npy_intp nop, PyArrayObject** op, npy_uint32 flags,
|
| 1106 |
+
NPY_ORDER order, NPY_CASTING casting, npy_uint32*
|
| 1107 |
+
op_flags, PyArray_Descr** op_dtypes) except NULL
|
| 1108 |
+
NpyIter* NpyIter_AdvancedNew(npy_intp nop, PyArrayObject** op,
|
| 1109 |
+
npy_uint32 flags, NPY_ORDER order,
|
| 1110 |
+
NPY_CASTING casting, npy_uint32* op_flags,
|
| 1111 |
+
PyArray_Descr** op_dtypes, int oa_ndim,
|
| 1112 |
+
int** op_axes, const npy_intp* itershape,
|
| 1113 |
+
npy_intp buffersize) except NULL
|
| 1114 |
+
NpyIter* NpyIter_Copy(NpyIter* it) except NULL
|
| 1115 |
+
int NpyIter_RemoveAxis(NpyIter* it, int axis) except NPY_FAIL
|
| 1116 |
+
int NpyIter_RemoveMultiIndex(NpyIter* it) except NPY_FAIL
|
| 1117 |
+
int NpyIter_EnableExternalLoop(NpyIter* it) except NPY_FAIL
|
| 1118 |
+
int NpyIter_Deallocate(NpyIter* it) except NPY_FAIL
|
| 1119 |
+
int NpyIter_Reset(NpyIter* it, char** errmsg) except NPY_FAIL
|
| 1120 |
+
int NpyIter_ResetToIterIndexRange(NpyIter* it, npy_intp istart,
|
| 1121 |
+
npy_intp iend, char** errmsg) except NPY_FAIL
|
| 1122 |
+
int NpyIter_ResetBasePointers(NpyIter* it, char** baseptrs, char** errmsg) except NPY_FAIL
|
| 1123 |
+
int NpyIter_GotoMultiIndex(NpyIter* it, const npy_intp* multi_index) except NPY_FAIL
|
| 1124 |
+
int NpyIter_GotoIndex(NpyIter* it, npy_intp index) except NPY_FAIL
|
| 1125 |
+
npy_intp NpyIter_GetIterSize(NpyIter* it) nogil
|
| 1126 |
+
npy_intp NpyIter_GetIterIndex(NpyIter* it) nogil
|
| 1127 |
+
void NpyIter_GetIterIndexRange(NpyIter* it, npy_intp* istart,
|
| 1128 |
+
npy_intp* iend) nogil
|
| 1129 |
+
int NpyIter_GotoIterIndex(NpyIter* it, npy_intp iterindex) except NPY_FAIL
|
| 1130 |
+
npy_bool NpyIter_HasDelayedBufAlloc(NpyIter* it) nogil
|
| 1131 |
+
npy_bool NpyIter_HasExternalLoop(NpyIter* it) nogil
|
| 1132 |
+
npy_bool NpyIter_HasMultiIndex(NpyIter* it) nogil
|
| 1133 |
+
npy_bool NpyIter_HasIndex(NpyIter* it) nogil
|
| 1134 |
+
npy_bool NpyIter_RequiresBuffering(NpyIter* it) nogil
|
| 1135 |
+
npy_bool NpyIter_IsBuffered(NpyIter* it) nogil
|
| 1136 |
+
npy_bool NpyIter_IsGrowInner(NpyIter* it) nogil
|
| 1137 |
+
npy_intp NpyIter_GetBufferSize(NpyIter* it) nogil
|
| 1138 |
+
int NpyIter_GetNDim(NpyIter* it) nogil
|
| 1139 |
+
int NpyIter_GetNOp(NpyIter* it) nogil
|
| 1140 |
+
npy_intp* NpyIter_GetAxisStrideArray(NpyIter* it, int axis) except NULL
|
| 1141 |
+
int NpyIter_GetShape(NpyIter* it, npy_intp* outshape) nogil
|
| 1142 |
+
PyArray_Descr** NpyIter_GetDescrArray(NpyIter* it)
|
| 1143 |
+
PyArrayObject** NpyIter_GetOperandArray(NpyIter* it)
|
| 1144 |
+
ndarray NpyIter_GetIterView(NpyIter* it, npy_intp i)
|
| 1145 |
+
void NpyIter_GetReadFlags(NpyIter* it, char* outreadflags)
|
| 1146 |
+
void NpyIter_GetWriteFlags(NpyIter* it, char* outwriteflags)
|
| 1147 |
+
int NpyIter_CreateCompatibleStrides(NpyIter* it, npy_intp itemsize,
|
| 1148 |
+
npy_intp* outstrides) except NPY_FAIL
|
| 1149 |
+
npy_bool NpyIter_IsFirstVisit(NpyIter* it, int iop) nogil
|
| 1150 |
+
# functions for iterating an NpyIter object
|
| 1151 |
+
#
|
| 1152 |
+
# These don't match the definition in the C API because Cython can't wrap
|
| 1153 |
+
# function pointers that return functions.
|
| 1154 |
+
NpyIter_IterNextFunc* NpyIter_GetIterNext(NpyIter* it, char** errmsg) except NULL
|
| 1155 |
+
NpyIter_GetMultiIndexFunc* NpyIter_GetGetMultiIndex(NpyIter* it,
|
| 1156 |
+
char** errmsg) except NULL
|
| 1157 |
+
char** NpyIter_GetDataPtrArray(NpyIter* it) nogil
|
| 1158 |
+
char** NpyIter_GetInitialDataPtrArray(NpyIter* it) nogil
|
| 1159 |
+
npy_intp* NpyIter_GetIndexPtr(NpyIter* it)
|
| 1160 |
+
npy_intp* NpyIter_GetInnerStrideArray(NpyIter* it) nogil
|
| 1161 |
+
npy_intp* NpyIter_GetInnerLoopSizePtr(NpyIter* it) nogil
|
| 1162 |
+
void NpyIter_GetInnerFixedStrideArray(NpyIter* it, npy_intp* outstrides) nogil
|
| 1163 |
+
npy_bool NpyIter_IterationNeedsAPI(NpyIter* it) nogil
|
| 1164 |
+
void NpyIter_DebugPrint(NpyIter* it)
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__init__.py
ADDED
|
@@ -0,0 +1,547 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
| 1 |
+
"""
|
| 2 |
+
NumPy
|
| 3 |
+
=====
|
| 4 |
+
|
| 5 |
+
Provides
|
| 6 |
+
1. An array object of arbitrary homogeneous items
|
| 7 |
+
2. Fast mathematical operations over arrays
|
| 8 |
+
3. Linear Algebra, Fourier Transforms, Random Number Generation
|
| 9 |
+
|
| 10 |
+
How to use the documentation
|
| 11 |
+
----------------------------
|
| 12 |
+
Documentation is available in two forms: docstrings provided
|
| 13 |
+
with the code, and a loose standing reference guide, available from
|
| 14 |
+
`the NumPy homepage <https://numpy.org>`_.
|
| 15 |
+
|
| 16 |
+
We recommend exploring the docstrings using
|
| 17 |
+
`IPython <https://ipython.org>`_, an advanced Python shell with
|
| 18 |
+
TAB-completion and introspection capabilities. See below for further
|
| 19 |
+
instructions.
|
| 20 |
+
|
| 21 |
+
The docstring examples assume that `numpy` has been imported as ``np``::
|
| 22 |
+
|
| 23 |
+
>>> import numpy as np
|
| 24 |
+
|
| 25 |
+
Code snippets are indicated by three greater-than signs::
|
| 26 |
+
|
| 27 |
+
>>> x = 42
|
| 28 |
+
>>> x = x + 1
|
| 29 |
+
|
| 30 |
+
Use the built-in ``help`` function to view a function's docstring::
|
| 31 |
+
|
| 32 |
+
>>> help(np.sort)
|
| 33 |
+
... # doctest: +SKIP
|
| 34 |
+
|
| 35 |
+
For some objects, ``np.info(obj)`` may provide additional help. This is
|
| 36 |
+
particularly true if you see the line "Help on ufunc object:" at the top
|
| 37 |
+
of the help() page. Ufuncs are implemented in C, not Python, for speed.
|
| 38 |
+
The native Python help() does not know how to view their help, but our
|
| 39 |
+
np.info() function does.
|
| 40 |
+
|
| 41 |
+
Available subpackages
|
| 42 |
+
---------------------
|
| 43 |
+
lib
|
| 44 |
+
Basic functions used by several sub-packages.
|
| 45 |
+
random
|
| 46 |
+
Core Random Tools
|
| 47 |
+
linalg
|
| 48 |
+
Core Linear Algebra Tools
|
| 49 |
+
fft
|
| 50 |
+
Core FFT routines
|
| 51 |
+
polynomial
|
| 52 |
+
Polynomial tools
|
| 53 |
+
testing
|
| 54 |
+
NumPy testing tools
|
| 55 |
+
distutils
|
| 56 |
+
Enhancements to distutils with support for
|
| 57 |
+
Fortran compilers support and more (for Python <= 3.11)
|
| 58 |
+
|
| 59 |
+
Utilities
|
| 60 |
+
---------
|
| 61 |
+
test
|
| 62 |
+
Run numpy unittests
|
| 63 |
+
show_config
|
| 64 |
+
Show numpy build configuration
|
| 65 |
+
__version__
|
| 66 |
+
NumPy version string
|
| 67 |
+
|
| 68 |
+
Viewing documentation using IPython
|
| 69 |
+
-----------------------------------
|
| 70 |
+
|
| 71 |
+
Start IPython and import `numpy` usually under the alias ``np``: `import
|
| 72 |
+
numpy as np`. Then, directly past or use the ``%cpaste`` magic to paste
|
| 73 |
+
examples into the shell. To see which functions are available in `numpy`,
|
| 74 |
+
type ``np.<TAB>`` (where ``<TAB>`` refers to the TAB key), or use
|
| 75 |
+
``np.*cos*?<ENTER>`` (where ``<ENTER>`` refers to the ENTER key) to narrow
|
| 76 |
+
down the list. To view the docstring for a function, use
|
| 77 |
+
``np.cos?<ENTER>`` (to view the docstring) and ``np.cos??<ENTER>`` (to view
|
| 78 |
+
the source code).
|
| 79 |
+
|
| 80 |
+
Copies vs. in-place operation
|
| 81 |
+
-----------------------------
|
| 82 |
+
Most of the functions in `numpy` return a copy of the array argument
|
| 83 |
+
(e.g., `np.sort`). In-place versions of these functions are often
|
| 84 |
+
available as array methods, i.e. ``x = np.array([1,2,3]); x.sort()``.
|
| 85 |
+
Exceptions to this rule are documented.
|
| 86 |
+
|
| 87 |
+
"""
|
| 88 |
+
import os
|
| 89 |
+
import sys
|
| 90 |
+
import warnings
|
| 91 |
+
|
| 92 |
+
from ._globals import _NoValue, _CopyMode
|
| 93 |
+
from ._expired_attrs_2_0 import __expired_attributes__
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
# If a version with git hash was stored, use that instead
|
| 97 |
+
from . import version
|
| 98 |
+
from .version import __version__
|
| 99 |
+
|
| 100 |
+
# We first need to detect if we're being called as part of the numpy setup
|
| 101 |
+
# procedure itself in a reliable manner.
|
| 102 |
+
try:
|
| 103 |
+
__NUMPY_SETUP__
|
| 104 |
+
except NameError:
|
| 105 |
+
__NUMPY_SETUP__ = False
|
| 106 |
+
|
| 107 |
+
if __NUMPY_SETUP__:
|
| 108 |
+
sys.stderr.write('Running from numpy source directory.\n')
|
| 109 |
+
else:
|
| 110 |
+
# Allow distributors to run custom init code before importing numpy._core
|
| 111 |
+
from . import _distributor_init
|
| 112 |
+
|
| 113 |
+
try:
|
| 114 |
+
from numpy.__config__ import show_config
|
| 115 |
+
except ImportError as e:
|
| 116 |
+
msg = """Error importing numpy: you should not try to import numpy from
|
| 117 |
+
its source directory; please exit the numpy source tree, and relaunch
|
| 118 |
+
your python interpreter from there."""
|
| 119 |
+
raise ImportError(msg) from e
|
| 120 |
+
|
| 121 |
+
from . import _core
|
| 122 |
+
from ._core import (
|
| 123 |
+
False_, ScalarType, True_,
|
| 124 |
+
abs, absolute, acos, acosh, add, all, allclose,
|
| 125 |
+
amax, amin, any, arange, arccos, arccosh, arcsin, arcsinh,
|
| 126 |
+
arctan, arctan2, arctanh, argmax, argmin, argpartition, argsort,
|
| 127 |
+
argwhere, around, array, array2string, array_equal, array_equiv,
|
| 128 |
+
array_repr, array_str, asanyarray, asarray, ascontiguousarray,
|
| 129 |
+
asfortranarray, asin, asinh, atan, atanh, atan2, astype, atleast_1d,
|
| 130 |
+
atleast_2d, atleast_3d, base_repr, binary_repr, bitwise_and,
|
| 131 |
+
bitwise_count, bitwise_invert, bitwise_left_shift, bitwise_not,
|
| 132 |
+
bitwise_or, bitwise_right_shift, bitwise_xor, block, bool, bool_,
|
| 133 |
+
broadcast, busday_count, busday_offset, busdaycalendar, byte, bytes_,
|
| 134 |
+
can_cast, cbrt, cdouble, ceil, character, choose, clip, clongdouble,
|
| 135 |
+
complex128, complex64, complexfloating, compress, concat, concatenate,
|
| 136 |
+
conj, conjugate, convolve, copysign, copyto, correlate, cos, cosh,
|
| 137 |
+
count_nonzero, cross, csingle, cumprod, cumsum, cumulative_prod,
|
| 138 |
+
cumulative_sum, datetime64, datetime_as_string, datetime_data,
|
| 139 |
+
deg2rad, degrees, diagonal, divide, divmod, dot, double, dtype, e,
|
| 140 |
+
einsum, einsum_path, empty, empty_like, equal, errstate, euler_gamma,
|
| 141 |
+
exp, exp2, expm1, fabs, finfo, flatiter, flatnonzero, flexible,
|
| 142 |
+
float16, float32, float64, float_power, floating, floor, floor_divide,
|
| 143 |
+
fmax, fmin, fmod, format_float_positional, format_float_scientific,
|
| 144 |
+
frexp, from_dlpack, frombuffer, fromfile, fromfunction, fromiter,
|
| 145 |
+
frompyfunc, fromstring, full, full_like, gcd, generic, geomspace,
|
| 146 |
+
get_printoptions, getbufsize, geterr, geterrcall, greater,
|
| 147 |
+
greater_equal, half, heaviside, hstack, hypot, identity, iinfo,
|
| 148 |
+
indices, inexact, inf, inner, int16, int32, int64, int8, int_, intc,
|
| 149 |
+
integer, intp, invert, is_busday, isclose, isdtype, isfinite,
|
| 150 |
+
isfortran, isinf, isnan, isnat, isscalar, issubdtype, lcm, ldexp,
|
| 151 |
+
left_shift, less, less_equal, lexsort, linspace, little_endian, log,
|
| 152 |
+
log10, log1p, log2, logaddexp, logaddexp2, logical_and, logical_not,
|
| 153 |
+
logical_or, logical_xor, logspace, long, longdouble, longlong, matmul,
|
| 154 |
+
matvec, matrix_transpose, max, maximum, may_share_memory, mean, memmap,
|
| 155 |
+
min, min_scalar_type, minimum, mod, modf, moveaxis, multiply, nan,
|
| 156 |
+
ndarray, ndim, nditer, negative, nested_iters, newaxis, nextafter,
|
| 157 |
+
nonzero, not_equal, number, object_, ones, ones_like, outer, partition,
|
| 158 |
+
permute_dims, pi, positive, pow, power, printoptions, prod,
|
| 159 |
+
promote_types, ptp, put, putmask, rad2deg, radians, ravel, recarray,
|
| 160 |
+
reciprocal, record, remainder, repeat, require, reshape, resize,
|
| 161 |
+
result_type, right_shift, rint, roll, rollaxis, round, sctypeDict,
|
| 162 |
+
searchsorted, set_printoptions, setbufsize, seterr, seterrcall, shape,
|
| 163 |
+
shares_memory, short, sign, signbit, signedinteger, sin, single, sinh,
|
| 164 |
+
size, sort, spacing, sqrt, square, squeeze, stack, std,
|
| 165 |
+
str_, subtract, sum, swapaxes, take, tan, tanh, tensordot,
|
| 166 |
+
timedelta64, trace, transpose, true_divide, trunc, typecodes, ubyte,
|
| 167 |
+
ufunc, uint, uint16, uint32, uint64, uint8, uintc, uintp, ulong,
|
| 168 |
+
ulonglong, unsignedinteger, unstack, ushort, var, vdot, vecdot,
|
| 169 |
+
vecmat, void, vstack, where, zeros, zeros_like
|
| 170 |
+
)
|
| 171 |
+
|
| 172 |
+
# NOTE: It's still under discussion whether these aliases
|
| 173 |
+
# should be removed.
|
| 174 |
+
for ta in ["float96", "float128", "complex192", "complex256"]:
|
| 175 |
+
try:
|
| 176 |
+
globals()[ta] = getattr(_core, ta)
|
| 177 |
+
except AttributeError:
|
| 178 |
+
pass
|
| 179 |
+
del ta
|
| 180 |
+
|
| 181 |
+
from . import lib
|
| 182 |
+
from .lib import scimath as emath
|
| 183 |
+
from .lib._histograms_impl import (
|
| 184 |
+
histogram, histogram_bin_edges, histogramdd
|
| 185 |
+
)
|
| 186 |
+
from .lib._nanfunctions_impl import (
|
| 187 |
+
nanargmax, nanargmin, nancumprod, nancumsum, nanmax, nanmean,
|
| 188 |
+
nanmedian, nanmin, nanpercentile, nanprod, nanquantile, nanstd,
|
| 189 |
+
nansum, nanvar
|
| 190 |
+
)
|
| 191 |
+
from .lib._function_base_impl import (
|
| 192 |
+
select, piecewise, trim_zeros, copy, iterable, percentile, diff,
|
| 193 |
+
gradient, angle, unwrap, sort_complex, flip, rot90, extract, place,
|
| 194 |
+
vectorize, asarray_chkfinite, average, bincount, digitize, cov,
|
| 195 |
+
corrcoef, median, sinc, hamming, hanning, bartlett, blackman,
|
| 196 |
+
kaiser, trapezoid, trapz, i0, meshgrid, delete, insert, append,
|
| 197 |
+
interp, quantile
|
| 198 |
+
)
|
| 199 |
+
from .lib._twodim_base_impl import (
|
| 200 |
+
diag, diagflat, eye, fliplr, flipud, tri, triu, tril, vander,
|
| 201 |
+
histogram2d, mask_indices, tril_indices, tril_indices_from,
|
| 202 |
+
triu_indices, triu_indices_from
|
| 203 |
+
)
|
| 204 |
+
from .lib._shape_base_impl import (
|
| 205 |
+
apply_over_axes, apply_along_axis, array_split, column_stack, dsplit,
|
| 206 |
+
dstack, expand_dims, hsplit, kron, put_along_axis, row_stack, split,
|
| 207 |
+
take_along_axis, tile, vsplit
|
| 208 |
+
)
|
| 209 |
+
from .lib._type_check_impl import (
|
| 210 |
+
iscomplexobj, isrealobj, imag, iscomplex, isreal, nan_to_num, real,
|
| 211 |
+
real_if_close, typename, mintypecode, common_type
|
| 212 |
+
)
|
| 213 |
+
from .lib._arraysetops_impl import (
|
| 214 |
+
ediff1d, in1d, intersect1d, isin, setdiff1d, setxor1d, union1d,
|
| 215 |
+
unique, unique_all, unique_counts, unique_inverse, unique_values
|
| 216 |
+
)
|
| 217 |
+
from .lib._ufunclike_impl import fix, isneginf, isposinf
|
| 218 |
+
from .lib._arraypad_impl import pad
|
| 219 |
+
from .lib._utils_impl import (
|
| 220 |
+
show_runtime, get_include, info
|
| 221 |
+
)
|
| 222 |
+
from .lib._stride_tricks_impl import (
|
| 223 |
+
broadcast_arrays, broadcast_shapes, broadcast_to
|
| 224 |
+
)
|
| 225 |
+
from .lib._polynomial_impl import (
|
| 226 |
+
poly, polyint, polyder, polyadd, polysub, polymul, polydiv, polyval,
|
| 227 |
+
polyfit, poly1d, roots
|
| 228 |
+
)
|
| 229 |
+
from .lib._npyio_impl import (
|
| 230 |
+
savetxt, loadtxt, genfromtxt, load, save, savez, packbits,
|
| 231 |
+
savez_compressed, unpackbits, fromregex
|
| 232 |
+
)
|
| 233 |
+
from .lib._index_tricks_impl import (
|
| 234 |
+
diag_indices_from, diag_indices, fill_diagonal, ndindex, ndenumerate,
|
| 235 |
+
ix_, c_, r_, s_, ogrid, mgrid, unravel_index, ravel_multi_index,
|
| 236 |
+
index_exp
|
| 237 |
+
)
|
| 238 |
+
|
| 239 |
+
from . import matrixlib as _mat
|
| 240 |
+
from .matrixlib import (
|
| 241 |
+
asmatrix, bmat, matrix
|
| 242 |
+
)
|
| 243 |
+
|
| 244 |
+
# public submodules are imported lazily, therefore are accessible from
|
| 245 |
+
# __getattr__. Note that `distutils` (deprecated) and `array_api`
|
| 246 |
+
# (experimental label) are not added here, because `from numpy import *`
|
| 247 |
+
# must not raise any warnings - that's too disruptive.
|
| 248 |
+
__numpy_submodules__ = {
|
| 249 |
+
"linalg", "fft", "dtypes", "random", "polynomial", "ma",
|
| 250 |
+
"exceptions", "lib", "ctypeslib", "testing", "typing",
|
| 251 |
+
"f2py", "test", "rec", "char", "core", "strings",
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
# We build warning messages for former attributes
|
| 255 |
+
_msg = (
|
| 256 |
+
"module 'numpy' has no attribute '{n}'.\n"
|
| 257 |
+
"`np.{n}` was a deprecated alias for the builtin `{n}`. "
|
| 258 |
+
"To avoid this error in existing code, use `{n}` by itself. "
|
| 259 |
+
"Doing this will not modify any behavior and is safe. {extended_msg}\n"
|
| 260 |
+
"The aliases was originally deprecated in NumPy 1.20; for more "
|
| 261 |
+
"details and guidance see the original release note at:\n"
|
| 262 |
+
" https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations")
|
| 263 |
+
|
| 264 |
+
_specific_msg = (
|
| 265 |
+
"If you specifically wanted the numpy scalar type, use `np.{}` here.")
|
| 266 |
+
|
| 267 |
+
_int_extended_msg = (
|
| 268 |
+
"When replacing `np.{}`, you may wish to use e.g. `np.int64` "
|
| 269 |
+
"or `np.int32` to specify the precision. If you wish to review "
|
| 270 |
+
"your current use, check the release note link for "
|
| 271 |
+
"additional information.")
|
| 272 |
+
|
| 273 |
+
_type_info = [
|
| 274 |
+
("object", ""), # The NumPy scalar only exists by name.
|
| 275 |
+
("float", _specific_msg.format("float64")),
|
| 276 |
+
("complex", _specific_msg.format("complex128")),
|
| 277 |
+
("str", _specific_msg.format("str_")),
|
| 278 |
+
("int", _int_extended_msg.format("int"))]
|
| 279 |
+
|
| 280 |
+
__former_attrs__ = {
|
| 281 |
+
n: _msg.format(n=n, extended_msg=extended_msg)
|
| 282 |
+
for n, extended_msg in _type_info
|
| 283 |
+
}
|
| 284 |
+
|
| 285 |
+
|
| 286 |
+
# Some of these could be defined right away, but most were aliases to
|
| 287 |
+
# the Python objects and only removed in NumPy 1.24. Defining them should
|
| 288 |
+
# probably wait for NumPy 1.26 or 2.0.
|
| 289 |
+
# When defined, these should possibly not be added to `__all__` to avoid
|
| 290 |
+
# import with `from numpy import *`.
|
| 291 |
+
__future_scalars__ = {"str", "bytes", "object"}
|
| 292 |
+
|
| 293 |
+
__array_api_version__ = "2023.12"
|
| 294 |
+
|
| 295 |
+
from ._array_api_info import __array_namespace_info__
|
| 296 |
+
|
| 297 |
+
# now that numpy core module is imported, can initialize limits
|
| 298 |
+
_core.getlimits._register_known_types()
|
| 299 |
+
|
| 300 |
+
__all__ = list(
|
| 301 |
+
__numpy_submodules__ |
|
| 302 |
+
set(_core.__all__) |
|
| 303 |
+
set(_mat.__all__) |
|
| 304 |
+
set(lib._histograms_impl.__all__) |
|
| 305 |
+
set(lib._nanfunctions_impl.__all__) |
|
| 306 |
+
set(lib._function_base_impl.__all__) |
|
| 307 |
+
set(lib._twodim_base_impl.__all__) |
|
| 308 |
+
set(lib._shape_base_impl.__all__) |
|
| 309 |
+
set(lib._type_check_impl.__all__) |
|
| 310 |
+
set(lib._arraysetops_impl.__all__) |
|
| 311 |
+
set(lib._ufunclike_impl.__all__) |
|
| 312 |
+
set(lib._arraypad_impl.__all__) |
|
| 313 |
+
set(lib._utils_impl.__all__) |
|
| 314 |
+
set(lib._stride_tricks_impl.__all__) |
|
| 315 |
+
set(lib._polynomial_impl.__all__) |
|
| 316 |
+
set(lib._npyio_impl.__all__) |
|
| 317 |
+
set(lib._index_tricks_impl.__all__) |
|
| 318 |
+
{"emath", "show_config", "__version__", "__array_namespace_info__"}
|
| 319 |
+
)
|
| 320 |
+
|
| 321 |
+
# Filter out Cython harmless warnings
|
| 322 |
+
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
|
| 323 |
+
warnings.filterwarnings("ignore", message="numpy.ufunc size changed")
|
| 324 |
+
warnings.filterwarnings("ignore", message="numpy.ndarray size changed")
|
| 325 |
+
|
| 326 |
+
def __getattr__(attr):
|
| 327 |
+
# Warn for expired attributes
|
| 328 |
+
import warnings
|
| 329 |
+
|
| 330 |
+
if attr == "linalg":
|
| 331 |
+
import numpy.linalg as linalg
|
| 332 |
+
return linalg
|
| 333 |
+
elif attr == "fft":
|
| 334 |
+
import numpy.fft as fft
|
| 335 |
+
return fft
|
| 336 |
+
elif attr == "dtypes":
|
| 337 |
+
import numpy.dtypes as dtypes
|
| 338 |
+
return dtypes
|
| 339 |
+
elif attr == "random":
|
| 340 |
+
import numpy.random as random
|
| 341 |
+
return random
|
| 342 |
+
elif attr == "polynomial":
|
| 343 |
+
import numpy.polynomial as polynomial
|
| 344 |
+
return polynomial
|
| 345 |
+
elif attr == "ma":
|
| 346 |
+
import numpy.ma as ma
|
| 347 |
+
return ma
|
| 348 |
+
elif attr == "ctypeslib":
|
| 349 |
+
import numpy.ctypeslib as ctypeslib
|
| 350 |
+
return ctypeslib
|
| 351 |
+
elif attr == "exceptions":
|
| 352 |
+
import numpy.exceptions as exceptions
|
| 353 |
+
return exceptions
|
| 354 |
+
elif attr == "testing":
|
| 355 |
+
import numpy.testing as testing
|
| 356 |
+
return testing
|
| 357 |
+
elif attr == "matlib":
|
| 358 |
+
import numpy.matlib as matlib
|
| 359 |
+
return matlib
|
| 360 |
+
elif attr == "f2py":
|
| 361 |
+
import numpy.f2py as f2py
|
| 362 |
+
return f2py
|
| 363 |
+
elif attr == "typing":
|
| 364 |
+
import numpy.typing as typing
|
| 365 |
+
return typing
|
| 366 |
+
elif attr == "rec":
|
| 367 |
+
import numpy.rec as rec
|
| 368 |
+
return rec
|
| 369 |
+
elif attr == "char":
|
| 370 |
+
import numpy.char as char
|
| 371 |
+
return char
|
| 372 |
+
elif attr == "array_api":
|
| 373 |
+
raise AttributeError("`numpy.array_api` is not available from "
|
| 374 |
+
"numpy 2.0 onwards", name=None)
|
| 375 |
+
elif attr == "core":
|
| 376 |
+
import numpy.core as core
|
| 377 |
+
return core
|
| 378 |
+
elif attr == "strings":
|
| 379 |
+
import numpy.strings as strings
|
| 380 |
+
return strings
|
| 381 |
+
elif attr == "distutils":
|
| 382 |
+
if 'distutils' in __numpy_submodules__:
|
| 383 |
+
import numpy.distutils as distutils
|
| 384 |
+
return distutils
|
| 385 |
+
else:
|
| 386 |
+
raise AttributeError("`numpy.distutils` is not available from "
|
| 387 |
+
"Python 3.12 onwards", name=None)
|
| 388 |
+
|
| 389 |
+
if attr in __future_scalars__:
|
| 390 |
+
# And future warnings for those that will change, but also give
|
| 391 |
+
# the AttributeError
|
| 392 |
+
warnings.warn(
|
| 393 |
+
f"In the future `np.{attr}` will be defined as the "
|
| 394 |
+
"corresponding NumPy scalar.", FutureWarning, stacklevel=2)
|
| 395 |
+
|
| 396 |
+
if attr in __former_attrs__:
|
| 397 |
+
raise AttributeError(__former_attrs__[attr], name=None)
|
| 398 |
+
|
| 399 |
+
if attr in __expired_attributes__:
|
| 400 |
+
raise AttributeError(
|
| 401 |
+
f"`np.{attr}` was removed in the NumPy 2.0 release. "
|
| 402 |
+
f"{__expired_attributes__[attr]}",
|
| 403 |
+
name=None
|
| 404 |
+
)
|
| 405 |
+
|
| 406 |
+
if attr == "chararray":
|
| 407 |
+
warnings.warn(
|
| 408 |
+
"`np.chararray` is deprecated and will be removed from "
|
| 409 |
+
"the main namespace in the future. Use an array with a string "
|
| 410 |
+
"or bytes dtype instead.", DeprecationWarning, stacklevel=2)
|
| 411 |
+
import numpy.char as char
|
| 412 |
+
return char.chararray
|
| 413 |
+
|
| 414 |
+
raise AttributeError("module {!r} has no attribute "
|
| 415 |
+
"{!r}".format(__name__, attr))
|
| 416 |
+
|
| 417 |
+
def __dir__():
|
| 418 |
+
public_symbols = (
|
| 419 |
+
globals().keys() | __numpy_submodules__
|
| 420 |
+
)
|
| 421 |
+
public_symbols -= {
|
| 422 |
+
"matrixlib", "matlib", "tests", "conftest", "version",
|
| 423 |
+
"compat", "distutils", "array_api"
|
| 424 |
+
}
|
| 425 |
+
return list(public_symbols)
|
| 426 |
+
|
| 427 |
+
# Pytest testing
|
| 428 |
+
from numpy._pytesttester import PytestTester
|
| 429 |
+
test = PytestTester(__name__)
|
| 430 |
+
del PytestTester
|
| 431 |
+
|
| 432 |
+
def _sanity_check():
|
| 433 |
+
"""
|
| 434 |
+
Quick sanity checks for common bugs caused by environment.
|
| 435 |
+
There are some cases e.g. with wrong BLAS ABI that cause wrong
|
| 436 |
+
results under specific runtime conditions that are not necessarily
|
| 437 |
+
achieved during test suite runs, and it is useful to catch those early.
|
| 438 |
+
|
| 439 |
+
See https://github.com/numpy/numpy/issues/8577 and other
|
| 440 |
+
similar bug reports.
|
| 441 |
+
|
| 442 |
+
"""
|
| 443 |
+
try:
|
| 444 |
+
x = ones(2, dtype=float32)
|
| 445 |
+
if not abs(x.dot(x) - float32(2.0)) < 1e-5:
|
| 446 |
+
raise AssertionError
|
| 447 |
+
except AssertionError:
|
| 448 |
+
msg = ("The current Numpy installation ({!r}) fails to "
|
| 449 |
+
"pass simple sanity checks. This can be caused for example "
|
| 450 |
+
"by incorrect BLAS library being linked in, or by mixing "
|
| 451 |
+
"package managers (pip, conda, apt, ...). Search closed "
|
| 452 |
+
"numpy issues for similar problems.")
|
| 453 |
+
raise RuntimeError(msg.format(__file__)) from None
|
| 454 |
+
|
| 455 |
+
_sanity_check()
|
| 456 |
+
del _sanity_check
|
| 457 |
+
|
| 458 |
+
def _mac_os_check():
|
| 459 |
+
"""
|
| 460 |
+
Quick Sanity check for Mac OS look for accelerate build bugs.
|
| 461 |
+
Testing numpy polyfit calls init_dgelsd(LAPACK)
|
| 462 |
+
"""
|
| 463 |
+
try:
|
| 464 |
+
c = array([3., 2., 1.])
|
| 465 |
+
x = linspace(0, 2, 5)
|
| 466 |
+
y = polyval(c, x)
|
| 467 |
+
_ = polyfit(x, y, 2, cov=True)
|
| 468 |
+
except ValueError:
|
| 469 |
+
pass
|
| 470 |
+
|
| 471 |
+
if sys.platform == "darwin":
|
| 472 |
+
from . import exceptions
|
| 473 |
+
with warnings.catch_warnings(record=True) as w:
|
| 474 |
+
_mac_os_check()
|
| 475 |
+
# Throw runtime error, if the test failed Check for warning and error_message
|
| 476 |
+
if len(w) > 0:
|
| 477 |
+
for _wn in w:
|
| 478 |
+
if _wn.category is exceptions.RankWarning:
|
| 479 |
+
# Ignore other warnings, they may not be relevant (see gh-25433).
|
| 480 |
+
error_message = (
|
| 481 |
+
f"{_wn.category.__name__}: {_wn.message}"
|
| 482 |
+
)
|
| 483 |
+
msg = (
|
| 484 |
+
"Polyfit sanity test emitted a warning, most likely due "
|
| 485 |
+
"to using a buggy Accelerate backend."
|
| 486 |
+
"\nIf you compiled yourself, more information is available at:"
|
| 487 |
+
"\nhttps://numpy.org/devdocs/building/index.html"
|
| 488 |
+
"\nOtherwise report this to the vendor "
|
| 489 |
+
"that provided NumPy.\n\n{}\n".format(error_message))
|
| 490 |
+
raise RuntimeError(msg)
|
| 491 |
+
del _wn
|
| 492 |
+
del w
|
| 493 |
+
del _mac_os_check
|
| 494 |
+
|
| 495 |
+
def hugepage_setup():
|
| 496 |
+
"""
|
| 497 |
+
We usually use madvise hugepages support, but on some old kernels it
|
| 498 |
+
is slow and thus better avoided. Specifically kernel version 4.6
|
| 499 |
+
had a bug fix which probably fixed this:
|
| 500 |
+
https://github.com/torvalds/linux/commit/7cf91a98e607c2f935dbcc177d70011e95b8faff
|
| 501 |
+
"""
|
| 502 |
+
use_hugepage = os.environ.get("NUMPY_MADVISE_HUGEPAGE", None)
|
| 503 |
+
if sys.platform == "linux" and use_hugepage is None:
|
| 504 |
+
# If there is an issue with parsing the kernel version,
|
| 505 |
+
# set use_hugepage to 0. Usage of LooseVersion will handle
|
| 506 |
+
# the kernel version parsing better, but avoided since it
|
| 507 |
+
# will increase the import time.
|
| 508 |
+
# See: #16679 for related discussion.
|
| 509 |
+
try:
|
| 510 |
+
use_hugepage = 1
|
| 511 |
+
kernel_version = os.uname().release.split(".")[:2]
|
| 512 |
+
kernel_version = tuple(int(v) for v in kernel_version)
|
| 513 |
+
if kernel_version < (4, 6):
|
| 514 |
+
use_hugepage = 0
|
| 515 |
+
except ValueError:
|
| 516 |
+
use_hugepage = 0
|
| 517 |
+
elif use_hugepage is None:
|
| 518 |
+
# This is not Linux, so it should not matter, just enable anyway
|
| 519 |
+
use_hugepage = 1
|
| 520 |
+
else:
|
| 521 |
+
use_hugepage = int(use_hugepage)
|
| 522 |
+
return use_hugepage
|
| 523 |
+
|
| 524 |
+
# Note that this will currently only make a difference on Linux
|
| 525 |
+
_core.multiarray._set_madvise_hugepage(hugepage_setup())
|
| 526 |
+
del hugepage_setup
|
| 527 |
+
|
| 528 |
+
# Give a warning if NumPy is reloaded or imported on a sub-interpreter
|
| 529 |
+
# We do this from python, since the C-module may not be reloaded and
|
| 530 |
+
# it is tidier organized.
|
| 531 |
+
_core.multiarray._multiarray_umath._reload_guard()
|
| 532 |
+
|
| 533 |
+
# TODO: Remove the environment variable entirely now that it is "weak"
|
| 534 |
+
if (os.environ.get("NPY_PROMOTION_STATE", "weak") != "weak"):
|
| 535 |
+
warnings.warn(
|
| 536 |
+
"NPY_PROMOTION_STATE was a temporary feature for NumPy 2.0 "
|
| 537 |
+
"transition and is ignored after NumPy 2.2.",
|
| 538 |
+
UserWarning, stacklevel=2)
|
| 539 |
+
|
| 540 |
+
# Tell PyInstaller where to find hook-numpy.py
|
| 541 |
+
def _pyinstaller_hooks_dir():
|
| 542 |
+
from pathlib import Path
|
| 543 |
+
return [str(Path(__file__).with_name("_pyinstaller").resolve())]
|
| 544 |
+
|
| 545 |
+
|
| 546 |
+
# Remove symbols imported for internal use
|
| 547 |
+
del os, sys, warnings
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__init__.pyi
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/__config__.cpython-310.pyc
ADDED
|
Binary file (4.15 kB). View file
|
|
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (22.5 kB). View file
|
|
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/_array_api_info.cpython-310.pyc
ADDED
|
Binary file (9.27 kB). View file
|
|
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/_distributor_init.cpython-310.pyc
ADDED
|
Binary file (678 Bytes). View file
|
|
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/_expired_attrs_2_0.cpython-310.pyc
ADDED
|
Binary file (3.84 kB). View file
|
|
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/_globals.cpython-310.pyc
ADDED
|
Binary file (3.55 kB). View file
|
|
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/_pytesttester.cpython-310.pyc
ADDED
|
Binary file (5.77 kB). View file
|
|
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/ctypeslib.cpython-310.pyc
ADDED
|
Binary file (16.2 kB). View file
|
|
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/dtypes.cpython-310.pyc
ADDED
|
Binary file (1.36 kB). View file
|
|
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/__pycache__/exceptions.cpython-310.pyc
ADDED
|
Binary file (8.29 kB). View file
|
|
|
Scripts_Climate_to_LA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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Array API Inspection namespace
|
| 3 |
+
|
| 4 |
+
This is the namespace for inspection functions as defined by the array API
|
| 5 |
+
standard. See
|
| 6 |
+
https://data-apis.org/array-api/latest/API_specification/inspection.html for
|
| 7 |
+
more details.
|
| 8 |
+
|
| 9 |
+
"""
|
| 10 |
+
from numpy._core import (
|
| 11 |
+
dtype,
|
| 12 |
+
bool,
|
| 13 |
+
intp,
|
| 14 |
+
int8,
|
| 15 |
+
int16,
|
| 16 |
+
int32,
|
| 17 |
+
int64,
|
| 18 |
+
uint8,
|
| 19 |
+
uint16,
|
| 20 |
+
uint32,
|
| 21 |
+
uint64,
|
| 22 |
+
float32,
|
| 23 |
+
float64,
|
| 24 |
+
complex64,
|
| 25 |
+
complex128,
|
| 26 |
+
)
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
class __array_namespace_info__:
|
| 30 |
+
"""
|
| 31 |
+
Get the array API inspection namespace for NumPy.
|
| 32 |
+
|
| 33 |
+
The array API inspection namespace defines the following functions:
|
| 34 |
+
|
| 35 |
+
- capabilities()
|
| 36 |
+
- default_device()
|
| 37 |
+
- default_dtypes()
|
| 38 |
+
- dtypes()
|
| 39 |
+
- devices()
|
| 40 |
+
|
| 41 |
+
See
|
| 42 |
+
https://data-apis.org/array-api/latest/API_specification/inspection.html
|
| 43 |
+
for more details.
|
| 44 |
+
|
| 45 |
+
Returns
|
| 46 |
+
-------
|
| 47 |
+
info : ModuleType
|
| 48 |
+
The array API inspection namespace for NumPy.
|
| 49 |
+
|
| 50 |
+
Examples
|
| 51 |
+
--------
|
| 52 |
+
>>> info = np.__array_namespace_info__()
|
| 53 |
+
>>> info.default_dtypes()
|
| 54 |
+
{'real floating': numpy.float64,
|
| 55 |
+
'complex floating': numpy.complex128,
|
| 56 |
+
'integral': numpy.int64,
|
| 57 |
+
'indexing': numpy.int64}
|
| 58 |
+
|
| 59 |
+
"""
|
| 60 |
+
|
| 61 |
+
__module__ = 'numpy'
|
| 62 |
+
|
| 63 |
+
def capabilities(self):
|
| 64 |
+
"""
|
| 65 |
+
Return a dictionary of array API library capabilities.
|
| 66 |
+
|
| 67 |
+
The resulting dictionary has the following keys:
|
| 68 |
+
|
| 69 |
+
- **"boolean indexing"**: boolean indicating whether an array library
|
| 70 |
+
supports boolean indexing. Always ``True`` for NumPy.
|
| 71 |
+
|
| 72 |
+
- **"data-dependent shapes"**: boolean indicating whether an array
|
| 73 |
+
library supports data-dependent output shapes. Always ``True`` for
|
| 74 |
+
NumPy.
|
| 75 |
+
|
| 76 |
+
See
|
| 77 |
+
https://data-apis.org/array-api/latest/API_specification/generated/array_api.info.capabilities.html
|
| 78 |
+
for more details.
|
| 79 |
+
|
| 80 |
+
See Also
|
| 81 |
+
--------
|
| 82 |
+
__array_namespace_info__.default_device,
|
| 83 |
+
__array_namespace_info__.default_dtypes,
|
| 84 |
+
__array_namespace_info__.dtypes,
|
| 85 |
+
__array_namespace_info__.devices
|
| 86 |
+
|
| 87 |
+
Returns
|
| 88 |
+
-------
|
| 89 |
+
capabilities : dict
|
| 90 |
+
A dictionary of array API library capabilities.
|
| 91 |
+
|
| 92 |
+
Examples
|
| 93 |
+
--------
|
| 94 |
+
>>> info = np.__array_namespace_info__()
|
| 95 |
+
>>> info.capabilities()
|
| 96 |
+
{'boolean indexing': True,
|
| 97 |
+
'data-dependent shapes': True}
|
| 98 |
+
|
| 99 |
+
"""
|
| 100 |
+
return {
|
| 101 |
+
"boolean indexing": True,
|
| 102 |
+
"data-dependent shapes": True,
|
| 103 |
+
# 'max rank' will be part of the 2024.12 standard
|
| 104 |
+
# "max rank": 64,
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
def default_device(self):
|
| 108 |
+
"""
|
| 109 |
+
The default device used for new NumPy arrays.
|
| 110 |
+
|
| 111 |
+
For NumPy, this always returns ``'cpu'``.
|
| 112 |
+
|
| 113 |
+
See Also
|
| 114 |
+
--------
|
| 115 |
+
__array_namespace_info__.capabilities,
|
| 116 |
+
__array_namespace_info__.default_dtypes,
|
| 117 |
+
__array_namespace_info__.dtypes,
|
| 118 |
+
__array_namespace_info__.devices
|
| 119 |
+
|
| 120 |
+
Returns
|
| 121 |
+
-------
|
| 122 |
+
device : str
|
| 123 |
+
The default device used for new NumPy arrays.
|
| 124 |
+
|
| 125 |
+
Examples
|
| 126 |
+
--------
|
| 127 |
+
>>> info = np.__array_namespace_info__()
|
| 128 |
+
>>> info.default_device()
|
| 129 |
+
'cpu'
|
| 130 |
+
|
| 131 |
+
"""
|
| 132 |
+
return "cpu"
|
| 133 |
+
|
| 134 |
+
def default_dtypes(self, *, device=None):
|
| 135 |
+
"""
|
| 136 |
+
The default data types used for new NumPy arrays.
|
| 137 |
+
|
| 138 |
+
For NumPy, this always returns the following dictionary:
|
| 139 |
+
|
| 140 |
+
- **"real floating"**: ``numpy.float64``
|
| 141 |
+
- **"complex floating"**: ``numpy.complex128``
|
| 142 |
+
- **"integral"**: ``numpy.intp``
|
| 143 |
+
- **"indexing"**: ``numpy.intp``
|
| 144 |
+
|
| 145 |
+
Parameters
|
| 146 |
+
----------
|
| 147 |
+
device : str, optional
|
| 148 |
+
The device to get the default data types for. For NumPy, only
|
| 149 |
+
``'cpu'`` is allowed.
|
| 150 |
+
|
| 151 |
+
Returns
|
| 152 |
+
-------
|
| 153 |
+
dtypes : dict
|
| 154 |
+
A dictionary describing the default data types used for new NumPy
|
| 155 |
+
arrays.
|
| 156 |
+
|
| 157 |
+
See Also
|
| 158 |
+
--------
|
| 159 |
+
__array_namespace_info__.capabilities,
|
| 160 |
+
__array_namespace_info__.default_device,
|
| 161 |
+
__array_namespace_info__.dtypes,
|
| 162 |
+
__array_namespace_info__.devices
|
| 163 |
+
|
| 164 |
+
Examples
|
| 165 |
+
--------
|
| 166 |
+
>>> info = np.__array_namespace_info__()
|
| 167 |
+
>>> info.default_dtypes()
|
| 168 |
+
{'real floating': numpy.float64,
|
| 169 |
+
'complex floating': numpy.complex128,
|
| 170 |
+
'integral': numpy.int64,
|
| 171 |
+
'indexing': numpy.int64}
|
| 172 |
+
|
| 173 |
+
"""
|
| 174 |
+
if device not in ["cpu", None]:
|
| 175 |
+
raise ValueError(
|
| 176 |
+
'Device not understood. Only "cpu" is allowed, but received:'
|
| 177 |
+
f' {device}'
|
| 178 |
+
)
|
| 179 |
+
return {
|
| 180 |
+
"real floating": dtype(float64),
|
| 181 |
+
"complex floating": dtype(complex128),
|
| 182 |
+
"integral": dtype(intp),
|
| 183 |
+
"indexing": dtype(intp),
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
def dtypes(self, *, device=None, kind=None):
|
| 187 |
+
"""
|
| 188 |
+
The array API data types supported by NumPy.
|
| 189 |
+
|
| 190 |
+
Note that this function only returns data types that are defined by
|
| 191 |
+
the array API.
|
| 192 |
+
|
| 193 |
+
Parameters
|
| 194 |
+
----------
|
| 195 |
+
device : str, optional
|
| 196 |
+
The device to get the data types for. For NumPy, only ``'cpu'`` is
|
| 197 |
+
allowed.
|
| 198 |
+
kind : str or tuple of str, optional
|
| 199 |
+
The kind of data types to return. If ``None``, all data types are
|
| 200 |
+
returned. If a string, only data types of that kind are returned.
|
| 201 |
+
If a tuple, a dictionary containing the union of the given kinds
|
| 202 |
+
is returned. The following kinds are supported:
|
| 203 |
+
|
| 204 |
+
- ``'bool'``: boolean data types (i.e., ``bool``).
|
| 205 |
+
- ``'signed integer'``: signed integer data types (i.e., ``int8``,
|
| 206 |
+
``int16``, ``int32``, ``int64``).
|
| 207 |
+
- ``'unsigned integer'``: unsigned integer data types (i.e.,
|
| 208 |
+
``uint8``, ``uint16``, ``uint32``, ``uint64``).
|
| 209 |
+
- ``'integral'``: integer data types. Shorthand for ``('signed
|
| 210 |
+
integer', 'unsigned integer')``.
|
| 211 |
+
- ``'real floating'``: real-valued floating-point data types
|
| 212 |
+
(i.e., ``float32``, ``float64``).
|
| 213 |
+
- ``'complex floating'``: complex floating-point data types (i.e.,
|
| 214 |
+
``complex64``, ``complex128``).
|
| 215 |
+
- ``'numeric'``: numeric data types. Shorthand for ``('integral',
|
| 216 |
+
'real floating', 'complex floating')``.
|
| 217 |
+
|
| 218 |
+
Returns
|
| 219 |
+
-------
|
| 220 |
+
dtypes : dict
|
| 221 |
+
A dictionary mapping the names of data types to the corresponding
|
| 222 |
+
NumPy data types.
|
| 223 |
+
|
| 224 |
+
See Also
|
| 225 |
+
--------
|
| 226 |
+
__array_namespace_info__.capabilities,
|
| 227 |
+
__array_namespace_info__.default_device,
|
| 228 |
+
__array_namespace_info__.default_dtypes,
|
| 229 |
+
__array_namespace_info__.devices
|
| 230 |
+
|
| 231 |
+
Examples
|
| 232 |
+
--------
|
| 233 |
+
>>> info = np.__array_namespace_info__()
|
| 234 |
+
>>> info.dtypes(kind='signed integer')
|
| 235 |
+
{'int8': numpy.int8,
|
| 236 |
+
'int16': numpy.int16,
|
| 237 |
+
'int32': numpy.int32,
|
| 238 |
+
'int64': numpy.int64}
|
| 239 |
+
|
| 240 |
+
"""
|
| 241 |
+
if device not in ["cpu", None]:
|
| 242 |
+
raise ValueError(
|
| 243 |
+
'Device not understood. Only "cpu" is allowed, but received:'
|
| 244 |
+
f' {device}'
|
| 245 |
+
)
|
| 246 |
+
if kind is None:
|
| 247 |
+
return {
|
| 248 |
+
"bool": dtype(bool),
|
| 249 |
+
"int8": dtype(int8),
|
| 250 |
+
"int16": dtype(int16),
|
| 251 |
+
"int32": dtype(int32),
|
| 252 |
+
"int64": dtype(int64),
|
| 253 |
+
"uint8": dtype(uint8),
|
| 254 |
+
"uint16": dtype(uint16),
|
| 255 |
+
"uint32": dtype(uint32),
|
| 256 |
+
"uint64": dtype(uint64),
|
| 257 |
+
"float32": dtype(float32),
|
| 258 |
+
"float64": dtype(float64),
|
| 259 |
+
"complex64": dtype(complex64),
|
| 260 |
+
"complex128": dtype(complex128),
|
| 261 |
+
}
|
| 262 |
+
if kind == "bool":
|
| 263 |
+
return {"bool": bool}
|
| 264 |
+
if kind == "signed integer":
|
| 265 |
+
return {
|
| 266 |
+
"int8": dtype(int8),
|
| 267 |
+
"int16": dtype(int16),
|
| 268 |
+
"int32": dtype(int32),
|
| 269 |
+
"int64": dtype(int64),
|
| 270 |
+
}
|
| 271 |
+
if kind == "unsigned integer":
|
| 272 |
+
return {
|
| 273 |
+
"uint8": dtype(uint8),
|
| 274 |
+
"uint16": dtype(uint16),
|
| 275 |
+
"uint32": dtype(uint32),
|
| 276 |
+
"uint64": dtype(uint64),
|
| 277 |
+
}
|
| 278 |
+
if kind == "integral":
|
| 279 |
+
return {
|
| 280 |
+
"int8": dtype(int8),
|
| 281 |
+
"int16": dtype(int16),
|
| 282 |
+
"int32": dtype(int32),
|
| 283 |
+
"int64": dtype(int64),
|
| 284 |
+
"uint8": dtype(uint8),
|
| 285 |
+
"uint16": dtype(uint16),
|
| 286 |
+
"uint32": dtype(uint32),
|
| 287 |
+
"uint64": dtype(uint64),
|
| 288 |
+
}
|
| 289 |
+
if kind == "real floating":
|
| 290 |
+
return {
|
| 291 |
+
"float32": dtype(float32),
|
| 292 |
+
"float64": dtype(float64),
|
| 293 |
+
}
|
| 294 |
+
if kind == "complex floating":
|
| 295 |
+
return {
|
| 296 |
+
"complex64": dtype(complex64),
|
| 297 |
+
"complex128": dtype(complex128),
|
| 298 |
+
}
|
| 299 |
+
if kind == "numeric":
|
| 300 |
+
return {
|
| 301 |
+
"int8": dtype(int8),
|
| 302 |
+
"int16": dtype(int16),
|
| 303 |
+
"int32": dtype(int32),
|
| 304 |
+
"int64": dtype(int64),
|
| 305 |
+
"uint8": dtype(uint8),
|
| 306 |
+
"uint16": dtype(uint16),
|
| 307 |
+
"uint32": dtype(uint32),
|
| 308 |
+
"uint64": dtype(uint64),
|
| 309 |
+
"float32": dtype(float32),
|
| 310 |
+
"float64": dtype(float64),
|
| 311 |
+
"complex64": dtype(complex64),
|
| 312 |
+
"complex128": dtype(complex128),
|
| 313 |
+
}
|
| 314 |
+
if isinstance(kind, tuple):
|
| 315 |
+
res = {}
|
| 316 |
+
for k in kind:
|
| 317 |
+
res.update(self.dtypes(kind=k))
|
| 318 |
+
return res
|
| 319 |
+
raise ValueError(f"unsupported kind: {kind!r}")
|
| 320 |
+
|
| 321 |
+
def devices(self):
|
| 322 |
+
"""
|
| 323 |
+
The devices supported by NumPy.
|
| 324 |
+
|
| 325 |
+
For NumPy, this always returns ``['cpu']``.
|
| 326 |
+
|
| 327 |
+
Returns
|
| 328 |
+
-------
|
| 329 |
+
devices : list of str
|
| 330 |
+
The devices supported by NumPy.
|
| 331 |
+
|
| 332 |
+
See Also
|
| 333 |
+
--------
|
| 334 |
+
__array_namespace_info__.capabilities,
|
| 335 |
+
__array_namespace_info__.default_device,
|
| 336 |
+
__array_namespace_info__.default_dtypes,
|
| 337 |
+
__array_namespace_info__.dtypes
|
| 338 |
+
|
| 339 |
+
Examples
|
| 340 |
+
--------
|
| 341 |
+
>>> info = np.__array_namespace_info__()
|
| 342 |
+
>>> info.devices()
|
| 343 |
+
['cpu']
|
| 344 |
+
|
| 345 |
+
"""
|
| 346 |
+
return ["cpu"]
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_array_api_info.pyi
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
| 1 |
+
from typing import (
|
| 2 |
+
ClassVar,
|
| 3 |
+
Literal,
|
| 4 |
+
TypeAlias,
|
| 5 |
+
TypedDict,
|
| 6 |
+
TypeVar,
|
| 7 |
+
final,
|
| 8 |
+
overload,
|
| 9 |
+
type_check_only,
|
| 10 |
+
)
|
| 11 |
+
from typing_extensions import Never
|
| 12 |
+
|
| 13 |
+
import numpy as np
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
_Device: TypeAlias = Literal["cpu"]
|
| 17 |
+
_DeviceLike: TypeAlias = None | _Device
|
| 18 |
+
|
| 19 |
+
_Capabilities = TypedDict(
|
| 20 |
+
"_Capabilities",
|
| 21 |
+
{
|
| 22 |
+
"boolean indexing": Literal[True],
|
| 23 |
+
"data-dependent shapes": Literal[True],
|
| 24 |
+
},
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
_DefaultDTypes = TypedDict(
|
| 28 |
+
"_DefaultDTypes",
|
| 29 |
+
{
|
| 30 |
+
"real floating": np.dtype[np.float64],
|
| 31 |
+
"complex floating": np.dtype[np.complex128],
|
| 32 |
+
"integral": np.dtype[np.intp],
|
| 33 |
+
"indexing": np.dtype[np.intp],
|
| 34 |
+
},
|
| 35 |
+
)
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
_KindBool: TypeAlias = Literal["bool"]
|
| 39 |
+
_KindInt: TypeAlias = Literal["signed integer"]
|
| 40 |
+
_KindUInt: TypeAlias = Literal["unsigned integer"]
|
| 41 |
+
_KindInteger: TypeAlias = Literal["integral"]
|
| 42 |
+
_KindFloat: TypeAlias = Literal["real floating"]
|
| 43 |
+
_KindComplex: TypeAlias = Literal["complex floating"]
|
| 44 |
+
_KindNumber: TypeAlias = Literal["numeric"]
|
| 45 |
+
_Kind: TypeAlias = (
|
| 46 |
+
_KindBool
|
| 47 |
+
| _KindInt
|
| 48 |
+
| _KindUInt
|
| 49 |
+
| _KindInteger
|
| 50 |
+
| _KindFloat
|
| 51 |
+
| _KindComplex
|
| 52 |
+
| _KindNumber
|
| 53 |
+
)
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
_T1 = TypeVar("_T1")
|
| 57 |
+
_T2 = TypeVar("_T2")
|
| 58 |
+
_T3 = TypeVar("_T3")
|
| 59 |
+
_Permute1: TypeAlias = _T1 | tuple[_T1]
|
| 60 |
+
_Permute2: TypeAlias = tuple[_T1, _T2] | tuple[_T2, _T1]
|
| 61 |
+
_Permute3: TypeAlias = (
|
| 62 |
+
tuple[_T1, _T2, _T3] | tuple[_T1, _T3, _T2]
|
| 63 |
+
| tuple[_T2, _T1, _T3] | tuple[_T2, _T3, _T1]
|
| 64 |
+
| tuple[_T3, _T1, _T2] | tuple[_T3, _T2, _T1]
|
| 65 |
+
)
|
| 66 |
+
|
| 67 |
+
@type_check_only
|
| 68 |
+
class _DTypesBool(TypedDict):
|
| 69 |
+
bool: np.dtype[np.bool]
|
| 70 |
+
|
| 71 |
+
@type_check_only
|
| 72 |
+
class _DTypesInt(TypedDict):
|
| 73 |
+
int8: np.dtype[np.int8]
|
| 74 |
+
int16: np.dtype[np.int16]
|
| 75 |
+
int32: np.dtype[np.int32]
|
| 76 |
+
int64: np.dtype[np.int64]
|
| 77 |
+
|
| 78 |
+
@type_check_only
|
| 79 |
+
class _DTypesUInt(TypedDict):
|
| 80 |
+
uint8: np.dtype[np.uint8]
|
| 81 |
+
uint16: np.dtype[np.uint16]
|
| 82 |
+
uint32: np.dtype[np.uint32]
|
| 83 |
+
uint64: np.dtype[np.uint64]
|
| 84 |
+
|
| 85 |
+
@type_check_only
|
| 86 |
+
class _DTypesInteger(_DTypesInt, _DTypesUInt): ...
|
| 87 |
+
|
| 88 |
+
@type_check_only
|
| 89 |
+
class _DTypesFloat(TypedDict):
|
| 90 |
+
float32: np.dtype[np.float32]
|
| 91 |
+
float64: np.dtype[np.float64]
|
| 92 |
+
|
| 93 |
+
@type_check_only
|
| 94 |
+
class _DTypesComplex(TypedDict):
|
| 95 |
+
complex64: np.dtype[np.complex64]
|
| 96 |
+
complex128: np.dtype[np.complex128]
|
| 97 |
+
|
| 98 |
+
@type_check_only
|
| 99 |
+
class _DTypesNumber(_DTypesInteger, _DTypesFloat, _DTypesComplex): ...
|
| 100 |
+
|
| 101 |
+
@type_check_only
|
| 102 |
+
class _DTypes(_DTypesBool, _DTypesNumber): ...
|
| 103 |
+
|
| 104 |
+
@type_check_only
|
| 105 |
+
class _DTypesUnion(TypedDict, total=False):
|
| 106 |
+
bool: np.dtype[np.bool]
|
| 107 |
+
int8: np.dtype[np.int8]
|
| 108 |
+
int16: np.dtype[np.int16]
|
| 109 |
+
int32: np.dtype[np.int32]
|
| 110 |
+
int64: np.dtype[np.int64]
|
| 111 |
+
uint8: np.dtype[np.uint8]
|
| 112 |
+
uint16: np.dtype[np.uint16]
|
| 113 |
+
uint32: np.dtype[np.uint32]
|
| 114 |
+
uint64: np.dtype[np.uint64]
|
| 115 |
+
float32: np.dtype[np.float32]
|
| 116 |
+
float64: np.dtype[np.float64]
|
| 117 |
+
complex64: np.dtype[np.complex64]
|
| 118 |
+
complex128: np.dtype[np.complex128]
|
| 119 |
+
|
| 120 |
+
_EmptyDict: TypeAlias = dict[Never, Never]
|
| 121 |
+
|
| 122 |
+
@final
|
| 123 |
+
class __array_namespace_info__:
|
| 124 |
+
__module__: ClassVar[Literal['numpy']]
|
| 125 |
+
|
| 126 |
+
def capabilities(self) -> _Capabilities: ...
|
| 127 |
+
def default_device(self) -> _Device: ...
|
| 128 |
+
def default_dtypes(
|
| 129 |
+
self,
|
| 130 |
+
*,
|
| 131 |
+
device: _DeviceLike = ...,
|
| 132 |
+
) -> _DefaultDTypes: ...
|
| 133 |
+
def devices(self) -> list[_Device]: ...
|
| 134 |
+
|
| 135 |
+
@overload
|
| 136 |
+
def dtypes(
|
| 137 |
+
self,
|
| 138 |
+
*,
|
| 139 |
+
device: _DeviceLike = ...,
|
| 140 |
+
kind: None = ...,
|
| 141 |
+
) -> _DTypes: ...
|
| 142 |
+
@overload
|
| 143 |
+
def dtypes(
|
| 144 |
+
self,
|
| 145 |
+
*,
|
| 146 |
+
device: _DeviceLike = ...,
|
| 147 |
+
kind: _Permute1[_KindBool],
|
| 148 |
+
) -> _DTypesBool: ...
|
| 149 |
+
@overload
|
| 150 |
+
def dtypes(
|
| 151 |
+
self,
|
| 152 |
+
*,
|
| 153 |
+
device: _DeviceLike = ...,
|
| 154 |
+
kind: _Permute1[_KindInt],
|
| 155 |
+
) -> _DTypesInt: ...
|
| 156 |
+
@overload
|
| 157 |
+
def dtypes(
|
| 158 |
+
self,
|
| 159 |
+
*,
|
| 160 |
+
device: _DeviceLike = ...,
|
| 161 |
+
kind: _Permute1[_KindUInt],
|
| 162 |
+
) -> _DTypesUInt: ...
|
| 163 |
+
@overload
|
| 164 |
+
def dtypes(
|
| 165 |
+
self,
|
| 166 |
+
*,
|
| 167 |
+
device: _DeviceLike = ...,
|
| 168 |
+
kind: _Permute1[_KindFloat],
|
| 169 |
+
) -> _DTypesFloat: ...
|
| 170 |
+
@overload
|
| 171 |
+
def dtypes(
|
| 172 |
+
self,
|
| 173 |
+
*,
|
| 174 |
+
device: _DeviceLike = ...,
|
| 175 |
+
kind: _Permute1[_KindComplex],
|
| 176 |
+
) -> _DTypesComplex: ...
|
| 177 |
+
@overload
|
| 178 |
+
def dtypes(
|
| 179 |
+
self,
|
| 180 |
+
*,
|
| 181 |
+
device: _DeviceLike = ...,
|
| 182 |
+
kind: (
|
| 183 |
+
_Permute1[_KindInteger]
|
| 184 |
+
| _Permute2[_KindInt, _KindUInt]
|
| 185 |
+
),
|
| 186 |
+
) -> _DTypesInteger: ...
|
| 187 |
+
@overload
|
| 188 |
+
def dtypes(
|
| 189 |
+
self,
|
| 190 |
+
*,
|
| 191 |
+
device: _DeviceLike = ...,
|
| 192 |
+
kind: (
|
| 193 |
+
_Permute1[_KindNumber]
|
| 194 |
+
| _Permute3[_KindInteger, _KindFloat, _KindComplex]
|
| 195 |
+
),
|
| 196 |
+
) -> _DTypesNumber: ...
|
| 197 |
+
@overload
|
| 198 |
+
def dtypes(
|
| 199 |
+
self,
|
| 200 |
+
*,
|
| 201 |
+
device: _DeviceLike = ...,
|
| 202 |
+
kind: tuple[()],
|
| 203 |
+
) -> _EmptyDict: ...
|
| 204 |
+
@overload
|
| 205 |
+
def dtypes(
|
| 206 |
+
self,
|
| 207 |
+
*,
|
| 208 |
+
device: _DeviceLike = ...,
|
| 209 |
+
kind: tuple[_Kind, ...],
|
| 210 |
+
) -> _DTypesUnion: ...
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_configtool.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import argparse
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
import sys
|
| 4 |
+
|
| 5 |
+
from .version import __version__
|
| 6 |
+
from .lib._utils_impl import get_include
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def main() -> None:
|
| 10 |
+
parser = argparse.ArgumentParser()
|
| 11 |
+
parser.add_argument(
|
| 12 |
+
"--version",
|
| 13 |
+
action="version",
|
| 14 |
+
version=__version__,
|
| 15 |
+
help="Print the version and exit.",
|
| 16 |
+
)
|
| 17 |
+
parser.add_argument(
|
| 18 |
+
"--cflags",
|
| 19 |
+
action="store_true",
|
| 20 |
+
help="Compile flag needed when using the NumPy headers.",
|
| 21 |
+
)
|
| 22 |
+
parser.add_argument(
|
| 23 |
+
"--pkgconfigdir",
|
| 24 |
+
action="store_true",
|
| 25 |
+
help=("Print the pkgconfig directory in which `numpy.pc` is stored "
|
| 26 |
+
"(useful for setting $PKG_CONFIG_PATH)."),
|
| 27 |
+
)
|
| 28 |
+
args = parser.parse_args()
|
| 29 |
+
if not sys.argv[1:]:
|
| 30 |
+
parser.print_help()
|
| 31 |
+
if args.cflags:
|
| 32 |
+
print("-I" + get_include())
|
| 33 |
+
if args.pkgconfigdir:
|
| 34 |
+
_path = Path(get_include()) / '..' / 'lib' / 'pkgconfig'
|
| 35 |
+
print(_path.resolve())
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
if __name__ == "__main__":
|
| 39 |
+
main()
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_configtool.pyi
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
def main() -> None: ...
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_distributor_init.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
""" Distributor init file
|
| 2 |
+
|
| 3 |
+
Distributors: you can add custom code here to support particular distributions
|
| 4 |
+
of numpy.
|
| 5 |
+
|
| 6 |
+
For example, this is a good place to put any BLAS/LAPACK initialization code.
|
| 7 |
+
|
| 8 |
+
The numpy standard source distribution will not put code in this file, so you
|
| 9 |
+
can safely replace this file with your own version.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
try:
|
| 13 |
+
from . import _distributor_init_local
|
| 14 |
+
except ImportError:
|
| 15 |
+
pass
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_distributor_init.pyi
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
# intentionally left blank
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_expired_attrs_2_0.py
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Dict of expired attributes that are discontinued since 2.0 release.
|
| 3 |
+
Each item is associated with a migration note.
|
| 4 |
+
"""
|
| 5 |
+
|
| 6 |
+
__expired_attributes__ = {
|
| 7 |
+
"geterrobj": "Use the np.errstate context manager instead.",
|
| 8 |
+
"seterrobj": "Use the np.errstate context manager instead.",
|
| 9 |
+
"cast": "Use `np.asarray(arr, dtype=dtype)` instead.",
|
| 10 |
+
"source": "Use `inspect.getsource` instead.",
|
| 11 |
+
"lookfor": "Search NumPy's documentation directly.",
|
| 12 |
+
"who": "Use an IDE variable explorer or `locals()` instead.",
|
| 13 |
+
"fastCopyAndTranspose": "Use `arr.T.copy()` instead.",
|
| 14 |
+
"set_numeric_ops":
|
| 15 |
+
"For the general case, use `PyUFunc_ReplaceLoopBySignature`. "
|
| 16 |
+
"For ndarray subclasses, define the ``__array_ufunc__`` method "
|
| 17 |
+
"and override the relevant ufunc.",
|
| 18 |
+
"NINF": "Use `-np.inf` instead.",
|
| 19 |
+
"PINF": "Use `np.inf` instead.",
|
| 20 |
+
"NZERO": "Use `-0.0` instead.",
|
| 21 |
+
"PZERO": "Use `0.0` instead.",
|
| 22 |
+
"add_newdoc":
|
| 23 |
+
"It's still available as `np.lib.add_newdoc`.",
|
| 24 |
+
"add_docstring":
|
| 25 |
+
"It's still available as `np.lib.add_docstring`.",
|
| 26 |
+
"add_newdoc_ufunc":
|
| 27 |
+
"It's an internal function and doesn't have a replacement.",
|
| 28 |
+
"compat": "There's no replacement, as Python 2 is no longer supported.",
|
| 29 |
+
"safe_eval": "Use `ast.literal_eval` instead.",
|
| 30 |
+
"float_": "Use `np.float64` instead.",
|
| 31 |
+
"complex_": "Use `np.complex128` instead.",
|
| 32 |
+
"longfloat": "Use `np.longdouble` instead.",
|
| 33 |
+
"singlecomplex": "Use `np.complex64` instead.",
|
| 34 |
+
"cfloat": "Use `np.complex128` instead.",
|
| 35 |
+
"longcomplex": "Use `np.clongdouble` instead.",
|
| 36 |
+
"clongfloat": "Use `np.clongdouble` instead.",
|
| 37 |
+
"string_": "Use `np.bytes_` instead.",
|
| 38 |
+
"unicode_": "Use `np.str_` instead.",
|
| 39 |
+
"Inf": "Use `np.inf` instead.",
|
| 40 |
+
"Infinity": "Use `np.inf` instead.",
|
| 41 |
+
"NaN": "Use `np.nan` instead.",
|
| 42 |
+
"infty": "Use `np.inf` instead.",
|
| 43 |
+
"issctype": "Use `issubclass(rep, np.generic)` instead.",
|
| 44 |
+
"maximum_sctype":
|
| 45 |
+
"Use a specific dtype instead. You should avoid relying "
|
| 46 |
+
"on any implicit mechanism and select the largest dtype of "
|
| 47 |
+
"a kind explicitly in the code.",
|
| 48 |
+
"obj2sctype": "Use `np.dtype(obj).type` instead.",
|
| 49 |
+
"sctype2char": "Use `np.dtype(obj).char` instead.",
|
| 50 |
+
"sctypes": "Access dtypes explicitly instead.",
|
| 51 |
+
"issubsctype": "Use `np.issubdtype` instead.",
|
| 52 |
+
"set_string_function":
|
| 53 |
+
"Use `np.set_printoptions` instead with a formatter for "
|
| 54 |
+
"custom printing of NumPy objects.",
|
| 55 |
+
"asfarray": "Use `np.asarray` with a proper dtype instead.",
|
| 56 |
+
"issubclass_": "Use `issubclass` builtin instead.",
|
| 57 |
+
"tracemalloc_domain": "It's now available from `np.lib`.",
|
| 58 |
+
"mat": "Use `np.asmatrix` instead.",
|
| 59 |
+
"recfromcsv": "Use `np.genfromtxt` with comma delimiter instead.",
|
| 60 |
+
"recfromtxt": "Use `np.genfromtxt` instead.",
|
| 61 |
+
"deprecate": "Emit `DeprecationWarning` with `warnings.warn` directly, "
|
| 62 |
+
"or use `typing.deprecated`.",
|
| 63 |
+
"deprecate_with_doc": "Emit `DeprecationWarning` with `warnings.warn` "
|
| 64 |
+
"directly, or use `typing.deprecated`.",
|
| 65 |
+
"disp": "Use your own printing function instead.",
|
| 66 |
+
"find_common_type":
|
| 67 |
+
"Use `numpy.promote_types` or `numpy.result_type` instead. "
|
| 68 |
+
"To achieve semantics for the `scalar_types` argument, use "
|
| 69 |
+
"`numpy.result_type` and pass the Python values `0`, `0.0`, or `0j`.",
|
| 70 |
+
"round_": "Use `np.round` instead.",
|
| 71 |
+
"get_array_wrap": "",
|
| 72 |
+
"DataSource": "It's still available as `np.lib.npyio.DataSource`.",
|
| 73 |
+
"nbytes": "Use `np.dtype(<dtype>).itemsize` instead.",
|
| 74 |
+
"byte_bounds": "Now it's available under `np.lib.array_utils.byte_bounds`",
|
| 75 |
+
"compare_chararrays":
|
| 76 |
+
"It's still available as `np.char.compare_chararrays`.",
|
| 77 |
+
"format_parser": "It's still available as `np.rec.format_parser`.",
|
| 78 |
+
"alltrue": "Use `np.all` instead.",
|
| 79 |
+
"sometrue": "Use `np.any` instead.",
|
| 80 |
+
}
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_expired_attrs_2_0.pyi
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Final, TypedDict, final, type_check_only
|
| 2 |
+
|
| 3 |
+
@final
|
| 4 |
+
@type_check_only
|
| 5 |
+
class _ExpiredAttributesType(TypedDict):
|
| 6 |
+
geterrobj: str
|
| 7 |
+
seterrobj: str
|
| 8 |
+
cast: str
|
| 9 |
+
source: str
|
| 10 |
+
lookfor: str
|
| 11 |
+
who: str
|
| 12 |
+
fastCopyAndTranspose: str
|
| 13 |
+
set_numeric_ops: str
|
| 14 |
+
NINF: str
|
| 15 |
+
PINF: str
|
| 16 |
+
NZERO: str
|
| 17 |
+
PZERO: str
|
| 18 |
+
add_newdoc: str
|
| 19 |
+
add_docstring: str
|
| 20 |
+
add_newdoc_ufunc: str
|
| 21 |
+
compat: str
|
| 22 |
+
safe_eval: str
|
| 23 |
+
float_: str
|
| 24 |
+
complex_: str
|
| 25 |
+
longfloat: str
|
| 26 |
+
singlecomplex: str
|
| 27 |
+
cfloat: str
|
| 28 |
+
longcomplex: str
|
| 29 |
+
clongfloat: str
|
| 30 |
+
string_: str
|
| 31 |
+
unicode_: str
|
| 32 |
+
Inf: str
|
| 33 |
+
Infinity: str
|
| 34 |
+
NaN: str
|
| 35 |
+
infty: str
|
| 36 |
+
issctype: str
|
| 37 |
+
maximum_sctype: str
|
| 38 |
+
obj2sctype: str
|
| 39 |
+
sctype2char: str
|
| 40 |
+
sctypes: str
|
| 41 |
+
issubsctype: str
|
| 42 |
+
set_string_function: str
|
| 43 |
+
asfarray: str
|
| 44 |
+
issubclass_: str
|
| 45 |
+
tracemalloc_domain: str
|
| 46 |
+
mat: str
|
| 47 |
+
recfromcsv: str
|
| 48 |
+
recfromtxt: str
|
| 49 |
+
deprecate: str
|
| 50 |
+
deprecate_with_doc: str
|
| 51 |
+
disp: str
|
| 52 |
+
find_common_type: str
|
| 53 |
+
round_: str
|
| 54 |
+
get_array_wrap: str
|
| 55 |
+
DataSource: str
|
| 56 |
+
nbytes: str
|
| 57 |
+
byte_bounds: str
|
| 58 |
+
compare_chararrays: str
|
| 59 |
+
format_parser: str
|
| 60 |
+
alltrue: str
|
| 61 |
+
sometrue: str
|
| 62 |
+
|
| 63 |
+
__expired_attributes__: Final[_ExpiredAttributesType] = ...
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_globals.py
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Module defining global singleton classes.
|
| 3 |
+
|
| 4 |
+
This module raises a RuntimeError if an attempt to reload it is made. In that
|
| 5 |
+
way the identities of the classes defined here are fixed and will remain so
|
| 6 |
+
even if numpy itself is reloaded. In particular, a function like the following
|
| 7 |
+
will still work correctly after numpy is reloaded::
|
| 8 |
+
|
| 9 |
+
def foo(arg=np._NoValue):
|
| 10 |
+
if arg is np._NoValue:
|
| 11 |
+
...
|
| 12 |
+
|
| 13 |
+
That was not the case when the singleton classes were defined in the numpy
|
| 14 |
+
``__init__.py`` file. See gh-7844 for a discussion of the reload problem that
|
| 15 |
+
motivated this module.
|
| 16 |
+
|
| 17 |
+
"""
|
| 18 |
+
import enum
|
| 19 |
+
|
| 20 |
+
from ._utils import set_module as _set_module
|
| 21 |
+
|
| 22 |
+
__all__ = ['_NoValue', '_CopyMode']
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
# Disallow reloading this module so as to preserve the identities of the
|
| 26 |
+
# classes defined here.
|
| 27 |
+
if '_is_loaded' in globals():
|
| 28 |
+
raise RuntimeError('Reloading numpy._globals is not allowed')
|
| 29 |
+
_is_loaded = True
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
class _NoValueType:
|
| 33 |
+
"""Special keyword value.
|
| 34 |
+
|
| 35 |
+
The instance of this class may be used as the default value assigned to a
|
| 36 |
+
keyword if no other obvious default (e.g., `None`) is suitable,
|
| 37 |
+
|
| 38 |
+
Common reasons for using this keyword are:
|
| 39 |
+
|
| 40 |
+
- A new keyword is added to a function, and that function forwards its
|
| 41 |
+
inputs to another function or method which can be defined outside of
|
| 42 |
+
NumPy. For example, ``np.std(x)`` calls ``x.std``, so when a ``keepdims``
|
| 43 |
+
keyword was added that could only be forwarded if the user explicitly
|
| 44 |
+
specified ``keepdims``; downstream array libraries may not have added
|
| 45 |
+
the same keyword, so adding ``x.std(..., keepdims=keepdims)``
|
| 46 |
+
unconditionally could have broken previously working code.
|
| 47 |
+
- A keyword is being deprecated, and a deprecation warning must only be
|
| 48 |
+
emitted when the keyword is used.
|
| 49 |
+
|
| 50 |
+
"""
|
| 51 |
+
__instance = None
|
| 52 |
+
def __new__(cls):
|
| 53 |
+
# ensure that only one instance exists
|
| 54 |
+
if not cls.__instance:
|
| 55 |
+
cls.__instance = super().__new__(cls)
|
| 56 |
+
return cls.__instance
|
| 57 |
+
|
| 58 |
+
def __repr__(self):
|
| 59 |
+
return "<no value>"
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
_NoValue = _NoValueType()
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
@_set_module("numpy")
|
| 66 |
+
class _CopyMode(enum.Enum):
|
| 67 |
+
"""
|
| 68 |
+
An enumeration for the copy modes supported
|
| 69 |
+
by numpy.copy() and numpy.array(). The following three modes are supported,
|
| 70 |
+
|
| 71 |
+
- ALWAYS: This means that a deep copy of the input
|
| 72 |
+
array will always be taken.
|
| 73 |
+
- IF_NEEDED: This means that a deep copy of the input
|
| 74 |
+
array will be taken only if necessary.
|
| 75 |
+
- NEVER: This means that the deep copy will never be taken.
|
| 76 |
+
If a copy cannot be avoided then a `ValueError` will be
|
| 77 |
+
raised.
|
| 78 |
+
|
| 79 |
+
Note that the buffer-protocol could in theory do copies. NumPy currently
|
| 80 |
+
assumes an object exporting the buffer protocol will never do this.
|
| 81 |
+
"""
|
| 82 |
+
|
| 83 |
+
ALWAYS = True
|
| 84 |
+
NEVER = False
|
| 85 |
+
IF_NEEDED = 2
|
| 86 |
+
|
| 87 |
+
def __bool__(self):
|
| 88 |
+
# For backwards compatibility
|
| 89 |
+
if self == _CopyMode.ALWAYS:
|
| 90 |
+
return True
|
| 91 |
+
|
| 92 |
+
if self == _CopyMode.NEVER:
|
| 93 |
+
return False
|
| 94 |
+
|
| 95 |
+
raise ValueError(f"{self} is neither True nor False.")
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_globals.pyi
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
__all__ = ["_CopyMode", "_NoValue"]
|
| 2 |
+
|
| 3 |
+
import enum
|
| 4 |
+
from typing import Final, final
|
| 5 |
+
|
| 6 |
+
@final
|
| 7 |
+
class _CopyMode(enum.Enum):
|
| 8 |
+
ALWAYS = True
|
| 9 |
+
NEVER = False
|
| 10 |
+
IF_NEEDED = 2
|
| 11 |
+
|
| 12 |
+
def __bool__(self, /) -> bool: ...
|
| 13 |
+
|
| 14 |
+
@final
|
| 15 |
+
class _NoValueType: ...
|
| 16 |
+
|
| 17 |
+
_NoValue: Final[_NoValueType] = ...
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_pyinstaller/__init__.py
ADDED
|
File without changes
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_pyinstaller/__init__.pyi
ADDED
|
File without changes
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_pyinstaller/hook-numpy.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""This hook should collect all binary files and any hidden modules that numpy
|
| 2 |
+
needs.
|
| 3 |
+
|
| 4 |
+
Our (some-what inadequate) docs for writing PyInstaller hooks are kept here:
|
| 5 |
+
https://pyinstaller.readthedocs.io/en/stable/hooks.html
|
| 6 |
+
|
| 7 |
+
"""
|
| 8 |
+
from PyInstaller.compat import is_conda, is_pure_conda
|
| 9 |
+
from PyInstaller.utils.hooks import collect_dynamic_libs, is_module_satisfies
|
| 10 |
+
|
| 11 |
+
# Collect all DLLs inside numpy's installation folder, dump them into built
|
| 12 |
+
# app's root.
|
| 13 |
+
binaries = collect_dynamic_libs("numpy", ".")
|
| 14 |
+
|
| 15 |
+
# If using Conda without any non-conda virtual environment manager:
|
| 16 |
+
if is_pure_conda:
|
| 17 |
+
# Assume running the NumPy from Conda-forge and collect it's DLLs from the
|
| 18 |
+
# communal Conda bin directory. DLLs from NumPy's dependencies must also be
|
| 19 |
+
# collected to capture MKL, OpenBlas, OpenMP, etc.
|
| 20 |
+
from PyInstaller.utils.hooks import conda_support
|
| 21 |
+
datas = conda_support.collect_dynamic_libs("numpy", dependencies=True)
|
| 22 |
+
|
| 23 |
+
# Submodules PyInstaller cannot detect. `_dtype_ctypes` is only imported
|
| 24 |
+
# from C and `_multiarray_tests` is used in tests (which are not packed).
|
| 25 |
+
hiddenimports = ['numpy._core._dtype_ctypes', 'numpy._core._multiarray_tests']
|
| 26 |
+
|
| 27 |
+
# Remove testing and building code and packages that are referenced throughout
|
| 28 |
+
# NumPy but are not really dependencies.
|
| 29 |
+
excludedimports = [
|
| 30 |
+
"scipy",
|
| 31 |
+
"pytest",
|
| 32 |
+
"f2py",
|
| 33 |
+
"setuptools",
|
| 34 |
+
"distutils",
|
| 35 |
+
"numpy.distutils",
|
| 36 |
+
]
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_pyinstaller/hook-numpy.pyi
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Final
|
| 2 |
+
|
| 3 |
+
# from `PyInstaller.compat`
|
| 4 |
+
is_conda: Final[bool]
|
| 5 |
+
is_pure_conda: Final[bool]
|
| 6 |
+
|
| 7 |
+
# from `PyInstaller.utils.hooks`
|
| 8 |
+
def is_module_satisfies(requirements: str, version: None = None, version_attr: None = None) -> bool: ...
|
| 9 |
+
|
| 10 |
+
binaries: Final[list[tuple[str, str]]]
|
| 11 |
+
|
| 12 |
+
hiddenimports: Final[list[str]]
|
| 13 |
+
excludedimports: Final[list[str]]
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_pyinstaller/tests/__init__.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from numpy.testing import IS_WASM, IS_EDITABLE
|
| 2 |
+
import pytest
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
if IS_WASM:
|
| 6 |
+
pytest.skip(
|
| 7 |
+
"WASM/Pyodide does not use or support Fortran",
|
| 8 |
+
allow_module_level=True
|
| 9 |
+
)
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
if IS_EDITABLE:
|
| 13 |
+
pytest.skip(
|
| 14 |
+
"Editable install doesn't support tests with a compile step",
|
| 15 |
+
allow_module_level=True
|
| 16 |
+
)
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_pyinstaller/tests/pyinstaller-smoke.py
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""A crude *bit of everything* smoke test to verify PyInstaller compatibility.
|
| 2 |
+
|
| 3 |
+
PyInstaller typically goes wrong by forgetting to package modules, extension
|
| 4 |
+
modules or shared libraries. This script should aim to touch as many of those
|
| 5 |
+
as possible in an attempt to trip a ModuleNotFoundError or a DLL load failure
|
| 6 |
+
due to an uncollected resource. Missing resources are unlikely to lead to
|
| 7 |
+
arithmetic errors so there's generally no need to verify any calculation's
|
| 8 |
+
output - merely that it made it to the end OK. This script should not
|
| 9 |
+
explicitly import any of numpy's submodules as that gives PyInstaller undue
|
| 10 |
+
hints that those submodules exist and should be collected (accessing implicitly
|
| 11 |
+
loaded submodules is OK).
|
| 12 |
+
|
| 13 |
+
"""
|
| 14 |
+
import numpy as np
|
| 15 |
+
|
| 16 |
+
a = np.arange(1., 10.).reshape((3, 3)) % 5
|
| 17 |
+
np.linalg.det(a)
|
| 18 |
+
a @ a
|
| 19 |
+
a @ a.T
|
| 20 |
+
np.linalg.inv(a)
|
| 21 |
+
np.sin(np.exp(a))
|
| 22 |
+
np.linalg.svd(a)
|
| 23 |
+
np.linalg.eigh(a)
|
| 24 |
+
|
| 25 |
+
np.unique(np.random.randint(0, 10, 100))
|
| 26 |
+
np.sort(np.random.uniform(0, 10, 100))
|
| 27 |
+
|
| 28 |
+
np.fft.fft(np.exp(2j * np.pi * np.arange(8) / 8))
|
| 29 |
+
np.ma.masked_array(np.arange(10), np.random.rand(10) < .5).sum()
|
| 30 |
+
np.polynomial.Legendre([7, 8, 9]).roots()
|
| 31 |
+
|
| 32 |
+
print("I made it!")
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_pyinstaller/tests/test_pyinstaller.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import subprocess
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
|
| 4 |
+
import pytest
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
# PyInstaller has been very unproactive about replacing 'imp' with 'importlib'.
|
| 8 |
+
@pytest.mark.filterwarnings('ignore::DeprecationWarning')
|
| 9 |
+
# It also leaks io.BytesIO()s.
|
| 10 |
+
@pytest.mark.filterwarnings('ignore::ResourceWarning')
|
| 11 |
+
@pytest.mark.parametrize("mode", ["--onedir", "--onefile"])
|
| 12 |
+
@pytest.mark.slow
|
| 13 |
+
def test_pyinstaller(mode, tmp_path):
|
| 14 |
+
"""Compile and run pyinstaller-smoke.py using PyInstaller."""
|
| 15 |
+
|
| 16 |
+
pyinstaller_cli = pytest.importorskip("PyInstaller.__main__").run
|
| 17 |
+
|
| 18 |
+
source = Path(__file__).with_name("pyinstaller-smoke.py").resolve()
|
| 19 |
+
args = [
|
| 20 |
+
# Place all generated files in ``tmp_path``.
|
| 21 |
+
'--workpath', str(tmp_path / "build"),
|
| 22 |
+
'--distpath', str(tmp_path / "dist"),
|
| 23 |
+
'--specpath', str(tmp_path),
|
| 24 |
+
mode,
|
| 25 |
+
str(source),
|
| 26 |
+
]
|
| 27 |
+
pyinstaller_cli(args)
|
| 28 |
+
|
| 29 |
+
if mode == "--onefile":
|
| 30 |
+
exe = tmp_path / "dist" / source.stem
|
| 31 |
+
else:
|
| 32 |
+
exe = tmp_path / "dist" / source.stem / source.stem
|
| 33 |
+
|
| 34 |
+
p = subprocess.run([str(exe)], check=True, stdout=subprocess.PIPE)
|
| 35 |
+
assert p.stdout.strip() == b"I made it!"
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_pytesttester.py
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Pytest test running.
|
| 3 |
+
|
| 4 |
+
This module implements the ``test()`` function for NumPy modules. The usual
|
| 5 |
+
boiler plate for doing that is to put the following in the module
|
| 6 |
+
``__init__.py`` file::
|
| 7 |
+
|
| 8 |
+
from numpy._pytesttester import PytestTester
|
| 9 |
+
test = PytestTester(__name__)
|
| 10 |
+
del PytestTester
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
Warnings filtering and other runtime settings should be dealt with in the
|
| 14 |
+
``pytest.ini`` file in the numpy repo root. The behavior of the test depends on
|
| 15 |
+
whether or not that file is found as follows:
|
| 16 |
+
|
| 17 |
+
* ``pytest.ini`` is present (develop mode)
|
| 18 |
+
All warnings except those explicitly filtered out are raised as error.
|
| 19 |
+
* ``pytest.ini`` is absent (release mode)
|
| 20 |
+
DeprecationWarnings and PendingDeprecationWarnings are ignored, other
|
| 21 |
+
warnings are passed through.
|
| 22 |
+
|
| 23 |
+
In practice, tests run from the numpy repo are run in development mode with
|
| 24 |
+
``spin``, through the standard ``spin test`` invocation or from an inplace
|
| 25 |
+
build with ``pytest numpy``.
|
| 26 |
+
|
| 27 |
+
This module is imported by every numpy subpackage, so lies at the top level to
|
| 28 |
+
simplify circular import issues. For the same reason, it contains no numpy
|
| 29 |
+
imports at module scope, instead importing numpy within function calls.
|
| 30 |
+
"""
|
| 31 |
+
import sys
|
| 32 |
+
import os
|
| 33 |
+
|
| 34 |
+
__all__ = ['PytestTester']
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
def _show_numpy_info():
|
| 38 |
+
import numpy as np
|
| 39 |
+
|
| 40 |
+
print("NumPy version %s" % np.__version__)
|
| 41 |
+
info = np.lib._utils_impl._opt_info()
|
| 42 |
+
print("NumPy CPU features: ", (info if info else 'nothing enabled'))
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
class PytestTester:
|
| 46 |
+
"""
|
| 47 |
+
Pytest test runner.
|
| 48 |
+
|
| 49 |
+
A test function is typically added to a package's __init__.py like so::
|
| 50 |
+
|
| 51 |
+
from numpy._pytesttester import PytestTester
|
| 52 |
+
test = PytestTester(__name__).test
|
| 53 |
+
del PytestTester
|
| 54 |
+
|
| 55 |
+
Calling this test function finds and runs all tests associated with the
|
| 56 |
+
module and all its sub-modules.
|
| 57 |
+
|
| 58 |
+
Attributes
|
| 59 |
+
----------
|
| 60 |
+
module_name : str
|
| 61 |
+
Full path to the package to test.
|
| 62 |
+
|
| 63 |
+
Parameters
|
| 64 |
+
----------
|
| 65 |
+
module_name : module name
|
| 66 |
+
The name of the module to test.
|
| 67 |
+
|
| 68 |
+
Notes
|
| 69 |
+
-----
|
| 70 |
+
Unlike the previous ``nose``-based implementation, this class is not
|
| 71 |
+
publicly exposed as it performs some ``numpy``-specific warning
|
| 72 |
+
suppression.
|
| 73 |
+
|
| 74 |
+
"""
|
| 75 |
+
def __init__(self, module_name):
|
| 76 |
+
self.module_name = module_name
|
| 77 |
+
self.__module__ = module_name
|
| 78 |
+
|
| 79 |
+
def __call__(self, label='fast', verbose=1, extra_argv=None,
|
| 80 |
+
doctests=False, coverage=False, durations=-1, tests=None):
|
| 81 |
+
"""
|
| 82 |
+
Run tests for module using pytest.
|
| 83 |
+
|
| 84 |
+
Parameters
|
| 85 |
+
----------
|
| 86 |
+
label : {'fast', 'full'}, optional
|
| 87 |
+
Identifies the tests to run. When set to 'fast', tests decorated
|
| 88 |
+
with `pytest.mark.slow` are skipped, when 'full', the slow marker
|
| 89 |
+
is ignored.
|
| 90 |
+
verbose : int, optional
|
| 91 |
+
Verbosity value for test outputs, in the range 1-3. Default is 1.
|
| 92 |
+
extra_argv : list, optional
|
| 93 |
+
List with any extra arguments to pass to pytests.
|
| 94 |
+
doctests : bool, optional
|
| 95 |
+
.. note:: Not supported
|
| 96 |
+
coverage : bool, optional
|
| 97 |
+
If True, report coverage of NumPy code. Default is False.
|
| 98 |
+
Requires installation of (pip) pytest-cov.
|
| 99 |
+
durations : int, optional
|
| 100 |
+
If < 0, do nothing, If 0, report time of all tests, if > 0,
|
| 101 |
+
report the time of the slowest `timer` tests. Default is -1.
|
| 102 |
+
tests : test or list of tests
|
| 103 |
+
Tests to be executed with pytest '--pyargs'
|
| 104 |
+
|
| 105 |
+
Returns
|
| 106 |
+
-------
|
| 107 |
+
result : bool
|
| 108 |
+
Return True on success, false otherwise.
|
| 109 |
+
|
| 110 |
+
Notes
|
| 111 |
+
-----
|
| 112 |
+
Each NumPy module exposes `test` in its namespace to run all tests for
|
| 113 |
+
it. For example, to run all tests for numpy.lib:
|
| 114 |
+
|
| 115 |
+
>>> np.lib.test() #doctest: +SKIP
|
| 116 |
+
|
| 117 |
+
Examples
|
| 118 |
+
--------
|
| 119 |
+
>>> result = np.lib.test() #doctest: +SKIP
|
| 120 |
+
...
|
| 121 |
+
1023 passed, 2 skipped, 6 deselected, 1 xfailed in 10.39 seconds
|
| 122 |
+
>>> result
|
| 123 |
+
True
|
| 124 |
+
|
| 125 |
+
"""
|
| 126 |
+
import pytest
|
| 127 |
+
import warnings
|
| 128 |
+
|
| 129 |
+
module = sys.modules[self.module_name]
|
| 130 |
+
module_path = os.path.abspath(module.__path__[0])
|
| 131 |
+
|
| 132 |
+
# setup the pytest arguments
|
| 133 |
+
pytest_args = ["-l"]
|
| 134 |
+
|
| 135 |
+
# offset verbosity. The "-q" cancels a "-v".
|
| 136 |
+
pytest_args += ["-q"]
|
| 137 |
+
|
| 138 |
+
if sys.version_info < (3, 12):
|
| 139 |
+
with warnings.catch_warnings():
|
| 140 |
+
warnings.simplefilter("always")
|
| 141 |
+
# Filter out distutils cpu warnings (could be localized to
|
| 142 |
+
# distutils tests). ASV has problems with top level import,
|
| 143 |
+
# so fetch module for suppression here.
|
| 144 |
+
from numpy.distutils import cpuinfo
|
| 145 |
+
|
| 146 |
+
# Filter out annoying import messages. Want these in both develop and
|
| 147 |
+
# release mode.
|
| 148 |
+
pytest_args += [
|
| 149 |
+
"-W ignore:Not importing directory",
|
| 150 |
+
"-W ignore:numpy.dtype size changed",
|
| 151 |
+
"-W ignore:numpy.ufunc size changed",
|
| 152 |
+
"-W ignore::UserWarning:cpuinfo",
|
| 153 |
+
]
|
| 154 |
+
|
| 155 |
+
# When testing matrices, ignore their PendingDeprecationWarnings
|
| 156 |
+
pytest_args += [
|
| 157 |
+
"-W ignore:the matrix subclass is not",
|
| 158 |
+
"-W ignore:Importing from numpy.matlib is",
|
| 159 |
+
]
|
| 160 |
+
|
| 161 |
+
if doctests:
|
| 162 |
+
pytest_args += ["--doctest-modules"]
|
| 163 |
+
|
| 164 |
+
if extra_argv:
|
| 165 |
+
pytest_args += list(extra_argv)
|
| 166 |
+
|
| 167 |
+
if verbose > 1:
|
| 168 |
+
pytest_args += ["-" + "v"*(verbose - 1)]
|
| 169 |
+
|
| 170 |
+
if coverage:
|
| 171 |
+
pytest_args += ["--cov=" + module_path]
|
| 172 |
+
|
| 173 |
+
if label == "fast":
|
| 174 |
+
# not importing at the top level to avoid circular import of module
|
| 175 |
+
from numpy.testing import IS_PYPY
|
| 176 |
+
if IS_PYPY:
|
| 177 |
+
pytest_args += ["-m", "not slow and not slow_pypy"]
|
| 178 |
+
else:
|
| 179 |
+
pytest_args += ["-m", "not slow"]
|
| 180 |
+
|
| 181 |
+
elif label != "full":
|
| 182 |
+
pytest_args += ["-m", label]
|
| 183 |
+
|
| 184 |
+
if durations >= 0:
|
| 185 |
+
pytest_args += ["--durations=%s" % durations]
|
| 186 |
+
|
| 187 |
+
if tests is None:
|
| 188 |
+
tests = [self.module_name]
|
| 189 |
+
|
| 190 |
+
pytest_args += ["--pyargs"] + list(tests)
|
| 191 |
+
|
| 192 |
+
# run tests.
|
| 193 |
+
_show_numpy_info()
|
| 194 |
+
|
| 195 |
+
try:
|
| 196 |
+
code = pytest.main(pytest_args)
|
| 197 |
+
except SystemExit as exc:
|
| 198 |
+
code = exc.code
|
| 199 |
+
|
| 200 |
+
return code == 0
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_pytesttester.pyi
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from collections.abc import Iterable
|
| 2 |
+
from typing import Literal as L
|
| 3 |
+
|
| 4 |
+
__all__ = ["PytestTester"]
|
| 5 |
+
|
| 6 |
+
class PytestTester:
|
| 7 |
+
module_name: str
|
| 8 |
+
def __init__(self, module_name: str) -> None: ...
|
| 9 |
+
def __call__(
|
| 10 |
+
self,
|
| 11 |
+
label: L["fast", "full"] = ...,
|
| 12 |
+
verbose: int = ...,
|
| 13 |
+
extra_argv: None | Iterable[str] = ...,
|
| 14 |
+
doctests: L[False] = ...,
|
| 15 |
+
coverage: bool = ...,
|
| 16 |
+
durations: int = ...,
|
| 17 |
+
tests: None | Iterable[str] = ...,
|
| 18 |
+
) -> bool: ...
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_typing/__init__.py
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Private counterpart of ``numpy.typing``."""
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from ._nested_sequence import (
|
| 6 |
+
_NestedSequence as _NestedSequence,
|
| 7 |
+
)
|
| 8 |
+
from ._nbit_base import (
|
| 9 |
+
NBitBase as NBitBase,
|
| 10 |
+
_8Bit as _8Bit,
|
| 11 |
+
_16Bit as _16Bit,
|
| 12 |
+
_32Bit as _32Bit,
|
| 13 |
+
_64Bit as _64Bit,
|
| 14 |
+
_80Bit as _80Bit,
|
| 15 |
+
_96Bit as _96Bit,
|
| 16 |
+
_128Bit as _128Bit,
|
| 17 |
+
_256Bit as _256Bit,
|
| 18 |
+
)
|
| 19 |
+
from ._nbit import (
|
| 20 |
+
_NBitByte as _NBitByte,
|
| 21 |
+
_NBitShort as _NBitShort,
|
| 22 |
+
_NBitIntC as _NBitIntC,
|
| 23 |
+
_NBitIntP as _NBitIntP,
|
| 24 |
+
_NBitInt as _NBitInt,
|
| 25 |
+
_NBitLong as _NBitLong,
|
| 26 |
+
_NBitLongLong as _NBitLongLong,
|
| 27 |
+
_NBitHalf as _NBitHalf,
|
| 28 |
+
_NBitSingle as _NBitSingle,
|
| 29 |
+
_NBitDouble as _NBitDouble,
|
| 30 |
+
_NBitLongDouble as _NBitLongDouble,
|
| 31 |
+
)
|
| 32 |
+
from ._char_codes import (
|
| 33 |
+
_BoolCodes as _BoolCodes,
|
| 34 |
+
_UInt8Codes as _UInt8Codes,
|
| 35 |
+
_UInt16Codes as _UInt16Codes,
|
| 36 |
+
_UInt32Codes as _UInt32Codes,
|
| 37 |
+
_UInt64Codes as _UInt64Codes,
|
| 38 |
+
_Int8Codes as _Int8Codes,
|
| 39 |
+
_Int16Codes as _Int16Codes,
|
| 40 |
+
_Int32Codes as _Int32Codes,
|
| 41 |
+
_Int64Codes as _Int64Codes,
|
| 42 |
+
_Float16Codes as _Float16Codes,
|
| 43 |
+
_Float32Codes as _Float32Codes,
|
| 44 |
+
_Float64Codes as _Float64Codes,
|
| 45 |
+
_Complex64Codes as _Complex64Codes,
|
| 46 |
+
_Complex128Codes as _Complex128Codes,
|
| 47 |
+
_ByteCodes as _ByteCodes,
|
| 48 |
+
_ShortCodes as _ShortCodes,
|
| 49 |
+
_IntCCodes as _IntCCodes,
|
| 50 |
+
_IntPCodes as _IntPCodes,
|
| 51 |
+
_IntCodes as _IntCodes,
|
| 52 |
+
_LongCodes as _LongCodes,
|
| 53 |
+
_LongLongCodes as _LongLongCodes,
|
| 54 |
+
_UByteCodes as _UByteCodes,
|
| 55 |
+
_UShortCodes as _UShortCodes,
|
| 56 |
+
_UIntCCodes as _UIntCCodes,
|
| 57 |
+
_UIntPCodes as _UIntPCodes,
|
| 58 |
+
_UIntCodes as _UIntCodes,
|
| 59 |
+
_ULongCodes as _ULongCodes,
|
| 60 |
+
_ULongLongCodes as _ULongLongCodes,
|
| 61 |
+
_HalfCodes as _HalfCodes,
|
| 62 |
+
_SingleCodes as _SingleCodes,
|
| 63 |
+
_DoubleCodes as _DoubleCodes,
|
| 64 |
+
_LongDoubleCodes as _LongDoubleCodes,
|
| 65 |
+
_CSingleCodes as _CSingleCodes,
|
| 66 |
+
_CDoubleCodes as _CDoubleCodes,
|
| 67 |
+
_CLongDoubleCodes as _CLongDoubleCodes,
|
| 68 |
+
_DT64Codes as _DT64Codes,
|
| 69 |
+
_TD64Codes as _TD64Codes,
|
| 70 |
+
_StrCodes as _StrCodes,
|
| 71 |
+
_BytesCodes as _BytesCodes,
|
| 72 |
+
_VoidCodes as _VoidCodes,
|
| 73 |
+
_ObjectCodes as _ObjectCodes,
|
| 74 |
+
_StringCodes as _StringCodes,
|
| 75 |
+
_UnsignedIntegerCodes as _UnsignedIntegerCodes,
|
| 76 |
+
_SignedIntegerCodes as _SignedIntegerCodes,
|
| 77 |
+
_IntegerCodes as _IntegerCodes,
|
| 78 |
+
_FloatingCodes as _FloatingCodes,
|
| 79 |
+
_ComplexFloatingCodes as _ComplexFloatingCodes,
|
| 80 |
+
_InexactCodes as _InexactCodes,
|
| 81 |
+
_NumberCodes as _NumberCodes,
|
| 82 |
+
_CharacterCodes as _CharacterCodes,
|
| 83 |
+
_FlexibleCodes as _FlexibleCodes,
|
| 84 |
+
_GenericCodes as _GenericCodes,
|
| 85 |
+
)
|
| 86 |
+
from ._scalars import (
|
| 87 |
+
_CharLike_co as _CharLike_co,
|
| 88 |
+
_BoolLike_co as _BoolLike_co,
|
| 89 |
+
_UIntLike_co as _UIntLike_co,
|
| 90 |
+
_IntLike_co as _IntLike_co,
|
| 91 |
+
_FloatLike_co as _FloatLike_co,
|
| 92 |
+
_ComplexLike_co as _ComplexLike_co,
|
| 93 |
+
_TD64Like_co as _TD64Like_co,
|
| 94 |
+
_NumberLike_co as _NumberLike_co,
|
| 95 |
+
_ScalarLike_co as _ScalarLike_co,
|
| 96 |
+
_VoidLike_co as _VoidLike_co,
|
| 97 |
+
)
|
| 98 |
+
from ._shape import (
|
| 99 |
+
_Shape as _Shape,
|
| 100 |
+
_ShapeLike as _ShapeLike,
|
| 101 |
+
)
|
| 102 |
+
from ._dtype_like import (
|
| 103 |
+
DTypeLike as DTypeLike,
|
| 104 |
+
_DTypeLike as _DTypeLike,
|
| 105 |
+
_SupportsDType as _SupportsDType,
|
| 106 |
+
_VoidDTypeLike as _VoidDTypeLike,
|
| 107 |
+
_DTypeLikeBool as _DTypeLikeBool,
|
| 108 |
+
_DTypeLikeUInt as _DTypeLikeUInt,
|
| 109 |
+
_DTypeLikeInt as _DTypeLikeInt,
|
| 110 |
+
_DTypeLikeFloat as _DTypeLikeFloat,
|
| 111 |
+
_DTypeLikeComplex as _DTypeLikeComplex,
|
| 112 |
+
_DTypeLikeTD64 as _DTypeLikeTD64,
|
| 113 |
+
_DTypeLikeDT64 as _DTypeLikeDT64,
|
| 114 |
+
_DTypeLikeObject as _DTypeLikeObject,
|
| 115 |
+
_DTypeLikeVoid as _DTypeLikeVoid,
|
| 116 |
+
_DTypeLikeStr as _DTypeLikeStr,
|
| 117 |
+
_DTypeLikeBytes as _DTypeLikeBytes,
|
| 118 |
+
_DTypeLikeComplex_co as _DTypeLikeComplex_co,
|
| 119 |
+
)
|
| 120 |
+
from ._array_like import (
|
| 121 |
+
NDArray as NDArray,
|
| 122 |
+
ArrayLike as ArrayLike,
|
| 123 |
+
_ArrayLike as _ArrayLike,
|
| 124 |
+
_ArrayLikeInt as _ArrayLikeInt,
|
| 125 |
+
_ArrayLikeBool_co as _ArrayLikeBool_co,
|
| 126 |
+
_ArrayLikeUInt_co as _ArrayLikeUInt_co,
|
| 127 |
+
_ArrayLikeInt_co as _ArrayLikeInt_co,
|
| 128 |
+
_ArrayLikeFloat_co as _ArrayLikeFloat_co,
|
| 129 |
+
_ArrayLikeFloat64_co as _ArrayLikeFloat64_co,
|
| 130 |
+
_ArrayLikeComplex_co as _ArrayLikeComplex_co,
|
| 131 |
+
_ArrayLikeComplex128_co as _ArrayLikeComplex128_co,
|
| 132 |
+
_ArrayLikeNumber_co as _ArrayLikeNumber_co,
|
| 133 |
+
_ArrayLikeTD64_co as _ArrayLikeTD64_co,
|
| 134 |
+
_ArrayLikeDT64_co as _ArrayLikeDT64_co,
|
| 135 |
+
_ArrayLikeObject_co as _ArrayLikeObject_co,
|
| 136 |
+
_ArrayLikeVoid_co as _ArrayLikeVoid_co,
|
| 137 |
+
_ArrayLikeStr_co as _ArrayLikeStr_co,
|
| 138 |
+
_ArrayLikeBytes_co as _ArrayLikeBytes_co,
|
| 139 |
+
_ArrayLikeString_co as _ArrayLikeString_co,
|
| 140 |
+
_ArrayLikeAnyString_co as _ArrayLikeAnyString_co,
|
| 141 |
+
_ArrayLikeUnknown as _ArrayLikeUnknown,
|
| 142 |
+
_FiniteNestedSequence as _FiniteNestedSequence,
|
| 143 |
+
_SupportsArray as _SupportsArray,
|
| 144 |
+
_SupportsArrayFunc as _SupportsArrayFunc,
|
| 145 |
+
_UnknownType as _UnknownType,
|
| 146 |
+
)
|
| 147 |
+
|
| 148 |
+
from ._ufunc import (
|
| 149 |
+
_UFunc_Nin1_Nout1 as _UFunc_Nin1_Nout1,
|
| 150 |
+
_UFunc_Nin2_Nout1 as _UFunc_Nin2_Nout1,
|
| 151 |
+
_UFunc_Nin1_Nout2 as _UFunc_Nin1_Nout2,
|
| 152 |
+
_UFunc_Nin2_Nout2 as _UFunc_Nin2_Nout2,
|
| 153 |
+
_GUFunc_Nin2_Nout1 as _GUFunc_Nin2_Nout1,
|
| 154 |
+
)
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_typing/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (3.7 kB). View file
|
|
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_typing/__pycache__/_add_docstring.cpython-310.pyc
ADDED
|
Binary file (3.94 kB). View file
|
|
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_typing/__pycache__/_array_like.cpython-310.pyc
ADDED
|
Binary file (4.52 kB). View file
|
|
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_typing/__pycache__/_char_codes.cpython-310.pyc
ADDED
|
Binary file (6.49 kB). View file
|
|
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_typing/__pycache__/_dtype_like.cpython-310.pyc
ADDED
|
Binary file (4.24 kB). View file
|
|
|
Scripts_Climate_to_LAI/.venv/lib/python3.10/site-packages/numpy/_typing/__pycache__/_nbit.cpython-310.pyc
ADDED
|
Binary file (872 Bytes). View file
|
|
|