From 2a38369893e9cc498e31c8d3f17f2b60525927f9 Mon Sep 17 00:00:00 2001 From: scaramallion Date: Fri, 25 Oct 2024 15:59:01 +1100 Subject: [PATCH] Fix endianness when decoding on big endian systems (#72) --- .github/workflows/pytest-builds.yml | 8 +- .github/workflows/release-wheels.yml | 137 +-- build.py | 10 + docs/changes/v2.1.0.rst | 13 + docs/changes/v2.2.0.rst | 6 + docs/changes/v2.3.0.rst | 7 + lib/interface/decode.cpp | 8 +- lib/interface/streamhook.cpp | 21 +- libjpeg/_libjpeg.cpp | 1311 +++++++++++++------------- libjpeg/tests/test_decode.py | 20 +- libjpeg/tests/test_handler.py | 69 +- libjpeg/utils.py | 2 +- pyproject.toml | 10 +- 13 files changed, 854 insertions(+), 768 deletions(-) create mode 100644 docs/changes/v2.1.0.rst create mode 100644 docs/changes/v2.2.0.rst create mode 100644 docs/changes/v2.3.0.rst diff --git a/.github/workflows/pytest-builds.yml b/.github/workflows/pytest-builds.yml index 7328179..5f6948c 100644 --- a/.github/workflows/pytest-builds.yml +++ b/.github/workflows/pytest-builds.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13'] arch: ['x64', 'x86'] steps: @@ -50,7 +50,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 @@ -86,7 +86,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 @@ -117,7 +117,7 @@ jobs: pytest --cov=libjpeg --cov-append libjpeg/tests - name: Switch to pydicom dev and rerun pytest - if: ${{ contains('3.10 3.11 3.12', matrix.python-version) }} + if: ${{ contains('3.10 3.11 3.12 3.13', matrix.python-version) }} run: | pip uninstall -y pydicom pip install git+https://github.com/pydicom/pydicom diff --git a/.github/workflows/release-wheels.yml b/.github/workflows/release-wheels.yml index 9760f13..1845a81 100644 --- a/.github/workflows/release-wheels.yml +++ b/.github/workflows/release-wheels.yml @@ -42,9 +42,6 @@ jobs: matrix: include: # Windows 32 bit - - os: windows-latest - python: 38 - platform_id: win32 - os: windows-latest python: 39 platform_id: win32 @@ -57,11 +54,11 @@ jobs: - os: windows-latest python: 312 platform_id: win32 + - os: windows-latest + python: 313 + platform_id: win32 # Windows 64 bit - - os: windows-latest - python: 38 - platform_id: win_amd64 - os: windows-latest python: 39 platform_id: win_amd64 @@ -74,12 +71,11 @@ jobs: - os: windows-latest python: 312 platform_id: win_amd64 + - os: windows-latest + python: 313 + platform_id: win_amd64 # Linux 64 bit manylinux2014 - - os: ubuntu-latest - python: 38 - platform_id: manylinux_x86_64 - manylinux_image: manylinux2014 - os: ubuntu-latest python: 39 platform_id: manylinux_x86_64 @@ -96,11 +92,12 @@ jobs: python: 312 platform_id: manylinux_x86_64 manylinux_image: manylinux2014 + - os: ubuntu-latest + python: 313 + platform_id: manylinux_x86_64 + manylinux_image: manylinux2014 # Linux aarch64 - - os: ubuntu-latest - python: 38 - platform_id: manylinux_aarch64 - os: ubuntu-latest python: 39 platform_id: manylinux_aarch64 @@ -113,11 +110,11 @@ jobs: - os: ubuntu-latest python: 312 platform_id: manylinux_aarch64 + - os: ubuntu-latest + python: 313 + platform_id: manylinux_aarch64 # MacOS x86_64 - - os: macos-12 - python: 38 - platform_id: macosx_x86_64 - os: macos-12 python: 39 platform_id: macosx_x86_64 @@ -130,6 +127,9 @@ jobs: - os: macos-12 python: 312 platform_id: macosx_x86_64 + - os: macos-12 + python: 313 + platform_id: macosx_x86_64 steps: - uses: actions/checkout@v4 @@ -178,9 +178,6 @@ jobs: matrix: include: # MacOS arm64 - - os: macos-14 - python: 38 - platform_id: macosx_arm64 - os: macos-14 python: 39 platform_id: macosx_arm64 @@ -193,6 +190,9 @@ jobs: - os: macos-14 python: 312 platform_id: macosx_arm64 + - os: macos-14 + python: 313 + platform_id: macosx_arm64 steps: - uses: actions/checkout@v4 @@ -222,61 +222,62 @@ jobs: path: ./dist/*.whl - test-package: - name: Test built package - needs: [ build-wheels, build-sdist, build-wheels-macos-arm64 ] - runs-on: ubuntu-latest - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] - - steps: - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Download the wheels - uses: actions/download-artifact@v4 - with: - path: dist/ - merge-multiple: true - - - name: Install from package wheels and test - # If testing wheel builds might need --pre to install dev version - run: | - python -m venv testwhl - source testwhl/bin/activate - python -m pip install -U pip - python -m pip install pytest pydicom pylibjpeg - python -m pip uninstall -y pylibjpeg-libjpeg - python -m pip uninstall -y pylibjpeg-openjpeg - python -m pip install git+https://github.com/pydicom/pylibjpeg-data - python -m pip install -U --pre --find-links dist/ pylibjpeg-libjpeg - python -m pytest --pyargs libjpeg.tests - deactivate - - - name: Install from package tarball and test - run: | - python -m venv testsrc - source testsrc/bin/activate - python -m pip install -U pip - python -m pip install pytest pydicom pylibjpeg - python -m pip uninstall -y pylibjpeg-libjpeg - python -m pip uninstall -y pylibjpeg-openjpeg - python -m pip install git+https://github.com/pydicom/pylibjpeg-data - python -m pip install -U dist/pylibjpeg*libjpeg-*.tar.gz - python -m pytest --pyargs libjpeg.tests - deactivate + # test-package: + # name: Test built package + # needs: [ build-wheels, build-sdist, build-wheels-macos-arm64 ] + # runs-on: ubuntu-latest + # timeout-minutes: 30 + # strategy: + # fail-fast: false + # matrix: + # python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] + # + # steps: + # - name: Set up Python ${{ matrix.python-version }} + # uses: actions/setup-python@v5 + # with: + # python-version: ${{ matrix.python-version }} + # + # - name: Download the wheels + # uses: actions/download-artifact@v4 + # with: + # path: dist/ + # merge-multiple: true + # + # - name: Install from package wheels and test + # # If testing wheel builds might need --pre to install dev version + # run: | + # python -m venv testwhl + # source testwhl/bin/activate + # python -m pip install -U pip + # python -m pip install pytest pydicom pylibjpeg + # python -m pip uninstall -y pylibjpeg-libjpeg + # python -m pip uninstall -y pylibjpeg-openjpeg + # python -m pip install git+https://github.com/pydicom/pylibjpeg-data + # python -m pip install -U --pre --find-links dist/ pylibjpeg-libjpeg + # python -m pytest --pyargs libjpeg.tests + # deactivate + # + # - name: Install from package tarball and test + # run: | + # python -m venv testsrc + # source testsrc/bin/activate + # python -m pip install -U pip + # python -m pip install pytest pydicom pylibjpeg + # python -m pip uninstall -y pylibjpeg-libjpeg + # python -m pip uninstall -y pylibjpeg-openjpeg + # python -m pip install git+https://github.com/pydicom/pylibjpeg-data + # python -m pip install -U dist/pylibjpeg*libjpeg-*.tar.gz + # python -m pytest --pyargs libjpeg.tests + # deactivate # The pypi upload fails with non-linux containers, so grab the uploaded # artifacts and run using those # See: https://github.com/pypa/gh-action-pypi-publish/discussions/15 deploy: name: Upload wheels to PyPI - needs: [ test-package ] + # needs: [ test-package ] + needs: [ build-wheels, build-sdist, build-wheels-macos-arm64 ] runs-on: ubuntu-latest environment: name: pypi diff --git a/build.py b/build.py index 655624e..d1be493 100644 --- a/build.py +++ b/build.py @@ -3,6 +3,7 @@ from pathlib import Path import platform import shutil +from struct import unpack import subprocess import sys from typing import Any, List, Dict @@ -33,9 +34,17 @@ def build(setup_kwargs: Any) -> Any: # Skip configuration if running with `sdist` if 'sdist' not in sys.argv: opts = get_gcc_args() + if sys.byteorder == "big": + if "-mfpmath=387" in opts["ADDOPTS"]: + opts["ADDOPTS"].remove("-mfpmath=387") + extra_compile_args += opts['ADDOPTS'] extra_link_args += opts['EXTRA_LIBS'] + macros = [("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")] + if unpack("h", b"\x00\x01")[0] == 1: + macros.append(("JPG_BIG_ENDIAN", "1")) + ext = Extension( '_libjpeg', [os.fspath(p) for p in get_source_files()], @@ -47,6 +56,7 @@ def build(setup_kwargs: Any) -> Any: ], extra_compile_args=extra_compile_args, extra_link_args=extra_link_args, + define_macros=macros, ) ext_modules = cythonize( diff --git a/docs/changes/v2.1.0.rst b/docs/changes/v2.1.0.rst new file mode 100644 index 0000000..652a7d7 --- /dev/null +++ b/docs/changes/v2.1.0.rst @@ -0,0 +1,13 @@ +.. _v2.1.0: + +2.1.0 +===== + +* Use ``libjpeg`` v1.67 +* Fixed a decoding failure for JPEG 10918 file with an Adobe v101 APP14 marker + +2.1.1 +===== + +* Updated dependencies to allow NumPy > 2.0 +* Tests updated to use ``pydicom.pixels`` diff --git a/docs/changes/v2.2.0.rst b/docs/changes/v2.2.0.rst new file mode 100644 index 0000000..440b475 --- /dev/null +++ b/docs/changes/v2.2.0.rst @@ -0,0 +1,6 @@ +.. _v2.2.0: + +2.2.0 +===== + +* Support NumPy > 2.0 with Python 3.9+ diff --git a/docs/changes/v2.3.0.rst b/docs/changes/v2.3.0.rst new file mode 100644 index 0000000..6e4c4f7 --- /dev/null +++ b/docs/changes/v2.3.0.rst @@ -0,0 +1,7 @@ +.. _v2.3.0: + +2.3.0 +===== + +* Supported Python versions are 3.9 to 3.13 +* Added support for decoding on big endian systems diff --git a/lib/interface/decode.cpp b/lib/interface/decode.cpp index c71b9e9..43f902b 100644 --- a/lib/interface/decode.cpp +++ b/lib/interface/decode.cpp @@ -30,11 +30,11 @@ std::string Decode( Parameters ---------- char *inArray - Pointer to the first element of a numpy.ndarray containing the JPEG - data to be decompressed. + Pointer to the first element of a bytearray or numpy.ndarray containing the + JPEG data to be decompressed. char *outArray - Pointer to the first element of a numpy.ndarray where the decompressed - JPEG data should be written. + Pointer to the first element of bytearray or numpy.ndarray where the + decompressed JPEG data should be written. int inLength Length of the input array int outLength diff --git a/lib/interface/streamhook.cpp b/lib/interface/streamhook.cpp index 9f993e8..ed59c24 100644 --- a/lib/interface/streamhook.cpp +++ b/lib/interface/streamhook.cpp @@ -88,7 +88,7 @@ JPG_LONG OStreamHook(struct JPG_Hook *hook, struct JPG_TagItem *tags) static ULONG OpenComponents = 0; struct StreamMemory *omm = (struct StreamMemory *)(hook->hk_pData); struct StreamData *out = (struct StreamData *)(omm->omm_pTarget); - // Pointer to the output numpy array, currently at offset out->position + // Pointer to the output bytearray/numpy array, currently at offset out->position char *oArray = (char *)(out->pData); UWORD comp = tags->GetTagData(JPGTAG_BIO_COMPONENT); @@ -323,11 +323,24 @@ JPG_LONG OStreamHook(struct JPG_Hook *hook, struct JPG_TagItem *tags) } } else { // DICOM should always be integer input - // Write pixel data to target - ULONG size = omm->omm_ucPixelType & CTYP_SIZE_MASK; + // Need to byte swap if on a big endian system + #ifdef JPG_BIG_ENDIAN + if (omm->omm_ucPixelType == CTYP_UWORD) { + ULONG count = width * height * omm->omm_usDepth; + UWORD *data = (UWORD *)omm->omm_pMemPtr; + + do { + *data = (*data >> 8) | ((*data & 0xff) << 8); + data++; + } while(--count); + } + #endif + + // Write the decoded data to the output + // For each pixel ULONG count = width * height * omm->omm_usDepth; + ULONG size = omm->omm_ucPixelType & CTYP_SIZE_MASK; UBYTE *mem = (UBYTE *)(omm->omm_pMemPtr); - // For each pixel for (ULONG ii = 1; ii <= count; ii++) { // For each byte of the pixel for (ULONG jj = 1; jj <= size; jj++) { diff --git a/libjpeg/_libjpeg.cpp b/libjpeg/_libjpeg.cpp index b5a97b6..49ab9a8 100644 --- a/libjpeg/_libjpeg.cpp +++ b/libjpeg/_libjpeg.cpp @@ -1,15 +1,21 @@ -/* Generated by Cython 3.0.10 */ +/* Generated by Cython 3.0.11 */ /* BEGIN: Cython Metadata { "distutils": { + "define_macros": [ + [ + "NPY_NO_DEPRECATED_API", + "NPY_1_7_API_VERSION" + ] + ], "depends": [ "/home/dean/Coding/src/pylibjpeg-libjpeg/lib/interface/decode.hpp", - "/tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayobject.h", - "/tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayscalars.h", - "/tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarrayobject.h", - "/tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarraytypes.h", - "/tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/ufuncobject.h" + "/tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayobject.h", + "/tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayscalars.h", + "/tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarrayobject.h", + "/tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarraytypes.h", + "/tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/ufuncobject.h" ], "extra_compile_args": [ "-DUSE_AUTOCONF", @@ -21,7 +27,7 @@ "include_dirs": [ "/home/dean/Coding/src/pylibjpeg-libjpeg/lib/libjpeg", "/home/dean/Coding/src/pylibjpeg-libjpeg/lib/interface", - "/tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/_core/include" + "/tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/_core/include" ], "language": "c++", "name": "_libjpeg", @@ -200,10 +206,10 @@ END: Cython Metadata */ #else #define __PYX_EXTRA_ABI_MODULE_NAME "" #endif -#define CYTHON_ABI "3_0_10" __PYX_EXTRA_ABI_MODULE_NAME +#define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." -#define CYTHON_HEX_VERSION 0x03000AF0 +#define CYTHON_HEX_VERSION 0x03000BF0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof @@ -1706,7 +1712,7 @@ static const char *__pyx_f[] = { /* #### Code section: numeric_typedefs ### */ -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":770 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":769 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< @@ -1715,7 +1721,7 @@ static const char *__pyx_f[] = { */ typedef npy_int8 __pyx_t_5numpy_int8_t; -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":771 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":770 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< @@ -1724,7 +1730,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; */ typedef npy_int16 __pyx_t_5numpy_int16_t; -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":772 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":771 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< @@ -1733,7 +1739,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; */ typedef npy_int32 __pyx_t_5numpy_int32_t; -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":773 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":772 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< @@ -1742,7 +1748,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; */ typedef npy_int64 __pyx_t_5numpy_int64_t; -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":777 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":776 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< @@ -1751,7 +1757,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":778 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":777 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< @@ -1760,7 +1766,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":779 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":778 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< @@ -1769,7 +1775,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":780 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":779 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< @@ -1778,7 +1784,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":784 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":783 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< @@ -1787,7 +1793,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; */ typedef npy_float32 __pyx_t_5numpy_float32_t; -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":785 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":784 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< @@ -1796,7 +1802,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; */ typedef npy_float64 __pyx_t_5numpy_float64_t; -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":792 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":791 * ctypedef double complex complex128_t * * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< @@ -1805,7 +1811,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; */ typedef npy_longlong __pyx_t_5numpy_longlong_t; -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":793 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":792 * * ctypedef npy_longlong longlong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< @@ -1814,7 +1820,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":795 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":794 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< @@ -1823,7 +1829,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; */ typedef npy_intp __pyx_t_5numpy_intp_t; -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":796 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":795 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< @@ -1832,7 +1838,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; */ typedef npy_uintp __pyx_t_5numpy_uintp_t; -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":798 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":797 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< @@ -1841,7 +1847,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; */ typedef npy_double __pyx_t_5numpy_float_t; -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":799 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":798 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< @@ -1850,7 +1856,7 @@ typedef npy_double __pyx_t_5numpy_float_t; */ typedef npy_double __pyx_t_5numpy_double_t; -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":800 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":799 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< @@ -1899,7 +1905,7 @@ static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_fro /*--- Type declarations ---*/ -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1096 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1095 * * # Iterator API added in v1.6 * ctypedef int (*NpyIter_IterNextFunc)(NpyIter* it) noexcept nogil # <<<<<<<<<<<<<< @@ -1908,7 +1914,7 @@ static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_fro */ typedef int (*__pyx_t_5numpy_NpyIter_IterNextFunc)(NpyIter *); -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1097 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1096 * # Iterator API added in v1.6 * ctypedef int (*NpyIter_IterNextFunc)(NpyIter* it) noexcept nogil * ctypedef void (*NpyIter_GetMultiIndexFunc)(NpyIter* it, npy_intp* outcoords) noexcept nogil # <<<<<<<<<<<<<< @@ -2311,22 +2317,22 @@ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* TypeImport.proto */ -#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_10 -#define __PYX_HAVE_RT_ImportType_proto_3_0_10 +#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_11 +#define __PYX_HAVE_RT_ImportType_proto_3_0_11 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L #include #endif #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L -#define __PYX_GET_STRUCT_ALIGNMENT_3_0_10(s) alignof(s) +#define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) alignof(s) #else -#define __PYX_GET_STRUCT_ALIGNMENT_3_0_10(s) sizeof(void*) +#define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) sizeof(void*) #endif -enum __Pyx_ImportType_CheckSize_3_0_10 { - __Pyx_ImportType_CheckSize_Error_3_0_10 = 0, - __Pyx_ImportType_CheckSize_Warn_3_0_10 = 1, - __Pyx_ImportType_CheckSize_Ignore_3_0_10 = 2 +enum __Pyx_ImportType_CheckSize_3_0_11 { + __Pyx_ImportType_CheckSize_Error_3_0_11 = 0, + __Pyx_ImportType_CheckSize_Warn_3_0_11 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_0_11 = 2 }; -static PyTypeObject *__Pyx_ImportType_3_0_10(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_10 check_size); +static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size); #endif /* Import.proto */ @@ -3569,7 +3575,7 @@ static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_6libcpp_6s return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286 * * @property * cdef inline npy_intp itemsize(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3580,7 +3586,7 @@ static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_6libcpp_6s static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self) { npy_intp __pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":287 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":287 * @property * cdef inline npy_intp itemsize(self) noexcept nogil: * return PyDataType_ELSIZE(self) # <<<<<<<<<<<<<< @@ -3590,7 +3596,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_D __pyx_r = PyDataType_ELSIZE(__pyx_v_self); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286 * * @property * cdef inline npy_intp itemsize(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3603,7 +3609,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_D return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290 * * @property * cdef inline npy_intp alignment(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3614,7 +3620,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_D static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self) { npy_intp __pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":291 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":291 * @property * cdef inline npy_intp alignment(self) noexcept nogil: * return PyDataType_ALIGNMENT(self) # <<<<<<<<<<<<<< @@ -3624,7 +3630,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290 * * @property * cdef inline npy_intp alignment(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3637,7 +3643,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296 * # for this using PyDataType_HASFIELDS. * @property * cdef inline object fields(self): # <<<<<<<<<<<<<< @@ -3651,7 +3657,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Desc PyObject *__pyx_t_1; __Pyx_RefNannySetupContext("fields", 1); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":297 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":297 * @property * cdef inline object fields(self): * return PyDataType_FIELDS(self) # <<<<<<<<<<<<<< @@ -3664,7 +3670,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Desc __pyx_r = ((PyObject *)__pyx_t_1); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296 * # for this using PyDataType_HASFIELDS. * @property * cdef inline object fields(self): # <<<<<<<<<<<<<< @@ -3679,7 +3685,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Desc return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300 * * @property * cdef inline tuple names(self): # <<<<<<<<<<<<<< @@ -3693,7 +3699,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr PyObject *__pyx_t_1; __Pyx_RefNannySetupContext("names", 1); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":301 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":301 * @property * cdef inline tuple names(self): * return PyDataType_NAMES(self) # <<<<<<<<<<<<<< @@ -3706,7 +3712,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr __pyx_r = ((PyObject*)__pyx_t_1); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300 * * @property * cdef inline tuple names(self): # <<<<<<<<<<<<<< @@ -3721,7 +3727,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":307 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":307 * # this field via the inline helper method PyDataType_SHAPE. * @property * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3732,7 +3738,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self) { PyArray_ArrayDescr *__pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":308 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":308 * @property * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil: * return PyDataType_SUBARRAY(self) # <<<<<<<<<<<<<< @@ -3742,7 +3748,7 @@ static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarra __pyx_r = PyDataType_SUBARRAY(__pyx_v_self); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":307 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":307 * # this field via the inline helper method PyDataType_SHAPE. * @property * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3755,7 +3761,7 @@ static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarra return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311 * * @property * cdef inline npy_uint64 flags(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3766,7 +3772,7 @@ static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarra static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self) { npy_uint64 __pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":313 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":313 * cdef inline npy_uint64 flags(self) noexcept nogil: * """The data types flags.""" * return PyDataType_FLAGS(self) # <<<<<<<<<<<<<< @@ -3776,7 +3782,7 @@ static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr __pyx_r = PyDataType_FLAGS(__pyx_v_self); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311 * * @property * cdef inline npy_uint64 flags(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3789,7 +3795,7 @@ static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323 * * @property * cdef inline int numiter(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3800,7 +3806,7 @@ static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self) { int __pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":325 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":325 * cdef inline int numiter(self) noexcept nogil: * """The number of arrays that need to be broadcast to the same shape.""" * return PyArray_MultiIter_NUMITER(self) # <<<<<<<<<<<<<< @@ -3810,7 +3816,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMulti __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323 * * @property * cdef inline int numiter(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3823,7 +3829,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMulti return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328 * * @property * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3834,7 +3840,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMulti static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self) { npy_intp __pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":330 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":330 * cdef inline npy_intp size(self) noexcept nogil: * """The total broadcasted size.""" * return PyArray_MultiIter_SIZE(self) # <<<<<<<<<<<<<< @@ -3844,7 +3850,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiI __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328 * * @property * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3857,7 +3863,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiI return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333 * * @property * cdef inline npy_intp index(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3868,7 +3874,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiI static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self) { npy_intp __pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":335 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":335 * cdef inline npy_intp index(self) noexcept nogil: * """The current (1-d) index into the broadcasted result.""" * return PyArray_MultiIter_INDEX(self) # <<<<<<<<<<<<<< @@ -3878,7 +3884,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMult __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333 * * @property * cdef inline npy_intp index(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3891,7 +3897,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMult return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338 * * @property * cdef inline int nd(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3902,7 +3908,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMult static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self) { int __pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":340 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":340 * cdef inline int nd(self) noexcept nogil: * """The number of dimensions in the broadcasted result.""" * return PyArray_MultiIter_NDIM(self) # <<<<<<<<<<<<<< @@ -3912,7 +3918,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338 * * @property * cdef inline int nd(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3925,7 +3931,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343 * * @property * cdef inline npy_intp* dimensions(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3936,7 +3942,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self) { npy_intp *__pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":345 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":345 * cdef inline npy_intp* dimensions(self) noexcept nogil: * """The shape of the broadcasted result.""" * return PyArray_MultiIter_DIMS(self) # <<<<<<<<<<<<<< @@ -3946,7 +3952,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343 * * @property * cdef inline npy_intp* dimensions(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3959,7 +3965,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348 * * @property * cdef inline void** iters(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3970,7 +3976,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self) { void **__pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":351 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":351 * """An array of iterator objects that holds the iterators for the arrays to be broadcast together. * On return, the iterators are adjusted for broadcasting.""" * return PyArray_MultiIter_ITERS(self) # <<<<<<<<<<<<<< @@ -3980,7 +3986,7 @@ static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiI __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348 * * @property * cdef inline void** iters(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -3993,7 +3999,7 @@ static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiI return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366 * * @property * cdef inline PyObject* base(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -4004,7 +4010,7 @@ static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiI static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) { PyObject *__pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":369 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":369 * """Returns a borrowed reference to the object owning the data/memory. * """ * return PyArray_BASE(self) # <<<<<<<<<<<<<< @@ -4014,7 +4020,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject __pyx_r = PyArray_BASE(__pyx_v_self); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366 * * @property * cdef inline PyObject* base(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -4027,7 +4033,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -4041,7 +4047,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray PyArray_Descr *__pyx_t_1; __Pyx_RefNannySetupContext("descr", 1); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":375 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":375 * """Returns an owned reference to the dtype of the array. * """ * return PyArray_DESCR(self) # <<<<<<<<<<<<<< @@ -4054,7 +4060,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray __pyx_r = ((PyArray_Descr *)__pyx_t_1); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -4069,7 +4075,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378 * * @property * cdef inline int ndim(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -4080,7 +4086,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) { int __pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":381 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":381 * """Returns the number of dimensions in the array. * """ * return PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -4090,7 +4096,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx __pyx_r = PyArray_NDIM(__pyx_v_self); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378 * * @property * cdef inline int ndim(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -4103,7 +4109,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384 * * @property * cdef inline npy_intp *shape(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -4114,7 +4120,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) { npy_intp *__pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":389 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":389 * Can return NULL for 0-dimensional arrays. * """ * return PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -4124,7 +4130,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec __pyx_r = PyArray_DIMS(__pyx_v_self); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384 * * @property * cdef inline npy_intp *shape(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -4137,7 +4143,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392 * * @property * cdef inline npy_intp *strides(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -4148,7 +4154,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) { npy_intp *__pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":396 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":396 * The number of elements matches the number of dimensions of the array (ndim). * """ * return PyArray_STRIDES(self) # <<<<<<<<<<<<<< @@ -4158,7 +4164,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO __pyx_r = PyArray_STRIDES(__pyx_v_self); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392 * * @property * cdef inline npy_intp *strides(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -4171,7 +4177,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399 * * @property * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -4182,7 +4188,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) { npy_intp __pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":402 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":402 * """Returns the total size (in number of elements) of the array. * """ * return PyArray_SIZE(self) # <<<<<<<<<<<<<< @@ -4192,7 +4198,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * __pyx_r = PyArray_SIZE(__pyx_v_self); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399 * * @property * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -4205,7 +4211,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405 * * @property * cdef inline char* data(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -4216,7 +4222,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) { char *__pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":411 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":411 * of `PyArray_DATA()` instead, which returns a 'void*'. * """ * return PyArray_BYTES(self) # <<<<<<<<<<<<<< @@ -4226,7 +4232,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p __pyx_r = PyArray_BYTES(__pyx_v_self); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405 * * @property * cdef inline char* data(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -4239,7 +4245,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":807 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806 * ctypedef long double complex clongdouble_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -4256,7 +4262,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":808 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":807 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< @@ -4264,13 +4270,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ * cdef inline object PyArray_MultiIterNew2(a, b): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 808, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":807 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806 * ctypedef long double complex clongdouble_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -4289,7 +4295,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":810 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -4306,7 +4312,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 1); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":811 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":810 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< @@ -4314,13 +4320,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ * cdef inline object PyArray_MultiIterNew3(a, b, c): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 811, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":810 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -4339,7 +4345,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":813 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":812 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -4356,7 +4362,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 1); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":814 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":813 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< @@ -4364,13 +4370,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 814, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":813 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":812 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -4389,7 +4395,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":816 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":815 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -4406,7 +4412,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 1); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":817 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":816 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< @@ -4414,13 +4420,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 817, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":816 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":815 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -4439,7 +4445,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":819 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":818 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -4456,7 +4462,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 1); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":820 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":819 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< @@ -4464,13 +4470,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ * cdef inline tuple PyDataType_SHAPE(dtype d): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 820, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":819 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":818 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -4489,7 +4495,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":821 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -4504,7 +4510,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ PyObject *__pyx_t_2; __Pyx_RefNannySetupContext("PyDataType_SHAPE", 1); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":823 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -4514,7 +4520,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d); if (__pyx_t_1) { - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":824 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":823 * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): * return d.subarray.shape # <<<<<<<<<<<<<< @@ -4527,7 +4533,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_r = ((PyObject*)__pyx_t_2); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":823 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -4536,7 +4542,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ */ } - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":826 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":825 * return d.subarray.shape * else: * return () # <<<<<<<<<<<<<< @@ -4550,7 +4556,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ goto __pyx_L0; } - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":821 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -4565,7 +4571,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1010 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1009 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base) except *: # <<<<<<<<<<<<<< @@ -4579,7 +4585,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1011 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1010 * * cdef inline void set_array_base(ndarray arr, object base) except *: * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< @@ -4588,16 +4594,16 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ Py_INCREF(__pyx_v_base); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1012 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1011 * cdef inline void set_array_base(ndarray arr, object base) except *: * Py_INCREF(base) # important to do this before stealing the reference below! * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ - __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 1012, __pyx_L1_error) + __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 1011, __pyx_L1_error) - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1010 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1009 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base) except *: # <<<<<<<<<<<<<< @@ -4612,7 +4618,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a __pyx_L0:; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1014 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -4627,7 +4633,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 1); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1015 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1014 * * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< @@ -4636,7 +4642,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ __pyx_v_base = PyArray_BASE(__pyx_v_arr); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1016 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1015 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< @@ -4646,7 +4652,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_t_1 = (__pyx_v_base == NULL); if (__pyx_t_1) { - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1017 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1016 * base = PyArray_BASE(arr) * if base is NULL: * return None # <<<<<<<<<<<<<< @@ -4657,7 +4663,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1016 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1015 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< @@ -4666,7 +4672,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ } - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1018 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1017 * if base is NULL: * return None * return base # <<<<<<<<<<<<<< @@ -4678,7 +4684,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = ((PyObject *)__pyx_v_base); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1014 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -4693,7 +4699,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1021 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -4717,7 +4723,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_array", 1); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1023 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -4733,16 +4739,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1024 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1023 * cdef inline int import_array() except -1: * try: * __pyx_import_array() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy._core.multiarray failed to import") */ - __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1024, __pyx_L3_error) + __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1023, __pyx_L3_error) - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1023 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -4756,7 +4762,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1024 * try: * __pyx_import_array() * except Exception: # <<<<<<<<<<<<<< @@ -4766,27 +4772,27 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1025, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1024, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1026 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025 * __pyx_import_array() * except Exception: * raise ImportError("numpy._core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1026, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1025, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(1, 1026, __pyx_L5_except_error) + __PYX_ERR(1, 1025, __pyx_L5_except_error) } goto __pyx_L5_except_error; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1023 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -4802,7 +4808,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __pyx_L8_try_end:; } - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1021 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -4825,7 +4831,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1027 * raise ImportError("numpy._core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -4849,7 +4855,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_umath", 1); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1029 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -4865,16 +4871,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1030 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1029 * cdef inline int import_umath() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy._core.umath failed to import") */ - __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1030, __pyx_L3_error) + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1029, __pyx_L3_error) - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1029 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -4888,7 +4894,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1030 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -4898,27 +4904,27 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1031, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1030, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1032 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031 * _import_umath() * except Exception: * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1032, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1031, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(1, 1032, __pyx_L5_except_error) + __PYX_ERR(1, 1031, __pyx_L5_except_error) } goto __pyx_L5_except_error; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1029 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -4934,7 +4940,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __pyx_L8_try_end:; } - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1027 * raise ImportError("numpy._core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -4957,7 +4963,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1033 * raise ImportError("numpy._core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -4981,7 +4987,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_ufunc", 1); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1035 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -4997,16 +5003,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1036 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1035 * cdef inline int import_ufunc() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy._core.umath failed to import") */ - __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1036, __pyx_L3_error) + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1035, __pyx_L3_error) - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1035 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -5020,7 +5026,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1037 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1036 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -5030,27 +5036,27 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1037, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1036, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1038 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1037 * _import_umath() * except Exception: * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<< * * */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1038, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1037, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(1, 1038, __pyx_L5_except_error) + __PYX_ERR(1, 1037, __pyx_L5_except_error) } goto __pyx_L5_except_error; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1035 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -5066,7 +5072,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __pyx_L8_try_end:; } - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1033 * raise ImportError("numpy._core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -5089,7 +5095,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1041 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040 * * * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<< @@ -5100,7 +5106,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { int __pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1053 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1052 * bool * """ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< @@ -5110,7 +5116,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1041 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040 * * * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<< @@ -5123,7 +5129,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1056 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055 * * * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<< @@ -5134,7 +5140,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { int __pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1068 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1067 * bool * """ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< @@ -5144,7 +5150,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1056 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055 * * * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<< @@ -5157,7 +5163,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1071 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070 * * * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< @@ -5168,7 +5174,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { npy_datetime __pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1078 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1077 * also needed. That can be found using `get_datetime64_unit`. * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -5178,7 +5184,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1071 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070 * * * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< @@ -5191,7 +5197,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1081 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080 * * * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< @@ -5202,7 +5208,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { npy_timedelta __pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1085 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1084 * returns the int64 value underlying scalar numpy timedelta64 object * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -5212,7 +5218,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1081 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080 * * * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< @@ -5225,7 +5231,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject return __pyx_r; } -/* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1088 +/* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087 * * * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<< @@ -5236,7 +5242,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { NPY_DATETIMEUNIT __pyx_r; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1092 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1091 * returns the unit part of the dtype for a numpy datetime64 object. * """ * return (obj).obmeta.base # <<<<<<<<<<<<<< @@ -5246,7 +5252,7 @@ static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObjec __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); goto __pyx_L0; - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1088 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087 * * * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<< @@ -5435,7 +5441,7 @@ static PyObject *__pyx_pf_8_libjpeg_decode(CYTHON_UNUSED PyObject *__pyx_self, P PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; + unsigned int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); int __pyx_t_7; @@ -5443,6 +5449,7 @@ static PyObject *__pyx_pf_8_libjpeg_decode(CYTHON_UNUSED PyObject *__pyx_self, P PyObject *__pyx_t_9 = NULL; Py_ssize_t __pyx_t_10; int __pyx_t_11; + int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -5864,7 +5871,7 @@ static PyObject *__pyx_pf_8_libjpeg_decode(CYTHON_UNUSED PyObject *__pyx_self, P * colourspace, * ) */ - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_nr_bytes); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 94, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_nr_bytes); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 94, __pyx_L1_error) /* "_libjpeg.pyx":95 * len(src), @@ -5873,7 +5880,7 @@ static PyObject *__pyx_pf_8_libjpeg_decode(CYTHON_UNUSED PyObject *__pyx_self, P * ) * */ - __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_colourspace); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 95, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_colourspace); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 95, __pyx_L1_error) /* "_libjpeg.pyx":90 * @@ -5882,7 +5889,7 @@ static PyObject *__pyx_pf_8_libjpeg_decode(CYTHON_UNUSED PyObject *__pyx_self, P * p_in, * p_out, */ - __pyx_t_9 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(Decode(__pyx_v_p_in, __pyx_v_p_out, __pyx_t_10, __pyx_t_4, __pyx_t_11)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 90, __pyx_L1_error) + __pyx_t_9 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(Decode(__pyx_v_p_in, __pyx_v_p_out, __pyx_t_10, __pyx_t_11, __pyx_t_12)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_9); __pyx_t_9 = 0; @@ -6304,7 +6311,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { } /* #### Code section: cached_builtins ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 1026, __pyx_L1_error) + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 1025, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -6315,25 +6322,25 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1026 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025 * __pyx_import_array() * except Exception: * raise ImportError("numpy._core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ - __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_numpy__core_multiarray_failed_to); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 1026, __pyx_L1_error) + __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_numpy__core_multiarray_failed_to); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); - /* "../../../../../tmp/pip-build-env-mma89k37/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1032 + /* "../../../../../tmp/pip-build-env-4iiekraa/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031 * _import_umath() * except Exception: * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ - __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_numpy__core_umath_failed_to_impo); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 1032, __pyx_L1_error) + __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_numpy__core_umath_failed_to_impo); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 1031, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); @@ -6454,33 +6461,33 @@ static int __Pyx_modinit_type_import_code(void) { /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_10(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 - sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyTypeObject), + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject), #elif CYTHON_COMPILING_IN_LIMITED_API - sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyTypeObject), + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject), #else - sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyHeapTypeObject), + sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyHeapTypeObject), #endif - __Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyArray_Descr),__Pyx_ImportType_CheckSize_Ignore_3_0_10); if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 271, __pyx_L1_error) - __pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyArrayIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_10); if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 316, __pyx_L1_error) - __pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyArrayMultiIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_10); if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 320, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyArrayObject),__Pyx_ImportType_CheckSize_Ignore_3_0_10); if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 359, __pyx_L1_error) - __pyx_ptype_5numpy_generic = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_generic) __PYX_ERR(1, 848, __pyx_L1_error) - __pyx_ptype_5numpy_number = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "number", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_number) __PYX_ERR(1, 850, __pyx_L1_error) - __pyx_ptype_5numpy_integer = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_integer) __PYX_ERR(1, 852, __pyx_L1_error) - __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 854, __pyx_L1_error) - __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 856, __pyx_L1_error) - __pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 858, __pyx_L1_error) - __pyx_ptype_5numpy_floating = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_floating) __PYX_ERR(1, 860, __pyx_L1_error) - __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 862, __pyx_L1_error) - __pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 864, __pyx_L1_error) - __pyx_ptype_5numpy_character = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "character", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_10); if (!__pyx_ptype_5numpy_character) __PYX_ERR(1, 866, __pyx_L1_error) - __pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_0_10(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_10(PyUFuncObject),__Pyx_ImportType_CheckSize_Ignore_3_0_10); if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 930, __pyx_L1_error) + __pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArray_Descr),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 271, __pyx_L1_error) + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArrayIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 316, __pyx_L1_error) + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArrayMultiIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 320, __pyx_L1_error) + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArrayObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 359, __pyx_L1_error) + __pyx_ptype_5numpy_generic = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_generic) __PYX_ERR(1, 847, __pyx_L1_error) + __pyx_ptype_5numpy_number = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "number", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_number) __PYX_ERR(1, 849, __pyx_L1_error) + __pyx_ptype_5numpy_integer = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_integer) __PYX_ERR(1, 851, __pyx_L1_error) + __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 853, __pyx_L1_error) + __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 855, __pyx_L1_error) + __pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 857, __pyx_L1_error) + __pyx_ptype_5numpy_floating = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_floating) __PYX_ERR(1, 859, __pyx_L1_error) + __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 861, __pyx_L1_error) + __pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 863, __pyx_L1_error) + __pyx_ptype_5numpy_character = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "character", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_character) __PYX_ERR(1, 865, __pyx_L1_error) + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyUFuncObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 929, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; @@ -8510,10 +8517,10 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec } /* TypeImport */ -#ifndef __PYX_HAVE_RT_ImportType_3_0_10 -#define __PYX_HAVE_RT_ImportType_3_0_10 -static PyTypeObject *__Pyx_ImportType_3_0_10(PyObject *module, const char *module_name, const char *class_name, - size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_10 check_size) +#ifndef __PYX_HAVE_RT_ImportType_3_0_11 +#define __PYX_HAVE_RT_ImportType_3_0_11 +static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size) { PyObject *result = 0; char warning[200]; @@ -8567,7 +8574,7 @@ static PyTypeObject *__Pyx_ImportType_3_0_10(PyObject *module, const char *modul module_name, class_name, size, basicsize+itemsize); goto bad; } - if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_10 && + if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_11 && ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " @@ -8575,7 +8582,7 @@ static PyTypeObject *__Pyx_ImportType_3_0_10(PyObject *module, const char *modul module_name, class_name, size, basicsize, basicsize+itemsize); goto bad; } - else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_10 && (size_t)basicsize > size) { + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_11 && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", @@ -10012,6 +10019,9 @@ static PyTypeObject __pyx_CyFunctionType_type = { #if PY_VERSION_HEX >= 0x030C0000 0, #endif +#if PY_VERSION_HEX >= 0x030d00A4 + 0, +#endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, #endif @@ -10891,245 +10901,239 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { } return (int) val; } - } else + } #endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS - if (unlikely(__Pyx_PyLong_IsNeg(x))) { - goto raise_neg_overflow; - } else if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_DigitCount(x)) { - case 2: - if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { - return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } - break; - case 3: - if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { - return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } - break; - case 4: - if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { - return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } - break; - } + } + break; } + } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } #else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (int) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } #endif - if ((sizeof(int) <= sizeof(unsigned long))) { - __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG - } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif - } - } else { + } + } else { #if CYTHON_USE_PYLONG_INTERNALS - if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_SignedDigitCount(x)) { - case -2: - if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { - return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } - break; - case 2: - if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { - return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } - break; - case -3: - if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { - return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } - break; - case 3: - if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { - return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } - break; - case -4: - if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { - return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } - break; - case 4: - if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { - return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } - break; - } + } + break; } + } #endif - if ((sizeof(int) <= sizeof(long))) { - __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG - } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif - } + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); } { - int val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); -#if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { - PyObject *tmp = v; - v = PyNumber_Long(tmp); - Py_DECREF(tmp); - } -#endif - if (likely(v)) { - int ret = -1; -#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) - int one = 1; int is_little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&val; - ret = _PyLong_AsByteArray((PyLongObject *)v, - bytes, sizeof(val), - is_little, !is_unsigned); -#else - PyObject *stepval = NULL, *mask = NULL, *shift = NULL; - int bits, remaining_bits, is_negative = 0; - long idigit; - int chunk_size = (sizeof(long) < 8) ? 30 : 62; - if (unlikely(!PyLong_CheckExact(v))) { - PyObject *tmp = v; - v = PyNumber_Long(v); - assert(PyLong_CheckExact(v)); - Py_DECREF(tmp); - if (unlikely(!v)) return (int) -1; - } -#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(x) == 0) - return (int) 0; - is_negative = Py_SIZE(x) < 0; -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (int) -1; - is_negative = result == 1; - } -#endif - if (is_unsigned && unlikely(is_negative)) { - goto raise_neg_overflow; - } else if (is_negative) { - stepval = PyNumber_Invert(v); - if (unlikely(!stepval)) - return (int) -1; - } else { - stepval = __Pyx_NewRef(v); - } - val = (int) 0; - mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; - shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; - for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { - PyObject *tmp, *digit; - digit = PyNumber_And(stepval, mask); - if (unlikely(!digit)) goto done; - idigit = PyLong_AsLong(digit); - Py_DECREF(digit); - if (unlikely(idigit < 0)) goto done; - tmp = PyNumber_Rshift(stepval, shift); - if (unlikely(!tmp)) goto done; - Py_DECREF(stepval); stepval = tmp; - val |= ((int) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(stepval) == 0) - goto unpacking_done; - #endif - } - idigit = PyLong_AsLong(stepval); - if (unlikely(idigit < 0)) goto done; - remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); - if (unlikely(idigit >= (1L << remaining_bits))) - goto raise_overflow; - val |= ((int) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - unpacking_done: - #endif - if (!is_unsigned) { - if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) - goto raise_overflow; - if (is_negative) - val = ~val; - } - ret = 0; - done: - Py_XDECREF(shift); - Py_XDECREF(mask); - Py_XDECREF(stepval); -#endif + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { Py_DECREF(v); - if (likely(!ret)) - return val; + return (int) -1; } - return (int) -1; + is_negative = result == 1; } - } else { - int val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (int) -1; - val = __Pyx_PyInt_As_int(tmp); - Py_DECREF(tmp); + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; return val; } raise_overflow: @@ -11173,12 +11177,19 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { } } { - int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; -#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); #else + int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); @@ -11237,12 +11248,19 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { } } { - int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; -#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); #else + int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); @@ -11301,12 +11319,19 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) { } } { - int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; -#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(char), little, !is_unsigned); #else + int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); @@ -11372,245 +11397,239 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { } return (long) val; } - } else + } #endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS - if (unlikely(__Pyx_PyLong_IsNeg(x))) { - goto raise_neg_overflow; - } else if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_DigitCount(x)) { - case 2: - if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { - return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } - break; - case 3: - if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { - return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } - break; - case 4: - if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { - return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } - break; - } + } + break; } + } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } #else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (long) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } #endif - if ((sizeof(long) <= sizeof(unsigned long))) { - __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG - } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif - } - } else { + } + } else { #if CYTHON_USE_PYLONG_INTERNALS - if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_SignedDigitCount(x)) { - case -2: - if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { - return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } - break; - case 2: - if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { - return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } - break; - case -3: - if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { - return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } - break; - case 3: - if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { - return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } - break; - case -4: - if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { - return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } - break; - case 4: - if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { - return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } - break; - } + } + break; } + } #endif - if ((sizeof(long) <= sizeof(long))) { - __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG - } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif - } + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); } { - long val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); -#if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { - PyObject *tmp = v; - v = PyNumber_Long(tmp); - Py_DECREF(tmp); - } -#endif - if (likely(v)) { - int ret = -1; -#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) - int one = 1; int is_little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&val; - ret = _PyLong_AsByteArray((PyLongObject *)v, - bytes, sizeof(val), - is_little, !is_unsigned); -#else - PyObject *stepval = NULL, *mask = NULL, *shift = NULL; - int bits, remaining_bits, is_negative = 0; - long idigit; - int chunk_size = (sizeof(long) < 8) ? 30 : 62; - if (unlikely(!PyLong_CheckExact(v))) { - PyObject *tmp = v; - v = PyNumber_Long(v); - assert(PyLong_CheckExact(v)); - Py_DECREF(tmp); - if (unlikely(!v)) return (long) -1; - } -#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(x) == 0) - return (long) 0; - is_negative = Py_SIZE(x) < 0; -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (long) -1; - is_negative = result == 1; - } -#endif - if (is_unsigned && unlikely(is_negative)) { - goto raise_neg_overflow; - } else if (is_negative) { - stepval = PyNumber_Invert(v); - if (unlikely(!stepval)) - return (long) -1; - } else { - stepval = __Pyx_NewRef(v); - } - val = (long) 0; - mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; - shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; - for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { - PyObject *tmp, *digit; - digit = PyNumber_And(stepval, mask); - if (unlikely(!digit)) goto done; - idigit = PyLong_AsLong(digit); - Py_DECREF(digit); - if (unlikely(idigit < 0)) goto done; - tmp = PyNumber_Rshift(stepval, shift); - if (unlikely(!tmp)) goto done; - Py_DECREF(stepval); stepval = tmp; - val |= ((long) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(stepval) == 0) - goto unpacking_done; - #endif - } - idigit = PyLong_AsLong(stepval); - if (unlikely(idigit < 0)) goto done; - remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); - if (unlikely(idigit >= (1L << remaining_bits))) - goto raise_overflow; - val |= ((long) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - unpacking_done: - #endif - if (!is_unsigned) { - if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) - goto raise_overflow; - if (is_negative) - val = ~val; - } - ret = 0; - done: - Py_XDECREF(shift); - Py_XDECREF(mask); - Py_XDECREF(stepval); -#endif + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { Py_DECREF(v); - if (likely(!ret)) - return val; + return (long) -1; } - return (long) -1; + is_negative = result == 1; } - } else { - long val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (long) -1; - val = __Pyx_PyInt_As_long(tmp); - Py_DECREF(tmp); + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; return val; } raise_overflow: diff --git a/libjpeg/tests/test_decode.py b/libjpeg/tests/test_decode.py index 0ccdbef..ce5f7d8 100644 --- a/libjpeg/tests/test_decode.py +++ b/libjpeg/tests/test_decode.py @@ -188,7 +188,7 @@ def test_baseline(self, fname, info): if 1 <= info[3] <= 8: assert arr.dtype == "uint8" if 9 <= info[3] <= 16: - assert arr.dtype == "uint16" + assert arr.dtype == " 1: diff --git a/pyproject.toml b/pyproject.toml index 4f76f38..28d5088 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,11 +22,11 @@ classifiers=[ "Development Status :: 5 - Production/Stable", "Natural Language :: English", "Programming Language :: C++", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX :: Linux", "Operating System :: Microsoft :: Windows", @@ -56,11 +56,11 @@ packages = [ { include = "libjpeg" }, ] readme = "README.md" -version = "2.2.0" +version = "2.3.0" [tool.poetry.dependencies] -python = "^3.8" -numpy = "*" +python = "^3.9" +numpy = "^2.0" [tool.poetry.plugins."pylibjpeg.jpeg_decoders"] libjpeg = "libjpeg:decode" @@ -86,7 +86,7 @@ omit = [ ] [tool.mypy] -python_version = "3.8" +python_version = "3.9" files = "libjpeg" exclude = ["libjpeg/tests"] show_error_codes = true