diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bbc4ac..4240ea9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ # For more information see: # https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions -name: Automated Tests +name: CI/CD on: push: @@ -19,15 +19,15 @@ jobs: # as we build C extension for users to download, we want to include as many python versions # and OS versions as possible (especially windows to create .whl packages, # see step "Create wheel and dist package") - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] - os: ["ubuntu-latest", "windows-latest"] + python-version: ['3.9', '3.10', '3.11', '3.12'] + os: ["ubuntu-latest", "windows-latest", "macos-latest"] name: py${{ matrix.python-version }} @ ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 with: - submodules: true # does not work with self-hosted testdata + submodules: true fetch-depth: 0 - uses: conda-incubator/setup-miniconda@v3 with: @@ -35,8 +35,8 @@ jobs: auto-update-conda: true python-version: ${{ matrix.python-version }} environment-file: environment.yml - activate-environment: pytesmo # todo: must match with name in environment.yml - mamba-version: "*" + activate-environment: pytesmo + channel-priority: flexible auto-activate-base: false - name: Print Infos shell: bash -l {0} @@ -54,11 +54,22 @@ jobs: mkdir -p artifacts filename=env_py${{ matrix.python-version }}_${{ matrix.os }}.yml conda env export --no-builds | grep -v "prefix" > artifacts/$filename - - name: Install package and test + - name: Install package and dependencies shell: bash -l {0} run: | pip install -e .[testing] + - name: Run unit tests + shell: bash -l {0} + run: | pytest --cache-clear + - name: Create wheel and dist package + shell: bash -l {0} + run: | + pip install setuptools_scm twine wheel + python setup.py sdist --dist-dir artifacts/dist + python setup.py bdist_wheel --dist-dir artifacts/dist + ls artifacts/dist + twine check artifacts/dist/* - name: Upload Coverage shell: bash -l {0} run: | @@ -67,27 +78,13 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COVERALLS_FLAG_NAME: ${{ matrix.python-version }} COVERALLS_PARALLEL: true - - name: Create wheel and dist package - shell: bash -l {0} - run: | - git status - pip install setuptools_scm twine - if [ ${{ matrix.os }} == "windows-latest" ] - then - # build whls on windows - pip install wheel - python setup.py bdist_wheel --dist-dir artifacts/dist - else - # build dist on linux - python setup.py sdist --dist-dir artifacts/dist - fi - ls artifacts/dist - twine check artifacts/dist/* + - name: Upload Artifacts uses: actions/upload-artifact@v4 with: name: Artifacts-${{ matrix.python-version }}-${{ matrix.os }} path: artifacts/* + coveralls: name: Submit Coveralls 👚 needs: build @@ -99,6 +96,7 @@ jobs: pip3 install --upgrade coveralls && coveralls --service=github --finish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + publish: name: Upload to PyPI if: | @@ -127,4 +125,4 @@ jobs: verify_metadata: true packages_dir: Artifacts/dist/ user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} # this needs to be uploaded to github actions secrets + password: ${{ secrets.PYPI_API_TOKEN }} # this needs to be uploaded to github actions secrets diff --git a/README.rst b/README.rst index 8194f9a..c9c7a03 100644 --- a/README.rst +++ b/README.rst @@ -1,17 +1,19 @@ pytesmo - a Python Toolbox for the Evaluation of Soil Moisture Observations *************************************************************************** -.. image:: https://github.com/TUW-GEO/pytesmo/workflows/Automated%20Tests/badge.svg?branch=master +|ci| |cov| |pip| |doc| + +.. |ci| image:: https://github.com/TUW-GEO/pytesmo/actions/workflows/ci.yml/badge.svg?branch=master :target: https://github.com/TUW-GEO/pytesmo/actions -.. image:: https://coveralls.io/repos/TUW-GEO/pytesmo/badge.png?branch=master +.. |cov| image:: https://coveralls.io/repos/TUW-GEO/pytesmo/badge.png?branch=master :target: https://coveralls.io/r/TUW-GEO/pytesmo?branch=master -.. image:: https://badge.fury.io/py/pytesmo.svg +.. |pip| image:: https://badge.fury.io/py/pytesmo.svg :target: https://badge.fury.io/py/pytesmo -.. image:: https://readthedocs.org/projects/pytesmo/badge/?version=latest - :target: https://pytesmo.readthedocs.io/en/latest/?badge=latest +.. |doc| image:: https://readthedocs.org/projects/pytesmo/badge/?version=latest + :target: https://pytesmo.readthedocs.io/en/latest/ pytesmo, the Python Toolbox for the Evaluation of Soil Moisture Observations, is a package/python toolbox which aims to provide a library that can be used for @@ -45,35 +47,34 @@ If you want to contribute, take a look at the `developers guide Installation ============ -This package should be installable through `pip +This package can be installed through `pip `__ which downloads the package from the `python package repository Pypi `__. -However, pytesmo also needs some packages that depend on C or Fortran libraries (like ``netCDF4``). -They should be installed first with conda or mamba. We recommend installing `Mambaforge `__. -Then the following command should install all dependencies: - -.. code-block:: bash - - mamba install -c conda-forge 'numpy<2.0.0' scipy pandas netCDF4 cython pyresample - -Afterwards ``pytesmo`` can be installed via pip. .. code-block:: bash pip install pytesmo +Note that ``pytesmo>=0.17`` will only work with ``numpy>=2.0`` and ``python>=3.9``. +If you still require a version compatible with numpy v1, install ``pytesmo<0.17``. + +Compiled C extensions are available as wheels for Windows and Linux for +python 3.9 to 3.12. -As an alternative (e.g. if you want to contribute to the package), you can -clone the Github repository and install from source: +For other operating systems and/or python versions, it might be necessary +to compile the binaries yourself. This should +happen automatically, if you have a C compiler installed (e.g. +`GCC `_ ). .. code:: git clone https://github.com/TUW-GEO/pytesmo.git --recursive cd pytesmo - mamba create -n pytesmo python=3.10 # or any supported python version + mamba create -n pytesmo python=3.12 # or any supported python version conda activate pytesmo - mamba env update -f environment.yml -n pytesmo - pip install -e . + pip install -e .[testing] # install source package + python setup.py build_ext --inplace --cythonize # optional compile cython C extensions + pytest # Run tests to check if everything works Supported Products ================== diff --git a/docs/examples/validation_framework.ipynb b/docs/examples/validation_framework.ipynb index 5b41390..1f76828 100644 --- a/docs/examples/validation_framework.ipynb +++ b/docs/examples/validation_framework.ipynb @@ -70,8 +70,10 @@ }, { "cell_type": "code", - "execution_count": 1, - "metadata": {}, + "execution_count": null, + "metadata": { + "is_executing": true + }, "outputs": [], "source": [ "import os\n", diff --git a/environment.yml b/environment.yml index 77aa7f4..eda7bdb 100644 --- a/environment.yml +++ b/environment.yml @@ -7,7 +7,7 @@ channels: - conda-forge - defaults dependencies: - - numpy<2.0.0 + - numpy>=2.0.0 - numba - scipy>=0.12 - pandas>=0.23.0 diff --git a/pyproject.toml b/pyproject.toml index f344455..0510b7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["Cython >= 0.29.23", "setuptools>=46.1.0", "wheel", "setuptools_scm[toml]>=5", "oldest-supported-numpy"] +requires = ["Cython >= 0.29.23", "setuptools>=46.1.0", "wheel", "setuptools_scm[toml]>=5", "numpy>=2,<3"] build-backend = "setuptools.build_meta" [tool] [tool.setuptools_scm] diff --git a/setup.cfg b/setup.cfg index a14609d..6f4674c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,20 +31,19 @@ package_dir = # Add here dependencies of your project (semicolon/line-separated), e.g. install_requires = importlib-metadata; python_version<"3.8" - numpy>=1.7.0,<2.0.0 + numpy>=2.0 + numba scipy>=0.12 pandas>=0.23.0 - matplotlib>=1.2.0 netCDF4>=1.0.1,!=1.6.2 pygeogrids pygeobase>=0.6.0 pynetcf>=0.4.0 configparser pykdtree - repurpose>=0.7.1 + repurpose>=0.13.1 cadati>=0.0.2 Cython>=0.29.21 - numba scikit-learn # The usage of test_requires is discouraged, see `Dependency Management` docs # tests_require = pytest; pytest-cov @@ -62,13 +61,18 @@ exclude = # PDF = ReportLab; RXP # Add here test requirements (semicolon/line-separated) testing = + ascat==2.4.3 + ismn==1.5.1 + nbconvert + ipykernel + sphinx_rtd_theme + matplotlib pytest pytest-cov pytest-mpl - nbconvert - ipykernel - ascat>=2.0 - ismn==1.3.4 + pre-commit + flake8 + yapf [options.entry_points] # Add here console scripts like: diff --git a/src/pytesmo/metrics/_fast.c b/src/pytesmo/metrics/_fast.c index b49d352..57e73f2 100644 --- a/src/pytesmo/metrics/_fast.c +++ b/src/pytesmo/metrics/_fast.c @@ -1,12 +1,28 @@ -/* Generated by Cython 3.0.10 */ +/* Generated by Cython 3.0.11 */ /* BEGIN: Cython Metadata { "distutils": { - "depends": [], + "define_macros": [ + [ + "NPY_NO_DEPRECATED_API", + "NPY_1_7_API_VERSION" + ] + ], + "depends": [ + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayobject.h", + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayscalars.h", + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarrayobject.h", + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarraytypes.h", + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include/numpy/npy_math.h", + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include/numpy/ufuncobject.h" + ], + "include_dirs": [ + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include" + ], "name": "pytesmo.metrics._fast", "sources": [ - "/shares/wpreimes/home/code/pytesmo/src/pytesmo/metrics/_fast.pyx" + "src/pytesmo/metrics/_fast.pyx" ] }, "module_name": "pytesmo.metrics._fast" @@ -37,10 +53,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 @@ -1516,7 +1532,7 @@ static const char *__pyx_filename; /* #### Code section: filename_table ### */ static const char *__pyx_f[] = { - "_fast.pyx", + "src/pytesmo/metrics/_fast.pyx", "", "__init__.cython-30.pxd", "type.pxd", @@ -1665,7 +1681,7 @@ typedef struct { /* #### Code section: numeric_typedefs ### */ -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":730 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< @@ -1674,7 +1690,7 @@ typedef struct { */ typedef npy_int8 __pyx_t_5numpy_int8_t; -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":731 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":770 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< @@ -1683,7 +1699,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; */ typedef npy_int16 __pyx_t_5numpy_int16_t; -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":732 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< @@ -1692,7 +1708,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; */ typedef npy_int32 __pyx_t_5numpy_int32_t; -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":733 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< @@ -1701,7 +1717,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; */ typedef npy_int64 __pyx_t_5numpy_int64_t; -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":737 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":776 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< @@ -1710,7 +1726,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":738 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":777 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< @@ -1719,7 +1735,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":739 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< @@ -1728,7 +1744,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":740 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< @@ -1737,7 +1753,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":744 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":783 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< @@ -1746,7 +1762,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; */ typedef npy_float32 __pyx_t_5numpy_float32_t; -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":745 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":784 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< @@ -1755,43 +1771,25 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; */ typedef npy_float64 __pyx_t_5numpy_float64_t; -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":754 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< - * ctypedef npy_longlong longlong_t +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":791 + * ctypedef double complex complex128_t * - */ -typedef npy_long __pyx_t_5numpy_int_t; - -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":755 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< - * - * ctypedef npy_ulong uint_t - */ -typedef npy_longlong __pyx_t_5numpy_longlong_t; - -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":757 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ -typedef npy_ulong __pyx_t_5numpy_uint_t; +typedef npy_longlong __pyx_t_5numpy_longlong_t; -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":758 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":792 * - * ctypedef npy_ulong uint_t + * ctypedef npy_longlong longlong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< * * ctypedef npy_intp intp_t */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":760 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":794 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< @@ -1800,7 +1798,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; */ typedef npy_intp __pyx_t_5numpy_intp_t; -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":761 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":795 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< @@ -1809,7 +1807,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; */ typedef npy_uintp __pyx_t_5numpy_uintp_t; -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":763 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":797 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< @@ -1818,7 +1816,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; */ typedef npy_double __pyx_t_5numpy_float_t; -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":764 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":798 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< @@ -1827,12 +1825,12 @@ typedef npy_double __pyx_t_5numpy_float_t; */ typedef npy_double __pyx_t_5numpy_double_t; -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":765 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< * - * ctypedef npy_cfloat cfloat_t + * ctypedef float complex cfloat_t */ typedef npy_longdouble __pyx_t_5numpy_longdouble_t; /* #### Code section: complex_type_declarations ### */ @@ -1860,6 +1858,18 @@ static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(floa #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); +/* Declarations.proto */ +#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #ifdef __cplusplus + typedef ::std::complex< long double > __pyx_t_long_double_complex; + #else + typedef long double _Complex __pyx_t_long_double_complex; + #endif +#else + typedef struct { long double real, imag; } __pyx_t_long_double_complex; +#endif +static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double, long double); + /* #### Code section: type_declarations ### */ /*--- Type declarations ---*/ @@ -1868,41 +1878,23 @@ struct __pyx_MemviewEnum_obj; struct __pyx_memoryview_obj; struct __pyx_memoryviewslice_obj; -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":767 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t - */ -typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":768 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< - * ctypedef npy_clongdouble clongdouble_t +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1095 * - */ -typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":769 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< + * # 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 * - * ctypedef npy_cdouble complex_t */ -typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; +typedef int (*__pyx_t_5numpy_NpyIter_IterNextFunc)(NpyIter *); -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":771 - * ctypedef npy_clongdouble clongdouble_t +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< - * - * cdef inline object PyArray_MultiIterNew1(a): + * cdef extern from "numpy/arrayobject.h": */ -typedef npy_cdouble __pyx_t_5numpy_complex_t; +typedef void (*__pyx_t_5numpy_NpyIter_GetMultiIndexFunc)(NpyIter *, npy_intp *); struct __pyx_defaults; typedef struct __pyx_defaults __pyx_defaults; struct __pyx_defaults { @@ -2617,11 +2609,7 @@ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* s static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /* HasAttr.proto */ -#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 -#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) -#else static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); -#endif /* PyDictContains.proto */ static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { @@ -2836,22 +2824,22 @@ static int __Pyx_setup_reduce(PyObject* type_obj); #endif /* 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 /* FetchSharedCythonModule.proto */ @@ -3211,6 +3199,44 @@ static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *o #endif #endif +/* Arithmetic.proto */ +#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #define __Pyx_c_eq_long__double(a, b) ((a)==(b)) + #define __Pyx_c_sum_long__double(a, b) ((a)+(b)) + #define __Pyx_c_diff_long__double(a, b) ((a)-(b)) + #define __Pyx_c_prod_long__double(a, b) ((a)*(b)) + #define __Pyx_c_quot_long__double(a, b) ((a)/(b)) + #define __Pyx_c_neg_long__double(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero_long__double(z) ((z)==(long double)0) + #define __Pyx_c_conj_long__double(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs_long__double(z) (::std::abs(z)) + #define __Pyx_c_pow_long__double(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero_long__double(z) ((z)==0) + #define __Pyx_c_conj_long__double(z) (conjl(z)) + #if 1 + #define __Pyx_c_abs_long__double(z) (cabsl(z)) + #define __Pyx_c_pow_long__double(a, b) (cpowl(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex); + #if 1 + static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + #endif +#endif + /* MemviewSliceCopyTemplate.proto */ static __Pyx_memviewslice __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, @@ -3295,6 +3321,18 @@ static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/ static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/ static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self); /* proto*/ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self); /* proto*/ @@ -3320,6 +3358,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p /* Module declarations from "numpy" */ /* Module declarations from "numpy" */ +static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/ /* Module declarations from "numpy.math" */ @@ -3471,7 +3510,6 @@ static const char __pyx_k_memview[] = "memview"; static const char __pyx_k_Ellipsis[] = "Ellipsis"; static const char __pyx_k_Sequence[] = "Sequence"; static const char __pyx_k_defaults[] = "defaults"; -static const char __pyx_k_fast_pyx[] = "_fast.pyx"; static const char __pyx_k_getstate[] = "__getstate__"; static const char __pyx_k_itemsize[] = "itemsize"; static const char __pyx_k_pyx_type[] = "__pyx_type"; @@ -3527,9 +3565,9 @@ static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cyt static const char __pyx_k_scipy_special_cython_special[] = "scipy.special.cython_special"; static const char __pyx_k_pyx_fuse_0_moments_welford_nd[] = "__pyx_fuse_0_moments_welford_nd"; static const char __pyx_k_pyx_fuse_1_moments_welford_nd[] = "__pyx_fuse_1_moments_welford_nd"; +static const char __pyx_k_src_pytesmo_metrics__fast_pyx[] = "src/pytesmo/metrics/_fast.pyx"; static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data."; static const char __pyx_k_strided_and_direct_or_indirect[] = ""; -static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; static const char __pyx_k_All_dimensions_preceding_dimensi[] = "All dimensions preceding dimension %d must be indexed and not sliced"; static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides"; static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory."; @@ -3546,7 +3584,8 @@ static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object"; static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension "; static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; -static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; +static const char __pyx_k_numpy__core_multiarray_failed_to[] = "numpy._core.multiarray failed to import"; +static const char __pyx_k_numpy__core_umath_failed_to_impo[] = "numpy._core.umath failed to import"; static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides."; /* #### Code section: decls ### */ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */ @@ -3752,7 +3791,6 @@ typedef struct { PyObject *__pyx_n_s_encode; PyObject *__pyx_n_s_enumerate; PyObject *__pyx_n_s_error; - PyObject *__pyx_kp_s_fast_pyx; PyObject *__pyx_n_s_flags; PyObject *__pyx_n_s_float; PyObject *__pyx_n_s_float32; @@ -3787,8 +3825,8 @@ typedef struct { PyObject *__pyx_kp_s_no_default___reduce___due_to_non; PyObject *__pyx_n_s_np; PyObject *__pyx_n_s_numpy; - PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; - PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; + PyObject *__pyx_kp_u_numpy__core_multiarray_failed_to; + PyObject *__pyx_kp_u_numpy__core_umath_failed_to_impo; PyObject *__pyx_n_s_obj; PyObject *__pyx_n_s_pack; PyObject *__pyx_n_s_pickle; @@ -3815,6 +3853,7 @@ typedef struct { PyObject *__pyx_n_s_size; PyObject *__pyx_n_s_spec; PyObject *__pyx_n_s_split; + PyObject *__pyx_kp_s_src_pytesmo_metrics__fast_pyx; PyObject *__pyx_n_s_start; PyObject *__pyx_n_s_step; PyObject *__pyx_n_s_stop; @@ -4000,7 +4039,6 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_encode); Py_CLEAR(clear_module_state->__pyx_n_s_enumerate); Py_CLEAR(clear_module_state->__pyx_n_s_error); - Py_CLEAR(clear_module_state->__pyx_kp_s_fast_pyx); Py_CLEAR(clear_module_state->__pyx_n_s_flags); Py_CLEAR(clear_module_state->__pyx_n_s_float); Py_CLEAR(clear_module_state->__pyx_n_s_float32); @@ -4035,8 +4073,8 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non); Py_CLEAR(clear_module_state->__pyx_n_s_np); Py_CLEAR(clear_module_state->__pyx_n_s_numpy); - Py_CLEAR(clear_module_state->__pyx_kp_s_numpy_core_multiarray_failed_to); - Py_CLEAR(clear_module_state->__pyx_kp_s_numpy_core_umath_failed_to_impor); + Py_CLEAR(clear_module_state->__pyx_kp_u_numpy__core_multiarray_failed_to); + Py_CLEAR(clear_module_state->__pyx_kp_u_numpy__core_umath_failed_to_impo); Py_CLEAR(clear_module_state->__pyx_n_s_obj); Py_CLEAR(clear_module_state->__pyx_n_s_pack); Py_CLEAR(clear_module_state->__pyx_n_s_pickle); @@ -4063,6 +4101,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_size); Py_CLEAR(clear_module_state->__pyx_n_s_spec); Py_CLEAR(clear_module_state->__pyx_n_s_split); + Py_CLEAR(clear_module_state->__pyx_kp_s_src_pytesmo_metrics__fast_pyx); Py_CLEAR(clear_module_state->__pyx_n_s_start); Py_CLEAR(clear_module_state->__pyx_n_s_step); Py_CLEAR(clear_module_state->__pyx_n_s_stop); @@ -4226,7 +4265,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_encode); Py_VISIT(traverse_module_state->__pyx_n_s_enumerate); Py_VISIT(traverse_module_state->__pyx_n_s_error); - Py_VISIT(traverse_module_state->__pyx_kp_s_fast_pyx); Py_VISIT(traverse_module_state->__pyx_n_s_flags); Py_VISIT(traverse_module_state->__pyx_n_s_float); Py_VISIT(traverse_module_state->__pyx_n_s_float32); @@ -4261,8 +4299,8 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non); Py_VISIT(traverse_module_state->__pyx_n_s_np); Py_VISIT(traverse_module_state->__pyx_n_s_numpy); - Py_VISIT(traverse_module_state->__pyx_kp_s_numpy_core_multiarray_failed_to); - Py_VISIT(traverse_module_state->__pyx_kp_s_numpy_core_umath_failed_to_impor); + Py_VISIT(traverse_module_state->__pyx_kp_u_numpy__core_multiarray_failed_to); + Py_VISIT(traverse_module_state->__pyx_kp_u_numpy__core_umath_failed_to_impo); Py_VISIT(traverse_module_state->__pyx_n_s_obj); Py_VISIT(traverse_module_state->__pyx_n_s_pack); Py_VISIT(traverse_module_state->__pyx_n_s_pickle); @@ -4289,6 +4327,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_size); Py_VISIT(traverse_module_state->__pyx_n_s_spec); Py_VISIT(traverse_module_state->__pyx_n_s_split); + Py_VISIT(traverse_module_state->__pyx_kp_s_src_pytesmo_metrics__fast_pyx); Py_VISIT(traverse_module_state->__pyx_n_s_start); Py_VISIT(traverse_module_state->__pyx_n_s_step); Py_VISIT(traverse_module_state->__pyx_n_s_stop); @@ -4490,7 +4529,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_encode __pyx_mstate_global->__pyx_n_s_encode #define __pyx_n_s_enumerate __pyx_mstate_global->__pyx_n_s_enumerate #define __pyx_n_s_error __pyx_mstate_global->__pyx_n_s_error -#define __pyx_kp_s_fast_pyx __pyx_mstate_global->__pyx_kp_s_fast_pyx #define __pyx_n_s_flags __pyx_mstate_global->__pyx_n_s_flags #define __pyx_n_s_float __pyx_mstate_global->__pyx_n_s_float #define __pyx_n_s_float32 __pyx_mstate_global->__pyx_n_s_float32 @@ -4525,8 +4563,8 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non #define __pyx_n_s_np __pyx_mstate_global->__pyx_n_s_np #define __pyx_n_s_numpy __pyx_mstate_global->__pyx_n_s_numpy -#define __pyx_kp_s_numpy_core_multiarray_failed_to __pyx_mstate_global->__pyx_kp_s_numpy_core_multiarray_failed_to -#define __pyx_kp_s_numpy_core_umath_failed_to_impor __pyx_mstate_global->__pyx_kp_s_numpy_core_umath_failed_to_impor +#define __pyx_kp_u_numpy__core_multiarray_failed_to __pyx_mstate_global->__pyx_kp_u_numpy__core_multiarray_failed_to +#define __pyx_kp_u_numpy__core_umath_failed_to_impo __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo #define __pyx_n_s_obj __pyx_mstate_global->__pyx_n_s_obj #define __pyx_n_s_pack __pyx_mstate_global->__pyx_n_s_pack #define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle @@ -4553,6 +4591,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_size __pyx_mstate_global->__pyx_n_s_size #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec #define __pyx_n_s_split __pyx_mstate_global->__pyx_n_s_split +#define __pyx_kp_s_src_pytesmo_metrics__fast_pyx __pyx_mstate_global->__pyx_kp_s_src_pytesmo_metrics__fast_pyx #define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start #define __pyx_n_s_step __pyx_mstate_global->__pyx_n_s_step #define __pyx_n_s_stop __pyx_mstate_global->__pyx_n_s_stop @@ -4788,10 +4827,11 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + unsigned int __pyx_t_7; char *__pyx_t_8; - Py_ssize_t __pyx_t_9; - Py_UCS4 __pyx_t_10; + int __pyx_t_9; + Py_ssize_t __pyx_t_10; + Py_UCS4 __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -5017,7 +5057,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ * if dim <= 0: * raise ValueError, f"Invalid shape in axis {idx}: {dim}." */ - __pyx_t_7 = 0; + __pyx_t_9 = 0; __pyx_t_4 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0; for (;;) { @@ -5034,11 +5074,11 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif - __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 159, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_dim = __pyx_t_9; - __pyx_v_idx = __pyx_t_7; - __pyx_t_7 = (__pyx_t_7 + 1); + __pyx_v_dim = __pyx_t_10; + __pyx_v_idx = __pyx_t_9; + __pyx_t_9 = (__pyx_t_9 + 1); /* "View.MemoryView":160 * @@ -5059,33 +5099,33 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ */ __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = 0; - __pyx_t_10 = 127; + __pyx_t_10 = 0; + __pyx_t_11 = 127; __Pyx_INCREF(__pyx_kp_u_Invalid_shape_in_axis); - __pyx_t_9 += 22; + __pyx_t_10 += 22; __Pyx_GIVEREF(__pyx_kp_u_Invalid_shape_in_axis); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Invalid_shape_in_axis); __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_idx, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_kp_u_); - __pyx_t_9 += 2; + __pyx_t_10 += 2; __Pyx_GIVEREF(__pyx_kp_u_); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_); __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_kp_u__2); - __pyx_t_9 += 1; + __pyx_t_10 += 1; __Pyx_GIVEREF(__pyx_kp_u__2); PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__2); - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0); @@ -5269,7 +5309,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ * * @cname('getbuffer') */ - __pyx_t_7 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(1, 180, __pyx_L1_error) + __pyx_t_9 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 180, __pyx_L1_error) /* "View.MemoryView":179 * self.dtype_is_object = format == b'O' @@ -8424,7 +8464,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit * * if have_slices: # <<<<<<<<<<<<<< * obj = self.is_slice(value) - * if obj: + * if obj is not None: */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 426, __pyx_L1_error) if (__pyx_t_4) { @@ -8433,7 +8473,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit * * if have_slices: * obj = self.is_slice(value) # <<<<<<<<<<<<<< - * if obj: + * if obj is not None: * self.setitem_slice_assignment(self[index], obj) */ __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 427, __pyx_L1_error) @@ -8444,16 +8484,16 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit /* "View.MemoryView":428 * if have_slices: * obj = self.is_slice(value) - * if obj: # <<<<<<<<<<<<<< + * if obj is not None: # <<<<<<<<<<<<<< * self.setitem_slice_assignment(self[index], obj) * else: */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 428, __pyx_L1_error) + __pyx_t_4 = (__pyx_v_obj != Py_None); if (__pyx_t_4) { /* "View.MemoryView":429 * obj = self.is_slice(value) - * if obj: + * if obj is not None: * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<< * else: * self.setitem_slice_assign_scalar(self[index], value) @@ -8468,7 +8508,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit /* "View.MemoryView":428 * if have_slices: * obj = self.is_slice(value) - * if obj: # <<<<<<<<<<<<<< + * if obj is not None: # <<<<<<<<<<<<<< * self.setitem_slice_assignment(self[index], obj) * else: */ @@ -8498,7 +8538,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit * * if have_slices: # <<<<<<<<<<<<<< * obj = self.is_slice(value) - * if obj: + * if obj is not None: */ goto __pyx_L4; } @@ -9206,9 +9246,10 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; + unsigned int __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; + int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -9363,11 +9404,11 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 498, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_7); + __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_6); __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; - if (__pyx_t_8) { + if (__pyx_t_11) { __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 498, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_6); @@ -9452,7 +9493,7 @@ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryvie PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; + unsigned int __pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; @@ -17926,7 +17967,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSE int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; + unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -18108,7 +18149,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; + unsigned int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -18228,33 +18269,33 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":245 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286 * * @property - * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<< - * """Returns a borrowed reference to the object owning the data/memory. - * """ + * cdef inline npy_intp itemsize(self) noexcept nogil: # <<<<<<<<<<<<<< + * return PyDataType_ELSIZE(self) + * */ -static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) { - PyObject *__pyx_r; +static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self) { + npy_intp __pyx_r; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":248 - * """Returns a borrowed reference to the object owning the data/memory. - * """ - * return PyArray_BASE(self) # <<<<<<<<<<<<<< + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":287 + * @property + * cdef inline npy_intp itemsize(self) noexcept nogil: + * return PyDataType_ELSIZE(self) # <<<<<<<<<<<<<< * * @property */ - __pyx_r = PyArray_BASE(__pyx_v_self); + __pyx_r = PyDataType_ELSIZE(__pyx_v_self); goto __pyx_L0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":245 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286 * * @property - * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<< - * """Returns a borrowed reference to the object owning the data/memory. - * """ + * cdef inline npy_intp itemsize(self) noexcept nogil: # <<<<<<<<<<<<<< + * return PyDataType_ELSIZE(self) + * */ /* function exit code */ @@ -18262,109 +18303,151 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":251 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290 * * @property - * cdef inline dtype descr(self): # <<<<<<<<<<<<<< - * """Returns an owned reference to the dtype of the array. - * """ + * cdef inline npy_intp alignment(self) noexcept nogil: # <<<<<<<<<<<<<< + * return PyDataType_ALIGNMENT(self) + * */ -static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self) { - PyArray_Descr *__pyx_r = NULL; +static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self) { + npy_intp __pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":291 + * @property + * cdef inline npy_intp alignment(self) noexcept nogil: + * return PyDataType_ALIGNMENT(self) # <<<<<<<<<<<<<< + * + * # Use fields/names with care as they may be NULL. You must check + */ + __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290 + * + * @property + * cdef inline npy_intp alignment(self) noexcept nogil: # <<<<<<<<<<<<<< + * return PyDataType_ALIGNMENT(self) + * + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296 + * # for this using PyDataType_HASFIELDS. + * @property + * cdef inline object fields(self): # <<<<<<<<<<<<<< + * return PyDataType_FIELDS(self) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self) { + PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - PyArray_Descr *__pyx_t_1; - __Pyx_RefNannySetupContext("descr", 1); + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("fields", 1); - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":254 - * """Returns an owned reference to the dtype of the array. - * """ - * return PyArray_DESCR(self) # <<<<<<<<<<<<<< + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":297 + * @property + * cdef inline object fields(self): + * return PyDataType_FIELDS(self) # <<<<<<<<<<<<<< * * @property */ - __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_1 = PyArray_DESCR(__pyx_v_self); - __Pyx_INCREF((PyObject *)((PyArray_Descr *)__pyx_t_1)); - __pyx_r = ((PyArray_Descr *)__pyx_t_1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); goto __pyx_L0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":251 - * + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296 + * # for this using PyDataType_HASFIELDS. * @property - * cdef inline dtype descr(self): # <<<<<<<<<<<<<< - * """Returns an owned reference to the dtype of the array. - * """ + * cdef inline object fields(self): # <<<<<<<<<<<<<< + * return PyDataType_FIELDS(self) + * */ /* function exit code */ __pyx_L0:; - __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":257 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300 * * @property - * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<< - * """Returns the number of dimensions in the array. - * """ + * cdef inline tuple names(self): # <<<<<<<<<<<<<< + * return PyDataType_NAMES(self) + * */ -static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) { - int __pyx_r; +static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("names", 1); - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":260 - * """Returns the number of dimensions in the array. - * """ - * return PyArray_NDIM(self) # <<<<<<<<<<<<<< - * + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":301 * @property + * cdef inline tuple names(self): + * return PyDataType_NAMES(self) # <<<<<<<<<<<<<< + * + * # Use PyDataType_HASSUBARRAY to test whether this field is */ - __pyx_r = PyArray_NDIM(__pyx_v_self); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDataType_NAMES(__pyx_v_self); + __Pyx_INCREF(((PyObject*)__pyx_t_1)); + __pyx_r = ((PyObject*)__pyx_t_1); goto __pyx_L0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":257 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300 * * @property - * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<< - * """Returns the number of dimensions in the array. - * """ + * cdef inline tuple names(self): # <<<<<<<<<<<<<< + * return PyDataType_NAMES(self) + * */ /* function exit code */ __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":263 - * +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":307 + * # this field via the inline helper method PyDataType_SHAPE. * @property - * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<< - * """Returns a pointer to the dimensions/shape of the array. - * The number of elements matches the number of dimensions of the array (ndim). + * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil: # <<<<<<<<<<<<<< + * return PyDataType_SUBARRAY(self) + * */ -static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) { - npy_intp *__pyx_r; +static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self) { + PyArray_ArrayDescr *__pyx_r; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":268 - * Can return NULL for 0-dimensional arrays. - * """ - * return PyArray_DIMS(self) # <<<<<<<<<<<<<< + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":308 + * @property + * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil: + * return PyDataType_SUBARRAY(self) # <<<<<<<<<<<<<< * * @property */ - __pyx_r = PyArray_DIMS(__pyx_v_self); + __pyx_r = PyDataType_SUBARRAY(__pyx_v_self); goto __pyx_L0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":263 - * + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":307 + * # this field via the inline helper method PyDataType_SHAPE. * @property - * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<< - * """Returns a pointer to the dimensions/shape of the array. - * The number of elements matches the number of dimensions of the array (ndim). + * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil: # <<<<<<<<<<<<<< + * return PyDataType_SUBARRAY(self) + * */ /* function exit code */ @@ -18372,33 +18455,33 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":271 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311 * * @property - * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<< - * """Returns a pointer to the strides of the array. - * The number of elements matches the number of dimensions of the array (ndim). + * cdef inline npy_uint64 flags(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The data types flags.""" + * return PyDataType_FLAGS(self) */ -static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) { - npy_intp *__pyx_r; +static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self) { + npy_uint64 __pyx_r; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":275 - * The number of elements matches the number of dimensions of the array (ndim). - * """ - * return PyArray_STRIDES(self) # <<<<<<<<<<<<<< + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * * - * @property */ - __pyx_r = PyArray_STRIDES(__pyx_v_self); + __pyx_r = PyDataType_FLAGS(__pyx_v_self); goto __pyx_L0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":271 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311 * * @property - * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<< - * """Returns a pointer to the strides of the array. - * The number of elements matches the number of dimensions of the array (ndim). + * cdef inline npy_uint64 flags(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The data types flags.""" + * return PyDataType_FLAGS(self) */ /* function exit code */ @@ -18406,33 +18489,33 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":278 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323 * * @property - * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<< - * """Returns the total size (in number of elements) of the array. - * """ + * 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) */ -static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) { - npy_intp __pyx_r; +static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self) { + int __pyx_r; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":281 - * """Returns the total size (in number of elements) of the array. - * """ - * return PyArray_SIZE(self) # <<<<<<<<<<<<<< + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< * * @property */ - __pyx_r = PyArray_SIZE(__pyx_v_self); + __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self); goto __pyx_L0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":278 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323 * * @property - * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<< - * """Returns the total size (in number of elements) of the array. - * """ + * 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) */ /* function exit code */ @@ -18440,33 +18523,33 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":284 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328 * * @property - * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<< - * """The pointer to the data buffer as a char*. - * This is provided for legacy reasons to avoid direct struct field access. + * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The total broadcasted size.""" + * return PyArray_MultiIter_SIZE(self) */ -static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) { - char *__pyx_r; +static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self) { + npy_intp __pyx_r; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":290 - * of `PyArray_DATA()` instead, which returns a 'void*'. - * """ - * return PyArray_BYTES(self) # <<<<<<<<<<<<<< + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< * - * ctypedef unsigned char npy_bool + * @property */ - __pyx_r = PyArray_BYTES(__pyx_v_self); + __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self); goto __pyx_L0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":284 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328 * * @property - * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<< - * """The pointer to the data buffer as a char*. - * This is provided for legacy reasons to avoid direct struct field access. + * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The total broadcasted size.""" + * return PyArray_MultiIter_SIZE(self) */ /* function exit code */ @@ -18474,111 +18557,493 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":773 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(1, a) +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333 * + * @property + * cdef inline npy_intp index(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The current (1-d) index into the broadcasted result.""" + * return PyArray_MultiIter_INDEX(self) */ -static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1); +static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self) { + npy_intp __pyx_r; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":774 - * - * cdef inline object PyArray_MultiIterNew1(a): - * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< * - * cdef inline object PyArray_MultiIterNew2(a, b): + * @property */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 774, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self); goto __pyx_L0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":773 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(1, a) + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333 * + * @property + * cdef inline npy_intp index(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The current (1-d) index into the broadcasted result.""" + * return PyArray_MultiIter_INDEX(self) */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":776 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(2, a, b) +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338 * + * @property + * cdef inline int nd(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The number of dimensions in the broadcasted result.""" + * return PyArray_MultiIter_NDIM(self) */ -static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 1); +static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self) { + int __pyx_r; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":777 - * - * cdef inline object PyArray_MultiIterNew2(a, b): - * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< * - * cdef inline object PyArray_MultiIterNew3(a, b, c): + * @property */ - __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(2, 777, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self); goto __pyx_L0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":776 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(2, a, b) + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338 * + * @property + * cdef inline int nd(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The number of dimensions in the broadcasted result.""" + * return PyArray_MultiIter_NDIM(self) */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":779 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(3, a, b, c) +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343 + * + * @property + * cdef inline npy_intp* dimensions(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The shape of the broadcasted result.""" + * return PyArray_MultiIter_DIMS(self) + */ + +static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self) { + npy_intp *__pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343 + * + * @property + * cdef inline npy_intp* dimensions(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The shape of the broadcasted result.""" + * return PyArray_MultiIter_DIMS(self) + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348 + * + * @property + * cdef inline void** iters(self) noexcept nogil: # <<<<<<<<<<<<<< + * """An array of iterator objects that holds the iterators for the arrays to be broadcast together. + * On return, the iterators are adjusted for broadcasting.""" + */ + +static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self) { + void **__pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348 + * + * @property + * cdef inline void** iters(self) noexcept nogil: # <<<<<<<<<<<<<< + * """An array of iterator objects that holds the iterators for the arrays to be broadcast together. + * On return, the iterators are adjusted for broadcasting.""" + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366 + * + * @property + * cdef inline PyObject* base(self) noexcept nogil: # <<<<<<<<<<<<<< + * """Returns a borrowed reference to the object owning the data/memory. + * """ + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) { + PyObject *__pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyArray_BASE(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366 + * + * @property + * cdef inline PyObject* base(self) noexcept nogil: # <<<<<<<<<<<<<< + * """Returns a borrowed reference to the object owning the data/memory. + * """ + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372 + * + * @property + * cdef inline dtype descr(self): # <<<<<<<<<<<<<< + * """Returns an owned reference to the dtype of the array. + * """ + */ + +static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self) { + PyArray_Descr *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyArray_Descr *__pyx_t_1; + __Pyx_RefNannySetupContext("descr", 1); + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = PyArray_DESCR(__pyx_v_self); + __Pyx_INCREF((PyObject *)((PyArray_Descr *)__pyx_t_1)); + __pyx_r = ((PyArray_Descr *)__pyx_t_1); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372 + * + * @property + * cdef inline dtype descr(self): # <<<<<<<<<<<<<< + * """Returns an owned reference to the dtype of the array. + * """ + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378 + * + * @property + * cdef inline int ndim(self) noexcept nogil: # <<<<<<<<<<<<<< + * """Returns the number of dimensions in the array. + * """ + */ + +static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) { + int __pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":381 + * """Returns the number of dimensions in the array. + * """ + * return PyArray_NDIM(self) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyArray_NDIM(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378 + * + * @property + * cdef inline int ndim(self) noexcept nogil: # <<<<<<<<<<<<<< + * """Returns the number of dimensions in the array. + * """ + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384 + * + * @property + * cdef inline npy_intp *shape(self) noexcept nogil: # <<<<<<<<<<<<<< + * """Returns a pointer to the dimensions/shape of the array. + * The number of elements matches the number of dimensions of the array (ndim). + */ + +static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) { + npy_intp *__pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":389 + * Can return NULL for 0-dimensional arrays. + * """ + * return PyArray_DIMS(self) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyArray_DIMS(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384 + * + * @property + * cdef inline npy_intp *shape(self) noexcept nogil: # <<<<<<<<<<<<<< + * """Returns a pointer to the dimensions/shape of the array. + * The number of elements matches the number of dimensions of the array (ndim). + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392 + * + * @property + * cdef inline npy_intp *strides(self) noexcept nogil: # <<<<<<<<<<<<<< + * """Returns a pointer to the strides of the array. + * The number of elements matches the number of dimensions of the array (ndim). + */ + +static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) { + npy_intp *__pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyArray_STRIDES(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392 + * + * @property + * cdef inline npy_intp *strides(self) noexcept nogil: # <<<<<<<<<<<<<< + * """Returns a pointer to the strides of the array. + * The number of elements matches the number of dimensions of the array (ndim). + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399 + * + * @property + * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< + * """Returns the total size (in number of elements) of the array. + * """ + */ + +static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) { + npy_intp __pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyArray_SIZE(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399 + * + * @property + * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< + * """Returns the total size (in number of elements) of the array. + * """ + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405 + * + * @property + * cdef inline char* data(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The pointer to the data buffer as a char*. + * This is provided for legacy reasons to avoid direct struct field access. + */ + +static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) { + char *__pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":411 + * of `PyArray_DATA()` instead, which returns a 'void*'. + * """ + * return PyArray_BYTES(self) # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = PyArray_BYTES(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405 + * + * @property + * cdef inline char* data(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The pointer to the data buffer as a char*. + * This is provided for legacy reasons to avoid direct struct field access. + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806 + * ctypedef long double complex clongdouble_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1); + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":807 + * + * cdef inline object PyArray_MultiIterNew1(a): + * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< + * + * 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(2, 807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806 + * ctypedef long double complex clongdouble_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 1); + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":810 + * + * cdef inline object PyArray_MultiIterNew2(a, b): + * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< + * + * 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(2, 810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) * */ @@ -18591,7 +19056,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 1); - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":780 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< @@ -18599,13 +19064,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(2, 780, __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(2, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":779 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -18624,7 +19089,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":782 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -18641,7 +19106,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 1); - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":783 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< @@ -18649,13 +19114,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(2, 783, __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(2, 816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":782 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -18674,7 +19139,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":785 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -18691,7 +19156,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 1); - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":786 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< @@ -18699,13 +19164,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(2, 786, __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(2, 819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":785 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -18724,7 +19189,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":788 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -18736,9 +19201,10 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; + PyObject *__pyx_t_2; __Pyx_RefNannySetupContext("PyDataType_SHAPE", 1); - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":789 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -18748,7 +19214,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d); if (__pyx_t_1) { - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":790 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< @@ -18756,11 +19222,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ * return () */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); - __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); + __pyx_t_2 = __pyx_f_5numpy_5dtype_8subarray_subarray(__pyx_v_d)->shape; + __Pyx_INCREF(((PyObject*)__pyx_t_2)); + __pyx_r = ((PyObject*)__pyx_t_2); goto __pyx_L0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":789 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -18769,7 +19236,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ */ } - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":792 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":825 * return d.subarray.shape * else: * return () # <<<<<<<<<<<<<< @@ -18783,7 +19250,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ goto __pyx_L0; } - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":788 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -18798,10 +19265,10 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":968 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< + * 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) */ @@ -18812,28 +19279,28 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":969 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1010 * - * cdef inline void set_array_base(ndarray arr, object base): + * 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) * */ Py_INCREF(__pyx_v_base); - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":970 - * cdef inline void set_array_base(ndarray arr, object base): + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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(2, 970, __pyx_L1_error) + __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 1011, __pyx_L1_error) - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":968 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< + * 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) */ @@ -18845,7 +19312,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a __pyx_L0:; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":972 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -18860,7 +19327,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 1); - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":973 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1014 * * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< @@ -18869,7 +19336,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ __pyx_v_base = PyArray_BASE(__pyx_v_arr); - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":974 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< @@ -18879,7 +19346,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_t_1 = (__pyx_v_base == NULL); if (__pyx_t_1) { - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":975 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1016 * base = PyArray_BASE(arr) * if base is NULL: * return None # <<<<<<<<<<<<<< @@ -18890,7 +19357,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":974 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< @@ -18899,7 +19366,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ } - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":976 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1017 * if base is NULL: * return None * return base # <<<<<<<<<<<<<< @@ -18911,7 +19378,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = ((PyObject *)__pyx_v_base); goto __pyx_L0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":972 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -18926,7 +19393,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":980 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< @@ -18950,7 +19417,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_array", 1); - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -18966,16 +19433,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":982 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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") + * raise ImportError("numpy._core.multiarray failed to import") */ - __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 982, __pyx_L3_error) + __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1023, __pyx_L3_error) - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -18989,37 +19456,37 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":983 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1024 * try: * __pyx_import_array() * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") + * raise ImportError("numpy._core.multiarray failed to import") * */ __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(2, 983, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1024, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":984 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025 * __pyx_import_array() * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< + * 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__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 984, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 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(2, 984, __pyx_L5_except_error) + __PYX_ERR(2, 1025, __pyx_L5_except_error) } goto __pyx_L5_except_error; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19035,7 +19502,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __pyx_L8_try_end:; } - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":980 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< @@ -19058,8 +19525,8 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":986 - * raise ImportError("numpy.core.multiarray failed to import") +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< * try: @@ -19082,7 +19549,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_umath", 1); - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -19098,16 +19565,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":988 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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") + * raise ImportError("numpy._core.umath failed to import") */ - __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 988, __pyx_L3_error) + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1029, __pyx_L3_error) - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -19121,37 +19588,37 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":989 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1030 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") + * raise ImportError("numpy._core.umath failed to import") * */ __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(2, 989, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1030, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":990 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031 * _import_umath() * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * 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__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 990, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 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(2, 990, __pyx_L5_except_error) + __PYX_ERR(2, 1031, __pyx_L5_except_error) } goto __pyx_L5_except_error; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -19167,8 +19634,8 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __pyx_L8_try_end:; } - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":986 - * raise ImportError("numpy.core.multiarray failed to import") + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< * try: @@ -19190,8 +19657,8 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":992 - * raise ImportError("numpy.core.umath failed to import") +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< * try: @@ -19214,7 +19681,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_ufunc", 1); - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -19230,16 +19697,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":994 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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") + * raise ImportError("numpy._core.umath failed to import") */ - __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 994, __pyx_L3_error) + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1035, __pyx_L3_error) - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -19253,37 +19720,37 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":995 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1036 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") + * raise ImportError("numpy._core.umath failed to import") * */ __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(2, 995, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1036, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":996 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1037 * _import_umath() * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<< * * */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 996, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 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(2, 996, __pyx_L5_except_error) + __PYX_ERR(2, 1037, __pyx_L5_except_error) } goto __pyx_L5_except_error; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -19299,8 +19766,8 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __pyx_L8_try_end:; } - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":992 - * raise ImportError("numpy.core.umath failed to import") + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< * try: @@ -19322,10 +19789,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":999 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040 * * - * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< + * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<< * """ * Cython equivalent of `isinstance(obj, np.timedelta64)` */ @@ -19333,7 +19800,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; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1011 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1052 * bool * """ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< @@ -19343,10 +19810,10 @@ 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; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":999 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040 * * - * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< + * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<< * """ * Cython equivalent of `isinstance(obj, np.timedelta64)` */ @@ -19356,10 +19823,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1014 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055 * * - * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< + * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<< * """ * Cython equivalent of `isinstance(obj, np.datetime64)` */ @@ -19367,7 +19834,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; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1026 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1067 * bool * """ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< @@ -19377,10 +19844,10 @@ 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; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1014 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055 * * - * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< + * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<< * """ * Cython equivalent of `isinstance(obj, np.datetime64)` */ @@ -19390,10 +19857,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1029 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070 * * - * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< * """ * returns the int64 value underlying scalar numpy datetime64 object */ @@ -19401,7 +19868,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; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1036 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1077 * also needed. That can be found using `get_datetime64_unit`. * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -19411,10 +19878,10 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1029 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070 * * - * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< * """ * returns the int64 value underlying scalar numpy datetime64 object */ @@ -19424,10 +19891,10 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1039 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080 * * - * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< * """ * returns the int64 value underlying scalar numpy timedelta64 object */ @@ -19435,7 +19902,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; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1043 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1084 * returns the int64 value underlying scalar numpy timedelta64 object * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -19445,10 +19912,10 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1039 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080 * * - * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< * """ * returns the int64 value underlying scalar numpy timedelta64 object */ @@ -19458,10 +19925,10 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject return __pyx_r; } -/* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1046 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087 * * - * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<< * """ * returns the unit part of the dtype for a numpy datetime64 object. */ @@ -19469,18 +19936,20 @@ 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; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1050 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< + * + * */ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); goto __pyx_L0; - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1046 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087 * * - * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<< * """ * returns the unit part of the dtype for a numpy datetime64 object. */ @@ -19490,7 +19959,7 @@ static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObjec return __pyx_r; } -/* "pytesmo/metrics/_fast.pyx":11 +/* "pytesmo/metrics/_fast.pyx":12 * * * cpdef _moments_welford_nd(floating [:,:] X): # <<<<<<<<<<<<<< @@ -19500,7 +19969,7 @@ static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObjec /* Python wrapper */ static PyObject *__pyx_pw_7pytesmo_7metrics_5_fast_1_moments_welford_nd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -PyDoc_STRVAR(__pyx_doc_7pytesmo_7metrics_5_fast__moments_welford_nd, "\n Calculates means, variances, and covariance of the given input array using\n Welford's algorithm.\n\n Parameters\n ----------\n X : numpy.ndarray\n num_samples x num_datasets data array\n\n Returns\n -------\n mean : numpy.ndarray\n Array of means (length num_datasets)\n cov : numpy.ndarray\n Covariance matrix (num_datasets x num_datasets)\n "); +PyDoc_STRVAR(__pyx_doc_7pytesmo_7metrics_5_fast__moments_welford_nd, "_moments_welford_nd(signatures, args, kwargs, defaults, _fused_sigindex={})\n\n Calculates means, variances, and covariance of the given input array using\n Welford's algorithm.\n\n Parameters\n ----------\n X : numpy.ndarray\n num_samples x num_datasets data array\n\n Returns\n -------\n mean : numpy.ndarray\n Array of means (length num_datasets)\n cov : numpy.ndarray\n Covariance matrix (num_datasets x num_datasets)\n "); static PyMethodDef __pyx_mdef_7pytesmo_7metrics_5_fast_1_moments_welford_nd = {"_moments_welford_nd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7pytesmo_7metrics_5_fast_1_moments_welford_nd, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7pytesmo_7metrics_5_fast__moments_welford_nd}; static PyObject *__pyx_pw_7pytesmo_7metrics_5_fast_1_moments_welford_nd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_signatures = 0; @@ -19550,7 +20019,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_5_fast_1_moments_welford_nd(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -19558,9 +20027,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_5_fast_1_moments_welford_nd(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 11, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 12, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -19568,9 +20037,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_5_fast_1_moments_welford_nd(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 11, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 12, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -19578,21 +20047,21 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_5_fast_1_moments_welford_nd(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 11, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 12, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 11, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 12, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -19614,7 +20083,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_5_fast_1_moments_welford_nd(PyObject } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 11, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 12, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -19685,18 +20154,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; - Py_ssize_t __pyx_t_18; - int __pyx_t_19; + unsigned int __pyx_t_18; + Py_ssize_t __pyx_t_19; + int __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_moments_welford_nd", 0); __Pyx_INCREF(__pyx_v_kwargs); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 11, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 12, __pyx_L1_error); __pyx_v_dest_sig = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_v_kwargs != Py_None); @@ -19705,7 +20175,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_3); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; @@ -19713,21 +20183,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None); } - __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_v_itemsize = -1L; if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 12, __pyx_L1_error) __pyx_t_2 = (0 < __pyx_t_5); if (__pyx_t_2) { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0); __Pyx_INCREF(__pyx_t_1); @@ -19743,17 +20213,17 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_X, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_X, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L7_bool_binop_done:; if (likely(__pyx_t_2)) { if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_X); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_X); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_arg = __pyx_t_1; __pyx_t_1 = 0; @@ -19762,31 +20232,31 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN /*else*/ { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 11, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 12, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_1)) __PYX_ERR(0, 11, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_1)) __PYX_ERR(0, 12, __pyx_L1_error); __Pyx_INCREF(__pyx_kp_s__11); __Pyx_GIVEREF(__pyx_kp_s__11); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_kp_s__11)) __PYX_ERR(0, 11, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_kp_s__11)) __PYX_ERR(0, 12, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } __pyx_L6:; while (1) { @@ -19794,7 +20264,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN if (__pyx_t_2) { __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -19802,13 +20272,13 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN } __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_base = __pyx_t_6; __pyx_t_6 = 0; __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -19829,14 +20299,14 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN __pyx_v_itemsize = -1L; __pyx_t_2 = (__pyx_v_dtype != Py_None); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_itemsize = __pyx_t_5; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_kind = __pyx_t_7; __pyx_v_dtype_signed = (__pyx_v_kind == 0x69); @@ -19851,15 +20321,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN __pyx_t_2 = __pyx_t_4; goto __pyx_L16_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 2); __pyx_t_2 = __pyx_t_4; __pyx_L16_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 12, __pyx_L1_error) goto __pyx_L10_break; } __pyx_t_4 = ((sizeof(double)) == __pyx_v_itemsize); @@ -19868,15 +20338,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN __pyx_t_2 = __pyx_t_4; goto __pyx_L19_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 2); __pyx_t_2 = __pyx_t_4; __pyx_L19_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 12, __pyx_L1_error) goto __pyx_L10_break; } break; @@ -19890,7 +20360,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN } __pyx_t_2 = (__pyx_v_arg == Py_None); if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 12, __pyx_L1_error) goto __pyx_L10_break; } { @@ -19901,7 +20371,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L22_error) + __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_as_memoryview = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; @@ -19912,7 +20382,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN goto __pyx_L33_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(float))); if (!__pyx_t_4) { } else { @@ -19926,7 +20396,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN goto __pyx_L31_bool_binop_done; } __pyx_L32_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 2); __pyx_t_2 = __pyx_t_4; __pyx_L31_bool_binop_done:; @@ -19936,7 +20406,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 11, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 12, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -19948,7 +20418,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN goto __pyx_L39_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(double))); if (!__pyx_t_4) { } else { @@ -19962,7 +20432,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN goto __pyx_L37_bool_binop_done; } __pyx_L38_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 2); __pyx_t_2 = __pyx_t_4; __pyx_L37_bool_binop_done:; @@ -19972,7 +20442,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 11, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 12, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -19990,7 +20460,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN __pyx_t_11 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_ValueError, __pyx_builtin_TypeError); if (__pyx_t_11) { __Pyx_AddTraceback("pytesmo.metrics._fast.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 11, __pyx_L24_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 12, __pyx_L24_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_13); @@ -20019,19 +20489,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L29_try_end:; } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 12, __pyx_L1_error) goto __pyx_L10_break; } __pyx_L10_break:; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_2); if (__pyx_t_4) { __pyx_t_5 = 0; if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = __pyx_t_1; @@ -20039,7 +20509,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN while (1) { __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_13, __pyx_t_14, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_11); if (unlikely(__pyx_t_15 == 0)) break; - if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1); __pyx_t_1 = 0; @@ -20047,10 +20517,10 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16); @@ -20059,23 +20529,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_kp_s__12}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_16); @@ -20084,34 +20554,34 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s__13}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_18 = PyList_GET_SIZE(__pyx_t_16); - if (unlikely(__pyx_t_18 < 1)) { - __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_18); __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_19 = PyList_GET_SIZE(__pyx_t_16); + if (unlikely(__pyx_t_19 < 1)) { + __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_19); __PYX_ERR(0, 12, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_19-1); ((PyVarObject*)__pyx_t_16)->ob_size--; #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_19-1); #endif __Pyx_GOTREF(__pyx_t_6); #if !CYTHON_COMPILING_IN_CPYTHON - __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_18-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_19-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = __pyx_t_17; __pyx_t_17 = NULL; @@ -20123,36 +20593,36 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) if (__pyx_t_4) { - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -20161,9 +20631,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN /*else*/ { if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = __pyx_t_6; __Pyx_INCREF(__pyx_t_16); @@ -20176,21 +20646,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 12, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } - __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v__fused_sigindex); __Pyx_GIVEREF(__pyx_v__fused_sigindex); - if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 11, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 12, __pyx_L1_error); __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_13); @@ -20199,23 +20669,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #endif if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; @@ -20227,25 +20697,25 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -20255,85 +20725,85 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L53; } /*else*/ { - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sigindex_matches); __Pyx_GIVEREF(__pyx_v_sigindex_matches); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 11, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 12, __pyx_L1_error); __Pyx_INCREF(__pyx_v_sigindex_candidates); __Pyx_GIVEREF(__pyx_v_sigindex_candidates); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 11, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 12, __pyx_L1_error); __pyx_t_16 = __pyx_t_1; __Pyx_INCREF(__pyx_t_16); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_5 >= 2) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; if (unlikely(__pyx_v_search_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__pyx_v_type_match != Py_None); if (__pyx_t_4) { - __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 12, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -20370,28 +20840,28 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast__moments_welford_nd(CYTHON_UN __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0); __pyx_t_4 = (!__pyx_t_2); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 12, __pyx_L1_error) __pyx_t_4 = (__pyx_t_14 > 1); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } /*else*/ { __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_r = __pyx_t_13; __pyx_t_13 = 0; @@ -20478,7 +20948,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0_moments_welford_nd", 1); - /* "pytesmo/metrics/_fast.pyx":33 + /* "pytesmo/metrics/_fast.pyx":34 * cdef floating [:] oldmean * cdef floating [:,:] C * n = X.shape[0] # <<<<<<<<<<<<<< @@ -20487,7 +20957,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n */ __pyx_v_n = (__pyx_v_X.shape[0]); - /* "pytesmo/metrics/_fast.pyx":34 + /* "pytesmo/metrics/_fast.pyx":35 * cdef floating [:,:] C * n = X.shape[0] * d = X.shape[1] # <<<<<<<<<<<<<< @@ -20496,131 +20966,131 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n */ __pyx_v_d = (__pyx_v_X.shape[1]); - /* "pytesmo/metrics/_fast.pyx":37 + /* "pytesmo/metrics/_fast.pyx":38 * * if floating is float: * dtype = np.float32 # <<<<<<<<<<<<<< * else: * dtype = np.float64 */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_float32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dtype = __pyx_t_2; __pyx_t_2 = 0; - /* "pytesmo/metrics/_fast.pyx":41 + /* "pytesmo/metrics/_fast.pyx":42 * dtype = np.float64 * * mean = np.zeros(d, dtype=dtype) # <<<<<<<<<<<<<< * oldmean = np.zeros(d, dtype=dtype) * C = np.zeros((d, d), dtype=dtype) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 41, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_mean = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "pytesmo/metrics/_fast.pyx":42 + /* "pytesmo/metrics/_fast.pyx":43 * * mean = np.zeros(d, dtype=dtype) * oldmean = np.zeros(d, dtype=dtype) # <<<<<<<<<<<<<< * C = np.zeros((d, d), dtype=dtype) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 42, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_oldmean = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "pytesmo/metrics/_fast.pyx":43 + /* "pytesmo/metrics/_fast.pyx":44 * mean = np.zeros(d, dtype=dtype) * oldmean = np.zeros(d, dtype=dtype) * C = np.zeros((d, d), dtype=dtype) # <<<<<<<<<<<<<< * * nobs = 0 */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 43, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 43, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dsds_float(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dsds_float(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_C = __pyx_t_6; __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; - /* "pytesmo/metrics/_fast.pyx":45 + /* "pytesmo/metrics/_fast.pyx":46 * C = np.zeros((d, d), dtype=dtype) * * nobs = 0 # <<<<<<<<<<<<<< @@ -20629,7 +21099,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n */ __pyx_v_nobs = 0.0; - /* "pytesmo/metrics/_fast.pyx":46 + /* "pytesmo/metrics/_fast.pyx":47 * * nobs = 0 * for i in range(n): # <<<<<<<<<<<<<< @@ -20641,7 +21111,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; - /* "pytesmo/metrics/_fast.pyx":47 + /* "pytesmo/metrics/_fast.pyx":48 * nobs = 0 * for i in range(n): * nobs += 1 # <<<<<<<<<<<<<< @@ -20650,7 +21120,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n */ __pyx_v_nobs = (__pyx_v_nobs + 1.0); - /* "pytesmo/metrics/_fast.pyx":48 + /* "pytesmo/metrics/_fast.pyx":49 * for i in range(n): * nobs += 1 * for j in range(d): # <<<<<<<<<<<<<< @@ -20662,7 +21132,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_j = __pyx_t_12; - /* "pytesmo/metrics/_fast.pyx":49 + /* "pytesmo/metrics/_fast.pyx":50 * nobs += 1 * for j in range(d): * oldmean[j] = mean[j] # <<<<<<<<<<<<<< @@ -20673,7 +21143,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n __pyx_t_14 = __pyx_v_j; *((float *) ( /* dim=0 */ (__pyx_v_oldmean.data + __pyx_t_14 * __pyx_v_oldmean.strides[0]) )) = (*((float *) ( /* dim=0 */ (__pyx_v_mean.data + __pyx_t_13 * __pyx_v_mean.strides[0]) ))); - /* "pytesmo/metrics/_fast.pyx":50 + /* "pytesmo/metrics/_fast.pyx":51 * for j in range(d): * oldmean[j] = mean[j] * mean[j] += (X[i, j] - mean[j]) / nobs # <<<<<<<<<<<<<< @@ -20686,7 +21156,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n __pyx_t_16 = __pyx_v_j; *((float *) ( /* dim=0 */ (__pyx_v_mean.data + __pyx_t_16 * __pyx_v_mean.strides[0]) )) += (((*((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_X.data + __pyx_t_13 * __pyx_v_X.strides[0]) ) + __pyx_t_14 * __pyx_v_X.strides[1]) ))) - (*((float *) ( /* dim=0 */ (__pyx_v_mean.data + __pyx_t_15 * __pyx_v_mean.strides[0]) )))) / __pyx_v_nobs); - /* "pytesmo/metrics/_fast.pyx":51 + /* "pytesmo/metrics/_fast.pyx":52 * oldmean[j] = mean[j] * mean[j] += (X[i, j] - mean[j]) / nobs * for k in range(j, d): # <<<<<<<<<<<<<< @@ -20698,7 +21168,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n for (__pyx_t_19 = __pyx_v_j; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_k = __pyx_t_19; - /* "pytesmo/metrics/_fast.pyx":52 + /* "pytesmo/metrics/_fast.pyx":53 * mean[j] += (X[i, j] - mean[j]) / nobs * for k in range(j, d): * C[j, k] += (X[i, j] - mean[j]) * (X[i, k] - mean[k]) # <<<<<<<<<<<<<< @@ -20718,7 +21188,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n } } - /* "pytesmo/metrics/_fast.pyx":54 + /* "pytesmo/metrics/_fast.pyx":55 * C[j, k] += (X[i, j] - mean[j]) * (X[i, k] - mean[k]) * * for j in range(d): # <<<<<<<<<<<<<< @@ -20730,7 +21200,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_j = __pyx_t_9; - /* "pytesmo/metrics/_fast.pyx":55 + /* "pytesmo/metrics/_fast.pyx":56 * * for j in range(d): * for k in range(j, d): # <<<<<<<<<<<<<< @@ -20742,7 +21212,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n for (__pyx_t_12 = __pyx_v_j; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_k = __pyx_t_12; - /* "pytesmo/metrics/_fast.pyx":57 + /* "pytesmo/metrics/_fast.pyx":58 * for k in range(j, d): * # divide C by nobs to get covariance * C[j, k] /= nobs # <<<<<<<<<<<<<< @@ -20753,7 +21223,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n __pyx_t_20 = __pyx_v_k; *((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_C.data + __pyx_t_21 * __pyx_v_C.strides[0]) ) + __pyx_t_20 * __pyx_v_C.strides[1]) )) /= __pyx_v_nobs; - /* "pytesmo/metrics/_fast.pyx":59 + /* "pytesmo/metrics/_fast.pyx":60 * C[j, k] /= nobs * # populate lower half of C * if k != j: # <<<<<<<<<<<<<< @@ -20763,7 +21233,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n __pyx_t_24 = (__pyx_v_k != __pyx_v_j); if (__pyx_t_24) { - /* "pytesmo/metrics/_fast.pyx":60 + /* "pytesmo/metrics/_fast.pyx":61 * # populate lower half of C * if k != j: * C[k, j] = C[j, k] # <<<<<<<<<<<<<< @@ -20776,7 +21246,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n __pyx_t_13 = __pyx_v_j; *((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_C.data + __pyx_t_16 * __pyx_v_C.strides[0]) ) + __pyx_t_13 * __pyx_v_C.strides[1]) )) = (*((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_C.data + __pyx_t_20 * __pyx_v_C.strides[0]) ) + __pyx_t_21 * __pyx_v_C.strides[1]) ))); - /* "pytesmo/metrics/_fast.pyx":59 + /* "pytesmo/metrics/_fast.pyx":60 * C[j, k] /= nobs * # populate lower half of C * if k != j: # <<<<<<<<<<<<<< @@ -20787,29 +21257,29 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n } } - /* "pytesmo/metrics/_fast.pyx":62 + /* "pytesmo/metrics/_fast.pyx":63 * C[k, j] = C[j, k] * * return mean, C # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_mean, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_mean, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_C, 2, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_C, 2, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast.pyx":11 + /* "pytesmo/metrics/_fast.pyx":12 * * * cpdef _moments_welford_nd(floating [:,:] X): # <<<<<<<<<<<<<< @@ -20874,23 +21344,23 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_5_fast_3__pyx_fuse_0_moments_welford (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0_moments_welford_nd") < 0)) __PYX_ERR(0, 11, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0_moments_welford_nd") < 0)) __PYX_ERR(0, 12, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); } - __pyx_v_X = __Pyx_PyObject_to_MemoryviewSlice_dsds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_X.memview)) __PYX_ERR(0, 11, __pyx_L3_error) + __pyx_v_X = __Pyx_PyObject_to_MemoryviewSlice_dsds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_X.memview)) __PYX_ERR(0, 12, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_moments_welford_nd", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 11, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_moments_welford_nd", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 12, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -20928,8 +21398,8 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast_2__pyx_fuse_0_moments_welford int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0_moments_welford_nd", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_X.memview)) { __Pyx_RaiseUnboundLocalError("X"); __PYX_ERR(0, 11, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_nd(__pyx_v_X, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely(!__pyx_v_X.memview)) { __Pyx_RaiseUnboundLocalError("X"); __PYX_ERR(0, 12, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_nd(__pyx_v_X, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -20990,7 +21460,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1_moments_welford_nd", 1); - /* "pytesmo/metrics/_fast.pyx":33 + /* "pytesmo/metrics/_fast.pyx":34 * cdef floating [:] oldmean * cdef floating [:,:] C * n = X.shape[0] # <<<<<<<<<<<<<< @@ -20999,7 +21469,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n */ __pyx_v_n = (__pyx_v_X.shape[0]); - /* "pytesmo/metrics/_fast.pyx":34 + /* "pytesmo/metrics/_fast.pyx":35 * cdef floating [:,:] C * n = X.shape[0] * d = X.shape[1] # <<<<<<<<<<<<<< @@ -21008,131 +21478,131 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n */ __pyx_v_d = (__pyx_v_X.shape[1]); - /* "pytesmo/metrics/_fast.pyx":39 + /* "pytesmo/metrics/_fast.pyx":40 * dtype = np.float32 * else: * dtype = np.float64 # <<<<<<<<<<<<<< * * mean = np.zeros(d, dtype=dtype) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_float64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_float64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dtype = __pyx_t_2; __pyx_t_2 = 0; - /* "pytesmo/metrics/_fast.pyx":41 + /* "pytesmo/metrics/_fast.pyx":42 * dtype = np.float64 * * mean = np.zeros(d, dtype=dtype) # <<<<<<<<<<<<<< * oldmean = np.zeros(d, dtype=dtype) * C = np.zeros((d, d), dtype=dtype) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 41, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_mean = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "pytesmo/metrics/_fast.pyx":42 + /* "pytesmo/metrics/_fast.pyx":43 * * mean = np.zeros(d, dtype=dtype) * oldmean = np.zeros(d, dtype=dtype) # <<<<<<<<<<<<<< * C = np.zeros((d, d), dtype=dtype) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 42, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_oldmean = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "pytesmo/metrics/_fast.pyx":43 + /* "pytesmo/metrics/_fast.pyx":44 * mean = np.zeros(d, dtype=dtype) * oldmean = np.zeros(d, dtype=dtype) * C = np.zeros((d, d), dtype=dtype) # <<<<<<<<<<<<<< * * nobs = 0 */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 43, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 43, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_C = __pyx_t_6; __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; - /* "pytesmo/metrics/_fast.pyx":45 + /* "pytesmo/metrics/_fast.pyx":46 * C = np.zeros((d, d), dtype=dtype) * * nobs = 0 # <<<<<<<<<<<<<< @@ -21141,7 +21611,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n */ __pyx_v_nobs = 0.0; - /* "pytesmo/metrics/_fast.pyx":46 + /* "pytesmo/metrics/_fast.pyx":47 * * nobs = 0 * for i in range(n): # <<<<<<<<<<<<<< @@ -21153,7 +21623,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; - /* "pytesmo/metrics/_fast.pyx":47 + /* "pytesmo/metrics/_fast.pyx":48 * nobs = 0 * for i in range(n): * nobs += 1 # <<<<<<<<<<<<<< @@ -21162,7 +21632,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n */ __pyx_v_nobs = (__pyx_v_nobs + 1.0); - /* "pytesmo/metrics/_fast.pyx":48 + /* "pytesmo/metrics/_fast.pyx":49 * for i in range(n): * nobs += 1 * for j in range(d): # <<<<<<<<<<<<<< @@ -21174,7 +21644,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_j = __pyx_t_12; - /* "pytesmo/metrics/_fast.pyx":49 + /* "pytesmo/metrics/_fast.pyx":50 * nobs += 1 * for j in range(d): * oldmean[j] = mean[j] # <<<<<<<<<<<<<< @@ -21185,7 +21655,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n __pyx_t_14 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_oldmean.data + __pyx_t_14 * __pyx_v_oldmean.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_mean.data + __pyx_t_13 * __pyx_v_mean.strides[0]) ))); - /* "pytesmo/metrics/_fast.pyx":50 + /* "pytesmo/metrics/_fast.pyx":51 * for j in range(d): * oldmean[j] = mean[j] * mean[j] += (X[i, j] - mean[j]) / nobs # <<<<<<<<<<<<<< @@ -21198,7 +21668,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n __pyx_t_16 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_mean.data + __pyx_t_16 * __pyx_v_mean.strides[0]) )) += (((*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_X.data + __pyx_t_13 * __pyx_v_X.strides[0]) ) + __pyx_t_14 * __pyx_v_X.strides[1]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_mean.data + __pyx_t_15 * __pyx_v_mean.strides[0]) )))) / __pyx_v_nobs); - /* "pytesmo/metrics/_fast.pyx":51 + /* "pytesmo/metrics/_fast.pyx":52 * oldmean[j] = mean[j] * mean[j] += (X[i, j] - mean[j]) / nobs * for k in range(j, d): # <<<<<<<<<<<<<< @@ -21210,7 +21680,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n for (__pyx_t_19 = __pyx_v_j; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { __pyx_v_k = __pyx_t_19; - /* "pytesmo/metrics/_fast.pyx":52 + /* "pytesmo/metrics/_fast.pyx":53 * mean[j] += (X[i, j] - mean[j]) / nobs * for k in range(j, d): * C[j, k] += (X[i, j] - mean[j]) * (X[i, k] - mean[k]) # <<<<<<<<<<<<<< @@ -21230,7 +21700,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n } } - /* "pytesmo/metrics/_fast.pyx":54 + /* "pytesmo/metrics/_fast.pyx":55 * C[j, k] += (X[i, j] - mean[j]) * (X[i, k] - mean[k]) * * for j in range(d): # <<<<<<<<<<<<<< @@ -21242,7 +21712,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_j = __pyx_t_9; - /* "pytesmo/metrics/_fast.pyx":55 + /* "pytesmo/metrics/_fast.pyx":56 * * for j in range(d): * for k in range(j, d): # <<<<<<<<<<<<<< @@ -21254,7 +21724,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n for (__pyx_t_12 = __pyx_v_j; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_k = __pyx_t_12; - /* "pytesmo/metrics/_fast.pyx":57 + /* "pytesmo/metrics/_fast.pyx":58 * for k in range(j, d): * # divide C by nobs to get covariance * C[j, k] /= nobs # <<<<<<<<<<<<<< @@ -21265,7 +21735,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n __pyx_t_20 = __pyx_v_k; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_C.data + __pyx_t_21 * __pyx_v_C.strides[0]) ) + __pyx_t_20 * __pyx_v_C.strides[1]) )) /= __pyx_v_nobs; - /* "pytesmo/metrics/_fast.pyx":59 + /* "pytesmo/metrics/_fast.pyx":60 * C[j, k] /= nobs * # populate lower half of C * if k != j: # <<<<<<<<<<<<<< @@ -21275,7 +21745,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n __pyx_t_24 = (__pyx_v_k != __pyx_v_j); if (__pyx_t_24) { - /* "pytesmo/metrics/_fast.pyx":60 + /* "pytesmo/metrics/_fast.pyx":61 * # populate lower half of C * if k != j: * C[k, j] = C[j, k] # <<<<<<<<<<<<<< @@ -21288,7 +21758,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n __pyx_t_13 = __pyx_v_j; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_C.data + __pyx_t_16 * __pyx_v_C.strides[0]) ) + __pyx_t_13 * __pyx_v_C.strides[1]) )) = (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_C.data + __pyx_t_20 * __pyx_v_C.strides[0]) ) + __pyx_t_21 * __pyx_v_C.strides[1]) ))); - /* "pytesmo/metrics/_fast.pyx":59 + /* "pytesmo/metrics/_fast.pyx":60 * C[j, k] /= nobs * # populate lower half of C * if k != j: # <<<<<<<<<<<<<< @@ -21299,29 +21769,29 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_n } } - /* "pytesmo/metrics/_fast.pyx":62 + /* "pytesmo/metrics/_fast.pyx":63 * C[k, j] = C[j, k] * * return mean, C # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_mean, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_mean, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_C, 2, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_C, 2, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast.pyx":11 + /* "pytesmo/metrics/_fast.pyx":12 * * * cpdef _moments_welford_nd(floating [:,:] X): # <<<<<<<<<<<<<< @@ -21386,23 +21856,23 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_5_fast_5__pyx_fuse_1_moments_welford (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1_moments_welford_nd") < 0)) __PYX_ERR(0, 11, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1_moments_welford_nd") < 0)) __PYX_ERR(0, 12, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); } - __pyx_v_X = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_X.memview)) __PYX_ERR(0, 11, __pyx_L3_error) + __pyx_v_X = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_X.memview)) __PYX_ERR(0, 12, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_moments_welford_nd", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 11, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_moments_welford_nd", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 12, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -21440,8 +21910,8 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_5_fast_4__pyx_fuse_1_moments_welford int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1_moments_welford_nd", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_X.memview)) { __Pyx_RaiseUnboundLocalError("X"); __PYX_ERR(0, 11, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_nd(__pyx_v_X, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely(!__pyx_v_X.memview)) { __Pyx_RaiseUnboundLocalError("X"); __PYX_ERR(0, 12, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_5_fast__moments_welford_nd(__pyx_v_X, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21715,6 +22185,9 @@ static PyTypeObject __pyx_type___pyx_array = { #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif @@ -21885,6 +22358,9 @@ static PyTypeObject __pyx_type___pyx_MemviewEnum = { #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif @@ -22228,6 +22704,9 @@ static PyTypeObject __pyx_type___pyx_memoryview = { #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif @@ -22398,6 +22877,9 @@ static PyTypeObject __pyx_type___pyx_memoryviewslice = { #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif @@ -22492,7 +22974,6 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1}, - {&__pyx_kp_s_fast_pyx, __pyx_k_fast_pyx, sizeof(__pyx_k_fast_pyx), 0, 0, 1, 0}, {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1}, {&__pyx_n_s_float, __pyx_k_float, sizeof(__pyx_k_float), 0, 0, 1, 1}, {&__pyx_n_s_float32, __pyx_k_float32, sizeof(__pyx_k_float32), 0, 0, 1, 1}, @@ -22527,8 +23008,8 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, - {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, - {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, + {&__pyx_kp_u_numpy__core_multiarray_failed_to, __pyx_k_numpy__core_multiarray_failed_to, sizeof(__pyx_k_numpy__core_multiarray_failed_to), 0, 1, 0, 0}, + {&__pyx_kp_u_numpy__core_umath_failed_to_impo, __pyx_k_numpy__core_umath_failed_to_impo, sizeof(__pyx_k_numpy__core_umath_failed_to_impo), 0, 1, 0, 0}, {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1}, {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1}, @@ -22555,6 +23036,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1}, {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1}, {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1}, + {&__pyx_kp_s_src_pytesmo_metrics__fast_pyx, __pyx_k_src_pytesmo_metrics__fast_pyx, sizeof(__pyx_k_src_pytesmo_metrics__fast_pyx), 0, 0, 1, 0}, {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1}, {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1}, {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1}, @@ -22579,9 +23061,9 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { } /* #### Code section: cached_builtins ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 11, __pyx_L1_error) - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 11, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 12, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 12, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 47, __pyx_L1_error) __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_n_s_import); if (!__pyx_builtin___import__) __PYX_ERR(1, 100, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 156, __pyx_L1_error) __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 159, __pyx_L1_error) @@ -22589,7 +23071,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 408, __pyx_L1_error) __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 618, __pyx_L1_error) __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 914, __pyx_L1_error) - __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 984, __pyx_L1_error) + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1025, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -22636,39 +23118,39 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":984 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025 * __pyx_import_array() * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< + * raise ImportError("numpy._core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ - __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 984, __pyx_L1_error) + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_numpy__core_multiarray_failed_to); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "../../../../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":990 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031 * _import_umath() * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ - __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 990, __pyx_L1_error) + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_numpy__core_umath_failed_to_impo); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 1031, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); - /* "pytesmo/metrics/_fast.pyx":11 + /* "pytesmo/metrics/_fast.pyx":12 * * * cpdef _moments_welford_nd(floating [:,:] X): # <<<<<<<<<<<<<< * """ * Calculates means, variances, and covariance of the given input array using */ - __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_No_matching_signature_found); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_No_matching_signature_found); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); - __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_Function_call_with_ambiguous_arg); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_Function_call_with_ambiguous_arg); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); @@ -22773,19 +23255,19 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GIVEREF(__pyx_tuple__25); __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(1, 1, __pyx_L1_error) - /* "pytesmo/metrics/_fast.pyx":11 + /* "pytesmo/metrics/_fast.pyx":12 * * * cpdef _moments_welford_nd(floating [:,:] X): # <<<<<<<<<<<<<< * """ * Calculates means, variances, and covariance of the given input array using */ - __pyx_tuple__27 = PyTuple_Pack(1, __pyx_n_s_X); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_tuple__27 = PyTuple_Pack(1, __pyx_n_s_X); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); - __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fast_pyx, __pyx_n_s_pyx_fuse_0_moments_welford_nd, 11, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 11, __pyx_L1_error) - __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fast_pyx, __pyx_n_s_pyx_fuse_0_moments_welford_nd, 11, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 11, __pyx_L1_error) - __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_fast_pyx, __pyx_n_s_pyx_fuse_1_moments_welford_nd, 11, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pyx, __pyx_n_s_pyx_fuse_0_moments_welford_nd, 12, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 12, __pyx_L1_error) + __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pyx, __pyx_n_s_pyx_fuse_0_moments_welford_nd, 12, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 12, __pyx_L1_error) + __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pyx, __pyx_n_s_pyx_fuse_1_moments_welford_nd, 12, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -22817,25 +23299,6 @@ static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { /* AssertionsEnabled.init */ if (likely(__Pyx_init_assertions_enabled() == 0)); else -if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) - - /* NumpyImportArray.init */ - /* - * Cython has automatically inserted a call to _import_array since - * you didn't include one when you cimported numpy. To disable this - * add the line - * numpy._import_array - */ -#ifdef NPY_FEATURE_VERSION -#ifndef NO_IMPORT_ARRAY -if (unlikely(_import_array() == -1)) { - PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import " - "(auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; " - "use 'numpy._import_array' to disable if you are certain you don't need it)."); -} -#endif -#endif - if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) return 0; @@ -23048,33 +23511,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(2, 202, __pyx_L1_error) + __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 202, __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(2, 225, __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(2, 229, __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(2, 238, __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(2, 809, __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(2, 811, __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(2, 813, __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(2, 815, __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(2, 817, __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(2, 819, __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(2, 821, __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(2, 823, __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(2, 825, __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(2, 827, __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(2, 866, __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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 929, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; @@ -23269,6 +23732,7 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__fast(PyObject *__pyx_pyinit_modul int __pyx_t_6; PyObject *__pyx_t_7 = NULL; static PyThread_type_lock __pyx_t_8[8]; + int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -23901,65 +24365,74 @@ if (!__Pyx_RefNanny) { * # cython: boundscheck=False, wraparound=False, cdivision=True, nonecheck=False * import numpy as np # <<<<<<<<<<<<<< * cimport numpy as cnp - * from numpy.math cimport NAN + * cnp.import_array() */ __pyx_t_7 = __Pyx_ImportDottedModule(__pyx_n_s_numpy, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_7) < 0) __PYX_ERR(0, 2, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pytesmo/metrics/_fast.pyx":8 + /* "pytesmo/metrics/_fast.pyx":4 + * import numpy as np + * cimport numpy as cnp + * cnp.import_array() # <<<<<<<<<<<<<< + * from numpy.math cimport NAN + * cimport cython + */ + __pyx_t_9 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 4, __pyx_L1_error) + + /* "pytesmo/metrics/_fast.pyx":9 * from cython cimport floating * from libc.math cimport sqrt, fabs * from scipy.special.cython_special import betainc # <<<<<<<<<<<<<< * * */ - __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 8, __pyx_L1_error) + __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_n_s_betainc); __Pyx_GIVEREF(__pyx_n_s_betainc); - if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_betainc)) __PYX_ERR(0, 8, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_scipy_special_cython_special, __pyx_t_7, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_betainc)) __PYX_ERR(0, 9, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_scipy_special_cython_special, __pyx_t_7, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_betainc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 8, __pyx_L1_error) + __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_betainc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_betainc, __pyx_t_7) < 0) __PYX_ERR(0, 8, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_betainc, __pyx_t_7) < 0) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pytesmo/metrics/_fast.pyx":11 + /* "pytesmo/metrics/_fast.pyx":12 * * * cpdef _moments_welford_nd(floating [:,:] X): # <<<<<<<<<<<<<< * """ * Calculates means, variances, and covariance of the given input array using */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_5_fast_3__pyx_fuse_0_moments_welford_nd, 0, __pyx_n_s_pyx_fuse_0_moments_welford_nd, NULL, __pyx_n_s_pytesmo_metrics__fast, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_5_fast_3__pyx_fuse_0_moments_welford_nd, 0, __pyx_n_s_pyx_fuse_0_moments_welford_nd, NULL, __pyx_n_s_pytesmo_metrics__fast, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_moments_welford_nd, __pyx_t_4) < 0) __PYX_ERR(0, 11, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_moments_welford_nd, __pyx_t_4) < 0) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_5_fast_5__pyx_fuse_1_moments_welford_nd, 0, __pyx_n_s_pyx_fuse_1_moments_welford_nd, NULL, __pyx_n_s_pytesmo_metrics__fast, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_5_fast_5__pyx_fuse_1_moments_welford_nd, 0, __pyx_n_s_pyx_fuse_1_moments_welford_nd, NULL, __pyx_n_s_pytesmo_metrics__fast, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_moments_welford_nd, __pyx_t_4) < 0) __PYX_ERR(0, 11, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_moments_welford_nd, __pyx_t_4) < 0) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_5_fast_3__pyx_fuse_0_moments_welford_nd, 0, __pyx_n_s_pyx_fuse_0_moments_welford_nd, NULL, __pyx_n_s_pytesmo_metrics__fast, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_5_fast_3__pyx_fuse_0_moments_welford_nd, 0, __pyx_n_s_pyx_fuse_0_moments_welford_nd, NULL, __pyx_n_s_pytesmo_metrics__fast, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 11, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_5_fast_5__pyx_fuse_1_moments_welford_nd, 0, __pyx_n_s_pyx_fuse_1_moments_welford_nd, NULL, __pyx_n_s_pytesmo_metrics__fast, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_5_fast_5__pyx_fuse_1_moments_welford_nd, 0, __pyx_n_s_pyx_fuse_1_moments_welford_nd, NULL, __pyx_n_s_pytesmo_metrics__fast, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_7) < 0) __PYX_ERR(0, 11, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_7) < 0) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_5_fast_1_moments_welford_nd, 0, __pyx_n_s_moments_welford_nd, NULL, __pyx_n_s_pytesmo_metrics__fast, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_5_fast_1_moments_welford_nd, 0, __pyx_n_s_moments_welford_nd, NULL, __pyx_n_s_pytesmo_metrics__fast, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 11, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 12, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_7)->__pyx_arg__fused_sigindex = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); @@ -23968,7 +24441,7 @@ if (!__Pyx_RefNanny) { ((__pyx_FusedFunctionObject *) __pyx_t_7)->__signatures__ = __pyx_t_4; __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_moments_welford_nd, __pyx_t_7) < 0) __PYX_ERR(0, 11, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_moments_welford_nd, __pyx_t_7) < 0) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pytesmo/metrics/_fast.pyx":1 @@ -26448,7 +26921,6 @@ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { } /* HasAttr */ -#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; if (unlikely(!__Pyx_PyBaseString_Check(n))) { @@ -26465,7 +26937,6 @@ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { return 1; } } -#endif /* DictGetItem */ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY @@ -27639,10 +28110,10 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { #endif /* 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]; @@ -27696,7 +28167,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. " @@ -27704,7 +28175,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", @@ -28839,6 +29310,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 @@ -29229,6 +29703,9 @@ static PyTypeObject __pyx_FusedFunctionType_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 @@ -30914,6 +31391,160 @@ static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *o #endif #endif +/* Declarations */ + #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) { + return ::std::complex< long double >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) { + return x + y*(__pyx_t_long_double_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) { + __pyx_t_long_double_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +/* Arithmetic */ + #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) +#else + static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + __pyx_t_long_double_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + __pyx_t_long_double_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + __pyx_t_long_double_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + if (b.imag == 0) { + return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabsl(b.real) >= fabsl(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + long double r = b.imag / b.real; + long double s = (long double)(1.0) / (b.real + b.imag * r); + return __pyx_t_long_double_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + long double r = b.real / b.imag; + long double s = (long double)(1.0) / (b.imag + b.real * r); + return __pyx_t_long_double_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + if (b.imag == 0) { + return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + long double denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_long_double_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex a) { + __pyx_t_long_double_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex a) { + __pyx_t_long_double_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrtl(z.real*z.real + z.imag*z.imag); + #else + return hypotl(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + __pyx_t_long_double_complex z; + long double r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + long double denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + return __Pyx_c_prod_long__double(a, a); + case 3: + z = __Pyx_c_prod_long__double(a, a); + return __Pyx_c_prod_long__double(z, a); + case 4: + z = __Pyx_c_prod_long__double(a, a); + return __Pyx_c_prod_long__double(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if ((b.imag == 0) && (a.real >= 0)) { + z.real = powl(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2l(0.0, -1.0); + } + } else { + r = __Pyx_c_abs_long__double(a); + theta = atan2l(a.imag, a.real); + } + lnr = logl(r); + z_r = expl(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cosl(z_theta); + z.imag = z_r * sinl(z_theta); + return z; + } + #endif +#endif + /* MemviewSliceCopyTemplate */ static __Pyx_memviewslice __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, @@ -31147,12 +31778,19 @@ static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice, } } { - 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"); @@ -31211,12 +31849,19 @@ static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice, } } { - 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"); @@ -31266,245 +31911,239 @@ static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice, } 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 CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + 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: @@ -31565,245 +32204,239 @@ static CYTHON_INLINE PyObject* __Pyx_ImportNumPyArrayTypeIfAvailable(void) { } 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: @@ -31838,245 +32471,239 @@ static CYTHON_INLINE PyObject* __Pyx_ImportNumPyArrayTypeIfAvailable(void) { } return (char) val; } - } else + } #endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { + if (unlikely(!PyLong_Check(x))) { + char val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (char) -1; + val = __Pyx_PyInt_As_char(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(char, __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(char) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) { - return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); - } + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(char, __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(char) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) { + return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); } - break; - case 3: - if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) { - return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); - } + } + break; + case 3: + if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) { + return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); } - break; - case 4: - if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, 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(char) >= 4 * PyLong_SHIFT)) { - return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); - } + } + break; + case 4: + if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, 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(char) >= 4 * PyLong_SHIFT)) { + return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)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 (char) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (char) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } #endif - if ((sizeof(char) <= sizeof(unsigned long))) { - __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x)) + if ((sizeof(char) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG - } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif - } - } else { + } + } else { #if CYTHON_USE_PYLONG_INTERNALS - if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(char, __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(char) - 1 > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { - return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); - } + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(char, __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(char) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { + return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } - break; - case 2: - if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { - return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); - } + } + break; + case 2: + if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { + return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } - break; - case -3: - if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { - return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); - } + } + break; + case -3: + if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { + return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } - break; - case 3: - if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { - return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); - } + } + break; + case 3: + if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { + return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } - break; - case -4: - if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT)) { - return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); - } + } + break; + case -4: + if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT)) { + return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } - break; - case 4: - if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT)) { - return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); - } + } + break; + case 4: + if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT)) { + return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } - break; - } + } + break; } + } #endif - if ((sizeof(char) <= sizeof(long))) { - __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x)) + if ((sizeof(char) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG - } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x)) + } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif - } + } + } + { + char 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 (char) -1; + assert(PyLong_CheckExact(v)); } { - char 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 (char) -1; - } -#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(x) == 0) - return (char) 0; - is_negative = Py_SIZE(x) < 0; -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (char) -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 (char) -1; - } else { - stepval = __Pyx_NewRef(v); - } - val = (char) 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(char) * 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 |= ((char) 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(char) * 8) - bits - (is_unsigned ? 0 : 1); - if (unlikely(idigit >= (1L << remaining_bits))) - goto raise_overflow; - val |= ((char) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - unpacking_done: - #endif - if (!is_unsigned) { - if (unlikely(val & (((char) 1) << (sizeof(char) * 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 (char) -1; } - return (char) -1; + is_negative = result == 1; } - } else { - char val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (char) -1; - val = __Pyx_PyInt_As_char(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 (char) -1; + } else { + stepval = v; + } + v = NULL; + val = (char) 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(char) * 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 |= ((char) 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(char) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((char) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((char) 1) << (sizeof(char) * 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 (char) -1; return val; } raise_overflow: diff --git a/src/pytesmo/metrics/_fast.pyx b/src/pytesmo/metrics/_fast.pyx index eabfa62..31f898c 100644 --- a/src/pytesmo/metrics/_fast.pyx +++ b/src/pytesmo/metrics/_fast.pyx @@ -1,6 +1,7 @@ # cython: boundscheck=False, wraparound=False, cdivision=True, nonecheck=False import numpy as np cimport numpy as cnp +cnp.import_array() from numpy.math cimport NAN cimport cython from cython cimport floating diff --git a/src/pytesmo/metrics/_fast_pairwise.c b/src/pytesmo/metrics/_fast_pairwise.c index 58c9564..9140b12 100644 --- a/src/pytesmo/metrics/_fast_pairwise.c +++ b/src/pytesmo/metrics/_fast_pairwise.c @@ -1,4 +1,4 @@ -/* Generated by Cython 3.0.10 */ +/* Generated by Cython 3.0.11 */ /* BEGIN: Cython Metadata { @@ -10,15 +10,15 @@ ] ], "depends": [ - "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h", - "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/core/include/numpy/arrayscalars.h", - "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h", - "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h", - "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/core/include/numpy/npy_math.h", - "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/core/include/numpy/ufuncobject.h" + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayobject.h", + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayscalars.h", + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarrayobject.h", + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarraytypes.h", + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include/numpy/npy_math.h", + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include/numpy/ufuncobject.h" ], "include_dirs": [ - "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/core/include" + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include" ], "name": "pytesmo.metrics._fast_pairwise", "sources": [ @@ -53,10 +53,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 @@ -1681,7 +1681,7 @@ typedef struct { /* #### Code section: numeric_typedefs ### */ -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":730 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< @@ -1690,7 +1690,7 @@ typedef struct { */ typedef npy_int8 __pyx_t_5numpy_int8_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":731 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":770 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< @@ -1699,7 +1699,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; */ typedef npy_int16 __pyx_t_5numpy_int16_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":732 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< @@ -1708,7 +1708,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; */ typedef npy_int32 __pyx_t_5numpy_int32_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":733 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< @@ -1717,7 +1717,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; */ typedef npy_int64 __pyx_t_5numpy_int64_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":737 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":776 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< @@ -1726,7 +1726,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":738 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":777 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< @@ -1735,7 +1735,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":739 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< @@ -1744,7 +1744,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":740 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< @@ -1753,7 +1753,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":744 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":783 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< @@ -1762,7 +1762,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; */ typedef npy_float32 __pyx_t_5numpy_float32_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":745 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":784 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< @@ -1771,43 +1771,25 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; */ typedef npy_float64 __pyx_t_5numpy_float64_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":754 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< - * ctypedef npy_longlong longlong_t +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":791 + * ctypedef double complex complex128_t * - */ -typedef npy_long __pyx_t_5numpy_int_t; - -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":755 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< - * - * ctypedef npy_ulong uint_t - */ -typedef npy_longlong __pyx_t_5numpy_longlong_t; - -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":757 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ -typedef npy_ulong __pyx_t_5numpy_uint_t; +typedef npy_longlong __pyx_t_5numpy_longlong_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":758 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":792 * - * ctypedef npy_ulong uint_t + * ctypedef npy_longlong longlong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< * * ctypedef npy_intp intp_t */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":760 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":794 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< @@ -1816,7 +1798,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; */ typedef npy_intp __pyx_t_5numpy_intp_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":761 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":795 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< @@ -1825,7 +1807,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; */ typedef npy_uintp __pyx_t_5numpy_uintp_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":763 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":797 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< @@ -1834,7 +1816,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; */ typedef npy_double __pyx_t_5numpy_float_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":764 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":798 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< @@ -1843,12 +1825,12 @@ typedef npy_double __pyx_t_5numpy_float_t; */ typedef npy_double __pyx_t_5numpy_double_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":765 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< * - * ctypedef npy_cfloat cfloat_t + * ctypedef float complex cfloat_t */ typedef npy_longdouble __pyx_t_5numpy_longdouble_t; /* #### Code section: complex_type_declarations ### */ @@ -1876,6 +1858,18 @@ static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(floa #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); +/* Declarations.proto */ +#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #ifdef __cplusplus + typedef ::std::complex< long double > __pyx_t_long_double_complex; + #else + typedef long double _Complex __pyx_t_long_double_complex; + #endif +#else + typedef struct { long double real, imag; } __pyx_t_long_double_complex; +#endif +static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double, long double); + /* #### Code section: type_declarations ### */ /*--- Type declarations ---*/ @@ -1884,41 +1878,23 @@ struct __pyx_MemviewEnum_obj; struct __pyx_memoryview_obj; struct __pyx_memoryviewslice_obj; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":767 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t - */ -typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":768 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1095 * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< - * ctypedef npy_clongdouble clongdouble_t - * - */ -typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":769 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< + * # 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 * - * ctypedef npy_cdouble complex_t */ -typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; +typedef int (*__pyx_t_5numpy_NpyIter_IterNextFunc)(NpyIter *); -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":771 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< * - * cdef inline object PyArray_MultiIterNew1(a): + * cdef extern from "numpy/arrayobject.h": */ -typedef npy_cdouble __pyx_t_5numpy_complex_t; +typedef void (*__pyx_t_5numpy_NpyIter_GetMultiIndexFunc)(NpyIter *, npy_intp *); struct __pyx_defaults; typedef struct __pyx_defaults __pyx_defaults; struct __pyx_defaults1; @@ -2693,11 +2669,7 @@ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* s static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /* HasAttr.proto */ -#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 -#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) -#else static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); -#endif /* PyDictContains.proto */ static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { @@ -2936,22 +2908,22 @@ static int __Pyx_setup_reduce(PyObject* type_obj); #endif /* 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 /* FetchSharedCythonModule.proto */ @@ -3302,6 +3274,44 @@ static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_d #endif #endif +/* Arithmetic.proto */ +#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #define __Pyx_c_eq_long__double(a, b) ((a)==(b)) + #define __Pyx_c_sum_long__double(a, b) ((a)+(b)) + #define __Pyx_c_diff_long__double(a, b) ((a)-(b)) + #define __Pyx_c_prod_long__double(a, b) ((a)*(b)) + #define __Pyx_c_quot_long__double(a, b) ((a)/(b)) + #define __Pyx_c_neg_long__double(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero_long__double(z) ((z)==(long double)0) + #define __Pyx_c_conj_long__double(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs_long__double(z) (::std::abs(z)) + #define __Pyx_c_pow_long__double(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero_long__double(z) ((z)==0) + #define __Pyx_c_conj_long__double(z) (conjl(z)) + #if 1 + #define __Pyx_c_abs_long__double(z) (cabsl(z)) + #define __Pyx_c_pow_long__double(a, b) (cpowl(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex); + #if 1 + static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + #endif +#endif + /* MemviewSliceCopyTemplate.proto */ static __Pyx_memviewslice __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, @@ -3386,6 +3396,18 @@ static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/ static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/ static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self); /* proto*/ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self); /* proto*/ @@ -3411,6 +3433,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p /* Module declarations from "numpy" */ /* Module declarations from "numpy" */ +static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/ /* Module declarations from "numpy.math" */ @@ -3693,7 +3716,6 @@ static const char __pyx_k_pyx_fuse_1_mse_corr_from_momen[] = "__pyx_fuse_1_mse_c static const char __pyx_k_pyx_fuse_1_mse_var_from_moment[] = "__pyx_fuse_1_mse_var_from_moments"; static const char __pyx_k_pyx_fuse_1_pearsonr_from_momen[] = "__pyx_fuse_1_pearsonr_from_moments"; static const char __pyx_k_strided_and_direct_or_indirect[] = ""; -static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; static const char __pyx_k_All_dimensions_preceding_dimensi[] = "All dimensions preceding dimension %d must be indexed and not sliced"; static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides"; static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory."; @@ -3710,7 +3732,8 @@ static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object"; static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension "; static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; -static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; +static const char __pyx_k_numpy__core_multiarray_failed_to[] = "numpy._core.multiarray failed to import"; +static const char __pyx_k_numpy__core_umath_failed_to_impo[] = "numpy._core.umath failed to import"; static const char __pyx_k_src_pytesmo_metrics__fast_pairwi[] = "src/pytesmo/metrics/_fast_pairwise.pyx"; static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides."; /* #### Code section: decls ### */ @@ -4002,8 +4025,8 @@ typedef struct { PyObject *__pyx_kp_s_no_default___reduce___due_to_non; PyObject *__pyx_n_s_np; PyObject *__pyx_n_s_numpy; - PyObject *__pyx_kp_u_numpy_core_multiarray_failed_to; - PyObject *__pyx_kp_u_numpy_core_umath_failed_to_impor; + PyObject *__pyx_kp_u_numpy__core_multiarray_failed_to; + PyObject *__pyx_kp_u_numpy__core_umath_failed_to_impo; PyObject *__pyx_n_s_obj; PyObject *__pyx_n_s_pack; PyObject *__pyx_n_s_pearsonr_from_moments; @@ -4344,8 +4367,8 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non); Py_CLEAR(clear_module_state->__pyx_n_s_np); Py_CLEAR(clear_module_state->__pyx_n_s_numpy); - Py_CLEAR(clear_module_state->__pyx_kp_u_numpy_core_multiarray_failed_to); - Py_CLEAR(clear_module_state->__pyx_kp_u_numpy_core_umath_failed_to_impor); + Py_CLEAR(clear_module_state->__pyx_kp_u_numpy__core_multiarray_failed_to); + Py_CLEAR(clear_module_state->__pyx_kp_u_numpy__core_umath_failed_to_impo); Py_CLEAR(clear_module_state->__pyx_n_s_obj); Py_CLEAR(clear_module_state->__pyx_n_s_pack); Py_CLEAR(clear_module_state->__pyx_n_s_pearsonr_from_moments); @@ -4664,8 +4687,8 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non); Py_VISIT(traverse_module_state->__pyx_n_s_np); Py_VISIT(traverse_module_state->__pyx_n_s_numpy); - Py_VISIT(traverse_module_state->__pyx_kp_u_numpy_core_multiarray_failed_to); - Py_VISIT(traverse_module_state->__pyx_kp_u_numpy_core_umath_failed_to_impor); + Py_VISIT(traverse_module_state->__pyx_kp_u_numpy__core_multiarray_failed_to); + Py_VISIT(traverse_module_state->__pyx_kp_u_numpy__core_umath_failed_to_impo); Py_VISIT(traverse_module_state->__pyx_n_s_obj); Py_VISIT(traverse_module_state->__pyx_n_s_pack); Py_VISIT(traverse_module_state->__pyx_n_s_pearsonr_from_moments); @@ -5022,8 +5045,8 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non #define __pyx_n_s_np __pyx_mstate_global->__pyx_n_s_np #define __pyx_n_s_numpy __pyx_mstate_global->__pyx_n_s_numpy -#define __pyx_kp_u_numpy_core_multiarray_failed_to __pyx_mstate_global->__pyx_kp_u_numpy_core_multiarray_failed_to -#define __pyx_kp_u_numpy_core_umath_failed_to_impor __pyx_mstate_global->__pyx_kp_u_numpy_core_umath_failed_to_impor +#define __pyx_kp_u_numpy__core_multiarray_failed_to __pyx_mstate_global->__pyx_kp_u_numpy__core_multiarray_failed_to +#define __pyx_kp_u_numpy__core_umath_failed_to_impo __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo #define __pyx_n_s_obj __pyx_mstate_global->__pyx_n_s_obj #define __pyx_n_s_pack __pyx_mstate_global->__pyx_n_s_pack #define __pyx_n_s_pearsonr_from_moments __pyx_mstate_global->__pyx_n_s_pearsonr_from_moments @@ -5365,10 +5388,11 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + unsigned int __pyx_t_7; char *__pyx_t_8; - Py_ssize_t __pyx_t_9; - Py_UCS4 __pyx_t_10; + int __pyx_t_9; + Py_ssize_t __pyx_t_10; + Py_UCS4 __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -5594,7 +5618,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ * if dim <= 0: * raise ValueError, f"Invalid shape in axis {idx}: {dim}." */ - __pyx_t_7 = 0; + __pyx_t_9 = 0; __pyx_t_4 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0; for (;;) { @@ -5611,11 +5635,11 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif - __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 159, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_dim = __pyx_t_9; - __pyx_v_idx = __pyx_t_7; - __pyx_t_7 = (__pyx_t_7 + 1); + __pyx_v_dim = __pyx_t_10; + __pyx_v_idx = __pyx_t_9; + __pyx_t_9 = (__pyx_t_9 + 1); /* "View.MemoryView":160 * @@ -5636,33 +5660,33 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ */ __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = 0; - __pyx_t_10 = 127; + __pyx_t_10 = 0; + __pyx_t_11 = 127; __Pyx_INCREF(__pyx_kp_u_Invalid_shape_in_axis); - __pyx_t_9 += 22; + __pyx_t_10 += 22; __Pyx_GIVEREF(__pyx_kp_u_Invalid_shape_in_axis); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Invalid_shape_in_axis); __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_idx, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_kp_u_); - __pyx_t_9 += 2; + __pyx_t_10 += 2; __Pyx_GIVEREF(__pyx_kp_u_); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_); __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_kp_u__2); - __pyx_t_9 += 1; + __pyx_t_10 += 1; __Pyx_GIVEREF(__pyx_kp_u__2); PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__2); - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0); @@ -5846,7 +5870,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ * * @cname('getbuffer') */ - __pyx_t_7 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(1, 180, __pyx_L1_error) + __pyx_t_9 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 180, __pyx_L1_error) /* "View.MemoryView":179 * self.dtype_is_object = format == b'O' @@ -9001,7 +9025,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit * * if have_slices: # <<<<<<<<<<<<<< * obj = self.is_slice(value) - * if obj: + * if obj is not None: */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 426, __pyx_L1_error) if (__pyx_t_4) { @@ -9010,7 +9034,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit * * if have_slices: * obj = self.is_slice(value) # <<<<<<<<<<<<<< - * if obj: + * if obj is not None: * self.setitem_slice_assignment(self[index], obj) */ __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 427, __pyx_L1_error) @@ -9021,16 +9045,16 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit /* "View.MemoryView":428 * if have_slices: * obj = self.is_slice(value) - * if obj: # <<<<<<<<<<<<<< + * if obj is not None: # <<<<<<<<<<<<<< * self.setitem_slice_assignment(self[index], obj) * else: */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 428, __pyx_L1_error) + __pyx_t_4 = (__pyx_v_obj != Py_None); if (__pyx_t_4) { /* "View.MemoryView":429 * obj = self.is_slice(value) - * if obj: + * if obj is not None: * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<< * else: * self.setitem_slice_assign_scalar(self[index], value) @@ -9045,7 +9069,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit /* "View.MemoryView":428 * if have_slices: * obj = self.is_slice(value) - * if obj: # <<<<<<<<<<<<<< + * if obj is not None: # <<<<<<<<<<<<<< * self.setitem_slice_assignment(self[index], obj) * else: */ @@ -9075,7 +9099,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit * * if have_slices: # <<<<<<<<<<<<<< * obj = self.is_slice(value) - * if obj: + * if obj is not None: */ goto __pyx_L4; } @@ -9783,9 +9807,10 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; + unsigned int __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; + int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -9940,11 +9965,11 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 498, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_7); + __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_6); __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; - if (__pyx_t_8) { + if (__pyx_t_11) { __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 498, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_6); @@ -10029,7 +10054,7 @@ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryvie PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; + unsigned int __pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; @@ -18503,7 +18528,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSE int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; + unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -18685,7 +18710,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; + unsigned int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -18805,10 +18830,434 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":245 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286 + * + * @property + * cdef inline npy_intp itemsize(self) noexcept nogil: # <<<<<<<<<<<<<< + * return PyDataType_ELSIZE(self) + * + */ + +static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self) { + npy_intp __pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":287 + * @property + * cdef inline npy_intp itemsize(self) noexcept nogil: + * return PyDataType_ELSIZE(self) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyDataType_ELSIZE(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286 + * + * @property + * cdef inline npy_intp itemsize(self) noexcept nogil: # <<<<<<<<<<<<<< + * return PyDataType_ELSIZE(self) + * + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290 + * + * @property + * cdef inline npy_intp alignment(self) noexcept nogil: # <<<<<<<<<<<<<< + * return PyDataType_ALIGNMENT(self) + * + */ + +static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self) { + npy_intp __pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":291 + * @property + * cdef inline npy_intp alignment(self) noexcept nogil: + * return PyDataType_ALIGNMENT(self) # <<<<<<<<<<<<<< + * + * # Use fields/names with care as they may be NULL. You must check + */ + __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290 + * + * @property + * cdef inline npy_intp alignment(self) noexcept nogil: # <<<<<<<<<<<<<< + * return PyDataType_ALIGNMENT(self) + * + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296 + * # for this using PyDataType_HASFIELDS. + * @property + * cdef inline object fields(self): # <<<<<<<<<<<<<< + * return PyDataType_FIELDS(self) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("fields", 1); + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":297 + * @property + * cdef inline object fields(self): + * return PyDataType_FIELDS(self) # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296 + * # for this using PyDataType_HASFIELDS. + * @property + * cdef inline object fields(self): # <<<<<<<<<<<<<< + * return PyDataType_FIELDS(self) + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300 + * + * @property + * cdef inline tuple names(self): # <<<<<<<<<<<<<< + * return PyDataType_NAMES(self) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("names", 1); + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":301 + * @property + * cdef inline tuple names(self): + * return PyDataType_NAMES(self) # <<<<<<<<<<<<<< + * + * # Use PyDataType_HASSUBARRAY to test whether this field is + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDataType_NAMES(__pyx_v_self); + __Pyx_INCREF(((PyObject*)__pyx_t_1)); + __pyx_r = ((PyObject*)__pyx_t_1); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300 + * + * @property + * cdef inline tuple names(self): # <<<<<<<<<<<<<< + * return PyDataType_NAMES(self) + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< + * return PyDataType_SUBARRAY(self) + * + */ + +static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self) { + PyArray_ArrayDescr *__pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":308 + * @property + * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil: + * return PyDataType_SUBARRAY(self) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyDataType_SUBARRAY(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< + * return PyDataType_SUBARRAY(self) + * + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311 + * + * @property + * cdef inline npy_uint64 flags(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The data types flags.""" + * return PyDataType_FLAGS(self) + */ + +static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self) { + npy_uint64 __pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = PyDataType_FLAGS(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311 + * + * @property + * cdef inline npy_uint64 flags(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The data types flags.""" + * return PyDataType_FLAGS(self) + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323 + * + * @property + * 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) + */ + +static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self) { + int __pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323 + * + * @property + * 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) + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328 + * + * @property + * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The total broadcasted size.""" + * return PyArray_MultiIter_SIZE(self) + */ + +static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self) { + npy_intp __pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328 + * + * @property + * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The total broadcasted size.""" + * return PyArray_MultiIter_SIZE(self) + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333 + * + * @property + * cdef inline npy_intp index(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The current (1-d) index into the broadcasted result.""" + * return PyArray_MultiIter_INDEX(self) + */ + +static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self) { + npy_intp __pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333 + * + * @property + * cdef inline npy_intp index(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The current (1-d) index into the broadcasted result.""" + * return PyArray_MultiIter_INDEX(self) + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338 + * + * @property + * cdef inline int nd(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The number of dimensions in the broadcasted result.""" + * return PyArray_MultiIter_NDIM(self) + */ + +static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self) { + int __pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338 + * + * @property + * cdef inline int nd(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The number of dimensions in the broadcasted result.""" + * return PyArray_MultiIter_NDIM(self) + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343 * * @property - * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_intp* dimensions(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The shape of the broadcasted result.""" + * return PyArray_MultiIter_DIMS(self) + */ + +static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self) { + npy_intp *__pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343 + * + * @property + * cdef inline npy_intp* dimensions(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The shape of the broadcasted result.""" + * return PyArray_MultiIter_DIMS(self) + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348 + * + * @property + * cdef inline void** iters(self) noexcept nogil: # <<<<<<<<<<<<<< + * """An array of iterator objects that holds the iterators for the arrays to be broadcast together. + * On return, the iterators are adjusted for broadcasting.""" + */ + +static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self) { + void **__pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348 + * + * @property + * cdef inline void** iters(self) noexcept nogil: # <<<<<<<<<<<<<< + * """An array of iterator objects that holds the iterators for the arrays to be broadcast together. + * On return, the iterators are adjusted for broadcasting.""" + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366 + * + * @property + * cdef inline PyObject* base(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns a borrowed reference to the object owning the data/memory. * """ */ @@ -18816,7 +19265,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) { PyObject *__pyx_r; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":248 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< @@ -18826,10 +19275,10 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject __pyx_r = PyArray_BASE(__pyx_v_self); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":245 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366 * * @property - * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<< + * cdef inline PyObject* base(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns a borrowed reference to the object owning the data/memory. * """ */ @@ -18839,7 +19288,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":251 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -18853,7 +19302,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray PyArray_Descr *__pyx_t_1; __Pyx_RefNannySetupContext("descr", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":254 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< @@ -18866,7 +19315,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray __pyx_r = ((PyArray_Descr *)__pyx_t_1); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":251 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -18881,10 +19330,10 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":257 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378 * * @property - * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<< + * cdef inline int ndim(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns the number of dimensions in the array. * """ */ @@ -18892,7 +19341,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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":260 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":381 * """Returns the number of dimensions in the array. * """ * return PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -18902,10 +19351,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx __pyx_r = PyArray_NDIM(__pyx_v_self); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":257 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378 * * @property - * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<< + * cdef inline int ndim(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns the number of dimensions in the array. * """ */ @@ -18915,10 +19364,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":263 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384 * * @property - * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_intp *shape(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns a pointer to the dimensions/shape of the array. * The number of elements matches the number of dimensions of the array (ndim). */ @@ -18926,7 +19375,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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":268 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":389 * Can return NULL for 0-dimensional arrays. * """ * return PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -18936,10 +19385,10 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec __pyx_r = PyArray_DIMS(__pyx_v_self); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":263 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384 * * @property - * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_intp *shape(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns a pointer to the dimensions/shape of the array. * The number of elements matches the number of dimensions of the array (ndim). */ @@ -18949,10 +19398,10 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":271 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392 * * @property - * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_intp *strides(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns a pointer to the strides of the array. * The number of elements matches the number of dimensions of the array (ndim). */ @@ -18960,7 +19409,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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":275 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< @@ -18970,10 +19419,10 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO __pyx_r = PyArray_STRIDES(__pyx_v_self); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":271 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392 * * @property - * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_intp *strides(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns a pointer to the strides of the array. * The number of elements matches the number of dimensions of the array (ndim). */ @@ -18983,10 +19432,10 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":278 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399 * * @property - * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns the total size (in number of elements) of the array. * """ */ @@ -18994,7 +19443,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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":281 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< @@ -19004,10 +19453,10 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * __pyx_r = PyArray_SIZE(__pyx_v_self); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":278 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399 * * @property - * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns the total size (in number of elements) of the array. * """ */ @@ -19017,10 +19466,10 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":284 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405 * * @property - * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<< + * cdef inline char* data(self) noexcept nogil: # <<<<<<<<<<<<<< * """The pointer to the data buffer as a char*. * This is provided for legacy reasons to avoid direct struct field access. */ @@ -19028,20 +19477,20 @@ 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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":290 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":411 * of `PyArray_DATA()` instead, which returns a 'void*'. * """ * return PyArray_BYTES(self) # <<<<<<<<<<<<<< * - * ctypedef unsigned char npy_bool + * */ __pyx_r = PyArray_BYTES(__pyx_v_self); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":284 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405 * * @property - * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<< + * cdef inline char* data(self) noexcept nogil: # <<<<<<<<<<<<<< * """The pointer to the data buffer as a char*. * This is provided for legacy reasons to avoid direct struct field access. */ @@ -19051,8 +19500,8 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":773 - * ctypedef npy_cdouble complex_t +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806 + * ctypedef long double complex clongdouble_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(1, a) @@ -19068,7 +19517,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":774 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":807 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< @@ -19076,14 +19525,14 @@ 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(2, 774, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":773 - * ctypedef npy_cdouble complex_t + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806 + * ctypedef long double complex clongdouble_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(1, a) @@ -19101,7 +19550,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":776 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -19118,7 +19567,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":777 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":810 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< @@ -19126,13 +19575,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(2, 777, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":776 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -19151,7 +19600,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":779 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -19168,7 +19617,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":780 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< @@ -19176,13 +19625,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(2, 780, __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(2, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":779 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -19201,7 +19650,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":782 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -19218,7 +19667,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":783 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< @@ -19226,13 +19675,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(2, 783, __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(2, 816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":782 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -19251,7 +19700,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":785 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -19268,7 +19717,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":786 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< @@ -19276,13 +19725,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(2, 786, __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(2, 819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":785 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -19301,7 +19750,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":788 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -19313,9 +19762,10 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; + PyObject *__pyx_t_2; __Pyx_RefNannySetupContext("PyDataType_SHAPE", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":789 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -19325,7 +19775,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d); if (__pyx_t_1) { - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":790 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< @@ -19333,11 +19783,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ * return () */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); - __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); + __pyx_t_2 = __pyx_f_5numpy_5dtype_8subarray_subarray(__pyx_v_d)->shape; + __Pyx_INCREF(((PyObject*)__pyx_t_2)); + __pyx_r = ((PyObject*)__pyx_t_2); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":789 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -19346,7 +19797,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ */ } - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":792 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":825 * return d.subarray.shape * else: * return () # <<<<<<<<<<<<<< @@ -19360,7 +19811,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ goto __pyx_L0; } - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":788 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -19375,10 +19826,10 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":968 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< + * 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) */ @@ -19389,28 +19840,28 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":969 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1010 * - * cdef inline void set_array_base(ndarray arr, object base): + * 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) * */ Py_INCREF(__pyx_v_base); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":970 - * cdef inline void set_array_base(ndarray arr, object base): + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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(2, 970, __pyx_L1_error) + __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 1011, __pyx_L1_error) - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":968 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< + * 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) */ @@ -19422,7 +19873,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a __pyx_L0:; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":972 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -19437,7 +19888,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":973 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1014 * * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< @@ -19446,7 +19897,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ __pyx_v_base = PyArray_BASE(__pyx_v_arr); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":974 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< @@ -19456,7 +19907,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_t_1 = (__pyx_v_base == NULL); if (__pyx_t_1) { - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":975 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1016 * base = PyArray_BASE(arr) * if base is NULL: * return None # <<<<<<<<<<<<<< @@ -19467,7 +19918,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":974 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< @@ -19476,7 +19927,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ } - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":976 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1017 * if base is NULL: * return None * return base # <<<<<<<<<<<<<< @@ -19488,7 +19939,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = ((PyObject *)__pyx_v_base); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":972 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -19503,7 +19954,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":980 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< @@ -19527,7 +19978,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_array", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19543,16 +19994,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":982 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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") + * raise ImportError("numpy._core.multiarray failed to import") */ - __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 982, __pyx_L3_error) + __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1023, __pyx_L3_error) - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19566,37 +20017,37 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":983 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1024 * try: * __pyx_import_array() * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") + * raise ImportError("numpy._core.multiarray failed to import") * */ __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(2, 983, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1024, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":984 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025 * __pyx_import_array() * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< + * 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__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 984, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 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(2, 984, __pyx_L5_except_error) + __PYX_ERR(2, 1025, __pyx_L5_except_error) } goto __pyx_L5_except_error; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19612,7 +20063,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __pyx_L8_try_end:; } - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":980 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< @@ -19635,8 +20086,8 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":986 - * raise ImportError("numpy.core.multiarray failed to import") +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< * try: @@ -19659,7 +20110,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_umath", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -19675,16 +20126,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":988 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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") + * raise ImportError("numpy._core.umath failed to import") */ - __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 988, __pyx_L3_error) + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1029, __pyx_L3_error) - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -19698,37 +20149,37 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":989 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1030 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") + * raise ImportError("numpy._core.umath failed to import") * */ __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(2, 989, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1030, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":990 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031 * _import_umath() * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * 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__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 990, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 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(2, 990, __pyx_L5_except_error) + __PYX_ERR(2, 1031, __pyx_L5_except_error) } goto __pyx_L5_except_error; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -19744,8 +20195,8 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __pyx_L8_try_end:; } - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":986 - * raise ImportError("numpy.core.multiarray failed to import") + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< * try: @@ -19767,8 +20218,8 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":992 - * raise ImportError("numpy.core.umath failed to import") +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< * try: @@ -19791,7 +20242,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_ufunc", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -19807,16 +20258,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":994 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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") + * raise ImportError("numpy._core.umath failed to import") */ - __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 994, __pyx_L3_error) + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1035, __pyx_L3_error) - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -19830,37 +20281,37 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":995 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1036 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") + * raise ImportError("numpy._core.umath failed to import") * */ __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(2, 995, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1036, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":996 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1037 * _import_umath() * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<< * * */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 996, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 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(2, 996, __pyx_L5_except_error) + __PYX_ERR(2, 1037, __pyx_L5_except_error) } goto __pyx_L5_except_error; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -19876,8 +20327,8 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __pyx_L8_try_end:; } - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":992 - * raise ImportError("numpy.core.umath failed to import") + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< * try: @@ -19899,10 +20350,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":999 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040 * * - * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< + * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<< * """ * Cython equivalent of `isinstance(obj, np.timedelta64)` */ @@ -19910,7 +20361,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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1011 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1052 * bool * """ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< @@ -19920,10 +20371,10 @@ 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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":999 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040 * * - * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< + * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<< * """ * Cython equivalent of `isinstance(obj, np.timedelta64)` */ @@ -19933,10 +20384,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1014 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055 * * - * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< + * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<< * """ * Cython equivalent of `isinstance(obj, np.datetime64)` */ @@ -19944,7 +20395,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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1026 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1067 * bool * """ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< @@ -19954,10 +20405,10 @@ 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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1014 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055 * * - * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< + * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<< * """ * Cython equivalent of `isinstance(obj, np.datetime64)` */ @@ -19967,10 +20418,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1029 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070 * * - * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< * """ * returns the int64 value underlying scalar numpy datetime64 object */ @@ -19978,7 +20429,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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1036 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1077 * also needed. That can be found using `get_datetime64_unit`. * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -19988,10 +20439,10 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1029 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070 * * - * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< * """ * returns the int64 value underlying scalar numpy datetime64 object */ @@ -20001,10 +20452,10 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1039 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080 * * - * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< * """ * returns the int64 value underlying scalar numpy timedelta64 object */ @@ -20012,7 +20463,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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1043 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1084 * returns the int64 value underlying scalar numpy timedelta64 object * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -20022,10 +20473,10 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1039 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080 * * - * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< * """ * returns the int64 value underlying scalar numpy timedelta64 object */ @@ -20035,10 +20486,10 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1046 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087 * * - * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<< * """ * returns the unit part of the dtype for a numpy datetime64 object. */ @@ -20046,18 +20497,20 @@ 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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1050 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< + * + * */ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1046 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087 * * - * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<< * """ * returns the unit part of the dtype for a numpy datetime64 object. */ @@ -20067,7 +20520,7 @@ static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObjec return __pyx_r; } -/* "pytesmo/metrics/_fast_pairwise.pyx":11 +/* "pytesmo/metrics/_fast_pairwise.pyx":12 * * * cpdef _moments_welford(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -20127,7 +20580,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_1_moments_welford(P (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -20135,9 +20588,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_1_moments_welford(P (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 11, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 12, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -20145,9 +20598,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_1_moments_welford(P (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 11, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 12, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -20155,21 +20608,21 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_1_moments_welford(P (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 11, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 12, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 11, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 12, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -20191,7 +20644,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_1_moments_welford(P } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 11, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 12, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -20262,18 +20715,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; - Py_ssize_t __pyx_t_18; - int __pyx_t_19; + unsigned int __pyx_t_18; + Py_ssize_t __pyx_t_19; + int __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_moments_welford", 0); __Pyx_INCREF(__pyx_v_kwargs); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 11, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 12, __pyx_L1_error); __pyx_v_dest_sig = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_v_kwargs != Py_None); @@ -20282,7 +20736,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_3); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; @@ -20290,21 +20744,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None); } - __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_v_itemsize = -1L; if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 12, __pyx_L1_error) __pyx_t_2 = (0 < __pyx_t_5); if (__pyx_t_2) { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0); __Pyx_INCREF(__pyx_t_1); @@ -20320,17 +20774,17 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L7_bool_binop_done:; if (likely(__pyx_t_2)) { if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_arg = __pyx_t_1; __pyx_t_1 = 0; @@ -20339,31 +20793,31 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY /*else*/ { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 11, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 12, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 11, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 12, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_s); __Pyx_GIVEREF(__pyx_n_s_s); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 11, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 12, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } __pyx_L6:; while (1) { @@ -20371,7 +20825,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY if (__pyx_t_2) { __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -20379,13 +20833,13 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY } __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_base = __pyx_t_6; __pyx_t_6 = 0; __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -20406,14 +20860,14 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY __pyx_v_itemsize = -1L; __pyx_t_2 = (__pyx_v_dtype != Py_None); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_itemsize = __pyx_t_5; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_kind = __pyx_t_7; __pyx_v_dtype_signed = (__pyx_v_kind == 0x69); @@ -20428,15 +20882,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY __pyx_t_2 = __pyx_t_4; goto __pyx_L16_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L16_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 12, __pyx_L1_error) goto __pyx_L10_break; } __pyx_t_4 = ((sizeof(double)) == __pyx_v_itemsize); @@ -20445,15 +20899,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY __pyx_t_2 = __pyx_t_4; goto __pyx_L19_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L19_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 12, __pyx_L1_error) goto __pyx_L10_break; } break; @@ -20467,7 +20921,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY } __pyx_t_2 = (__pyx_v_arg == Py_None); if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 12, __pyx_L1_error) goto __pyx_L10_break; } { @@ -20478,7 +20932,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L22_error) + __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_as_memoryview = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; @@ -20489,7 +20943,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY goto __pyx_L33_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(float))); if (!__pyx_t_4) { } else { @@ -20503,7 +20957,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY goto __pyx_L31_bool_binop_done; } __pyx_L32_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L31_bool_binop_done:; @@ -20513,7 +20967,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 11, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 12, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -20525,7 +20979,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY goto __pyx_L39_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(double))); if (!__pyx_t_4) { } else { @@ -20539,7 +20993,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY goto __pyx_L37_bool_binop_done; } __pyx_L38_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L37_bool_binop_done:; @@ -20549,7 +21003,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 11, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 12, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -20567,7 +21021,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY __pyx_t_11 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_ValueError, __pyx_builtin_TypeError); if (__pyx_t_11) { __Pyx_AddTraceback("pytesmo.metrics._fast_pairwise.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 11, __pyx_L24_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 12, __pyx_L24_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_13); @@ -20596,19 +21050,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L29_try_end:; } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 12, __pyx_L1_error) goto __pyx_L10_break; } __pyx_L10_break:; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_2); if (__pyx_t_4) { __pyx_t_5 = 0; if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = __pyx_t_1; @@ -20616,7 +21070,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY while (1) { __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_13, __pyx_t_14, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_11); if (unlikely(__pyx_t_15 == 0)) break; - if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1); __pyx_t_1 = 0; @@ -20624,10 +21078,10 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16); @@ -20636,23 +21090,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_kp_s__11}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_16); @@ -20661,34 +21115,34 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s__12}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_18 = PyList_GET_SIZE(__pyx_t_16); - if (unlikely(__pyx_t_18 < 1)) { - __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_18); __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_19 = PyList_GET_SIZE(__pyx_t_16); + if (unlikely(__pyx_t_19 < 1)) { + __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_19); __PYX_ERR(0, 12, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_19-1); ((PyVarObject*)__pyx_t_16)->ob_size--; #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_19-1); #endif __Pyx_GOTREF(__pyx_t_6); #if !CYTHON_COMPILING_IN_CPYTHON - __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_18-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_19-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = __pyx_t_17; __pyx_t_17 = NULL; @@ -20700,36 +21154,36 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) if (__pyx_t_4) { - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -20738,9 +21192,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY /*else*/ { if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = __pyx_t_6; __Pyx_INCREF(__pyx_t_16); @@ -20753,21 +21207,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 12, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } - __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v__fused_sigindex); __Pyx_GIVEREF(__pyx_v__fused_sigindex); - if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 11, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 12, __pyx_L1_error); __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_13); @@ -20776,23 +21230,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #endif if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; @@ -20804,25 +21258,25 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -20832,85 +21286,85 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L53; } /*else*/ { - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sigindex_matches); __Pyx_GIVEREF(__pyx_v_sigindex_matches); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 11, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 12, __pyx_L1_error); __Pyx_INCREF(__pyx_v_sigindex_candidates); __Pyx_GIVEREF(__pyx_v_sigindex_candidates); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 11, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 12, __pyx_L1_error); __pyx_t_16 = __pyx_t_1; __Pyx_INCREF(__pyx_t_16); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_5 >= 2) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; if (unlikely(__pyx_v_search_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 12, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__pyx_v_type_match != Py_None); if (__pyx_t_4) { - __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 12, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -20947,28 +21401,28 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise__moments_welford(CY __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0); __pyx_t_4 = (!__pyx_t_2); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 12, __pyx_L1_error) __pyx_t_4 = (__pyx_t_14 > 1); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } /*else*/ { __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 11, __pyx_L1_error) + __PYX_ERR(0, 12, __pyx_L1_error) } - __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_r = __pyx_t_13; __pyx_t_13 = 0; @@ -21043,7 +21497,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0_moments_welford", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":30 + /* "pytesmo/metrics/_fast_pairwise.pyx":31 * cdef floating mx, my, mxold, myold, M2x, M2y, C * cdef floating nobs * n = len(x) # <<<<<<<<<<<<<< @@ -21053,7 +21507,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_x); __pyx_v_n = __pyx_t_1; - /* "pytesmo/metrics/_fast_pairwise.pyx":32 + /* "pytesmo/metrics/_fast_pairwise.pyx":33 * n = len(x) * * mx = my = M2x = M2y = C = 0 # <<<<<<<<<<<<<< @@ -21066,7 +21520,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments __pyx_v_M2y = 0.0; __pyx_v_C = 0.0; - /* "pytesmo/metrics/_fast_pairwise.pyx":33 + /* "pytesmo/metrics/_fast_pairwise.pyx":34 * * mx = my = M2x = M2y = C = 0 * nobs = 0 # <<<<<<<<<<<<<< @@ -21075,7 +21529,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments */ __pyx_v_nobs = 0.0; - /* "pytesmo/metrics/_fast_pairwise.pyx":34 + /* "pytesmo/metrics/_fast_pairwise.pyx":35 * mx = my = M2x = M2y = C = 0 * nobs = 0 * for i in range(n): # <<<<<<<<<<<<<< @@ -21087,7 +21541,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; - /* "pytesmo/metrics/_fast_pairwise.pyx":35 + /* "pytesmo/metrics/_fast_pairwise.pyx":36 * nobs = 0 * for i in range(n): * nobs += 1 # <<<<<<<<<<<<<< @@ -21096,7 +21550,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments */ __pyx_v_nobs = (__pyx_v_nobs + 1.0); - /* "pytesmo/metrics/_fast_pairwise.pyx":36 + /* "pytesmo/metrics/_fast_pairwise.pyx":37 * for i in range(n): * nobs += 1 * mxold = mx # <<<<<<<<<<<<<< @@ -21105,7 +21559,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments */ __pyx_v_mxold = __pyx_v_mx; - /* "pytesmo/metrics/_fast_pairwise.pyx":37 + /* "pytesmo/metrics/_fast_pairwise.pyx":38 * nobs += 1 * mxold = mx * myold = my # <<<<<<<<<<<<<< @@ -21114,7 +21568,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments */ __pyx_v_myold = __pyx_v_my; - /* "pytesmo/metrics/_fast_pairwise.pyx":38 + /* "pytesmo/metrics/_fast_pairwise.pyx":39 * mxold = mx * myold = my * mx += (x[i] - mx) / nobs # <<<<<<<<<<<<<< @@ -21124,7 +21578,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments __pyx_t_5 = __pyx_v_i; __pyx_v_mx = (__pyx_v_mx + (((*((float *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_5 * __pyx_v_x.strides[0]) ))) - __pyx_v_mx) / __pyx_v_nobs)); - /* "pytesmo/metrics/_fast_pairwise.pyx":39 + /* "pytesmo/metrics/_fast_pairwise.pyx":40 * myold = my * mx += (x[i] - mx) / nobs * my += (y[i] - my) / nobs # <<<<<<<<<<<<<< @@ -21134,7 +21588,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments __pyx_t_5 = __pyx_v_i; __pyx_v_my = (__pyx_v_my + (((*((float *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_5 * __pyx_v_y.strides[0]) ))) - __pyx_v_my) / __pyx_v_nobs)); - /* "pytesmo/metrics/_fast_pairwise.pyx":40 + /* "pytesmo/metrics/_fast_pairwise.pyx":41 * mx += (x[i] - mx) / nobs * my += (y[i] - my) / nobs * M2x += (x[i] - mx) * (x[i] - mxold) # <<<<<<<<<<<<<< @@ -21145,7 +21599,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments __pyx_t_6 = __pyx_v_i; __pyx_v_M2x = (__pyx_v_M2x + (((*((float *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_5 * __pyx_v_x.strides[0]) ))) - __pyx_v_mx) * ((*((float *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_6 * __pyx_v_x.strides[0]) ))) - __pyx_v_mxold))); - /* "pytesmo/metrics/_fast_pairwise.pyx":41 + /* "pytesmo/metrics/_fast_pairwise.pyx":42 * my += (y[i] - my) / nobs * M2x += (x[i] - mx) * (x[i] - mxold) * M2y += (y[i] - my) * (y[i] - myold) # <<<<<<<<<<<<<< @@ -21156,7 +21610,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments __pyx_t_5 = __pyx_v_i; __pyx_v_M2y = (__pyx_v_M2y + (((*((float *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_6 * __pyx_v_y.strides[0]) ))) - __pyx_v_my) * ((*((float *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_5 * __pyx_v_y.strides[0]) ))) - __pyx_v_myold))); - /* "pytesmo/metrics/_fast_pairwise.pyx":42 + /* "pytesmo/metrics/_fast_pairwise.pyx":43 * M2x += (x[i] - mx) * (x[i] - mxold) * M2y += (y[i] - my) * (y[i] - myold) * C += (x[i] - mx) * (y[i] - myold) # <<<<<<<<<<<<<< @@ -21168,7 +21622,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments __pyx_v_C = (__pyx_v_C + (((*((float *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_5 * __pyx_v_x.strides[0]) ))) - __pyx_v_mx) * ((*((float *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_6 * __pyx_v_y.strides[0]) ))) - __pyx_v_myold))); } - /* "pytesmo/metrics/_fast_pairwise.pyx":43 + /* "pytesmo/metrics/_fast_pairwise.pyx":44 * M2y += (y[i] - my) * (y[i] - myold) * C += (x[i] - mx) * (y[i] - myold) * return mx, my, M2x/n, M2y/n, C/n # <<<<<<<<<<<<<< @@ -21176,28 +21630,28 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = PyFloat_FromDouble(__pyx_v_mx); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_7 = PyFloat_FromDouble(__pyx_v_mx); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyFloat_FromDouble(__pyx_v_my); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_8 = PyFloat_FromDouble(__pyx_v_my); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PyFloat_FromDouble((__pyx_v_M2x / ((float)__pyx_v_n))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_9 = PyFloat_FromDouble((__pyx_v_M2x / ((float)__pyx_v_n))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PyFloat_FromDouble((__pyx_v_M2y / ((float)__pyx_v_n))); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_10 = PyFloat_FromDouble((__pyx_v_M2y / ((float)__pyx_v_n))); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = PyFloat_FromDouble((__pyx_v_C / ((float)__pyx_v_n))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_11 = PyFloat_FromDouble((__pyx_v_C / ((float)__pyx_v_n))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = PyTuple_New(5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7)) __PYX_ERR(0, 43, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7)) __PYX_ERR(0, 44, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_8)) __PYX_ERR(0, 43, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_8)) __PYX_ERR(0, 44, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_9); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_9)) __PYX_ERR(0, 43, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_9)) __PYX_ERR(0, 44, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_10); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_10)) __PYX_ERR(0, 43, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_10)) __PYX_ERR(0, 44, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_11); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 4, __pyx_t_11)) __PYX_ERR(0, 43, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 4, __pyx_t_11)) __PYX_ERR(0, 44, __pyx_L1_error); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; @@ -21207,7 +21661,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments __pyx_t_12 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":11 + /* "pytesmo/metrics/_fast_pairwise.pyx":12 * * * cpdef _moments_welford(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -21271,7 +21725,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_27__pyx_fuse_0_mome (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -21279,14 +21733,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_27__pyx_fuse_0_mome (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_moments_welford", 1, 2, 2, 1); __PYX_ERR(0, 11, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_moments_welford", 1, 2, 2, 1); __PYX_ERR(0, 12, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0_moments_welford") < 0)) __PYX_ERR(0, 11, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0_moments_welford") < 0)) __PYX_ERR(0, 12, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -21294,12 +21748,12 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_27__pyx_fuse_0_mome values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); } - __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 11, __pyx_L3_error) - __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 11, __pyx_L3_error) + __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 12, __pyx_L3_error) + __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 12, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_moments_welford", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 11, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_moments_welford", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 12, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -21339,9 +21793,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_26__pyx_fuse_0_mome int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0_moments_welford", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 11, __pyx_L1_error) } - if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 11, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments_welford(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 12, __pyx_L1_error) } + if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 12, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments_welford(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21390,7 +21844,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1_moments_welford", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":30 + /* "pytesmo/metrics/_fast_pairwise.pyx":31 * cdef floating mx, my, mxold, myold, M2x, M2y, C * cdef floating nobs * n = len(x) # <<<<<<<<<<<<<< @@ -21400,7 +21854,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_x); __pyx_v_n = __pyx_t_1; - /* "pytesmo/metrics/_fast_pairwise.pyx":32 + /* "pytesmo/metrics/_fast_pairwise.pyx":33 * n = len(x) * * mx = my = M2x = M2y = C = 0 # <<<<<<<<<<<<<< @@ -21413,7 +21867,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments __pyx_v_M2y = 0.0; __pyx_v_C = 0.0; - /* "pytesmo/metrics/_fast_pairwise.pyx":33 + /* "pytesmo/metrics/_fast_pairwise.pyx":34 * * mx = my = M2x = M2y = C = 0 * nobs = 0 # <<<<<<<<<<<<<< @@ -21422,7 +21876,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments */ __pyx_v_nobs = 0.0; - /* "pytesmo/metrics/_fast_pairwise.pyx":34 + /* "pytesmo/metrics/_fast_pairwise.pyx":35 * mx = my = M2x = M2y = C = 0 * nobs = 0 * for i in range(n): # <<<<<<<<<<<<<< @@ -21434,7 +21888,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; - /* "pytesmo/metrics/_fast_pairwise.pyx":35 + /* "pytesmo/metrics/_fast_pairwise.pyx":36 * nobs = 0 * for i in range(n): * nobs += 1 # <<<<<<<<<<<<<< @@ -21443,7 +21897,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments */ __pyx_v_nobs = (__pyx_v_nobs + 1.0); - /* "pytesmo/metrics/_fast_pairwise.pyx":36 + /* "pytesmo/metrics/_fast_pairwise.pyx":37 * for i in range(n): * nobs += 1 * mxold = mx # <<<<<<<<<<<<<< @@ -21452,7 +21906,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments */ __pyx_v_mxold = __pyx_v_mx; - /* "pytesmo/metrics/_fast_pairwise.pyx":37 + /* "pytesmo/metrics/_fast_pairwise.pyx":38 * nobs += 1 * mxold = mx * myold = my # <<<<<<<<<<<<<< @@ -21461,7 +21915,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments */ __pyx_v_myold = __pyx_v_my; - /* "pytesmo/metrics/_fast_pairwise.pyx":38 + /* "pytesmo/metrics/_fast_pairwise.pyx":39 * mxold = mx * myold = my * mx += (x[i] - mx) / nobs # <<<<<<<<<<<<<< @@ -21471,7 +21925,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments __pyx_t_5 = __pyx_v_i; __pyx_v_mx = (__pyx_v_mx + (((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_5 * __pyx_v_x.strides[0]) ))) - __pyx_v_mx) / __pyx_v_nobs)); - /* "pytesmo/metrics/_fast_pairwise.pyx":39 + /* "pytesmo/metrics/_fast_pairwise.pyx":40 * myold = my * mx += (x[i] - mx) / nobs * my += (y[i] - my) / nobs # <<<<<<<<<<<<<< @@ -21481,7 +21935,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments __pyx_t_5 = __pyx_v_i; __pyx_v_my = (__pyx_v_my + (((*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_5 * __pyx_v_y.strides[0]) ))) - __pyx_v_my) / __pyx_v_nobs)); - /* "pytesmo/metrics/_fast_pairwise.pyx":40 + /* "pytesmo/metrics/_fast_pairwise.pyx":41 * mx += (x[i] - mx) / nobs * my += (y[i] - my) / nobs * M2x += (x[i] - mx) * (x[i] - mxold) # <<<<<<<<<<<<<< @@ -21492,7 +21946,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments __pyx_t_6 = __pyx_v_i; __pyx_v_M2x = (__pyx_v_M2x + (((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_5 * __pyx_v_x.strides[0]) ))) - __pyx_v_mx) * ((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_6 * __pyx_v_x.strides[0]) ))) - __pyx_v_mxold))); - /* "pytesmo/metrics/_fast_pairwise.pyx":41 + /* "pytesmo/metrics/_fast_pairwise.pyx":42 * my += (y[i] - my) / nobs * M2x += (x[i] - mx) * (x[i] - mxold) * M2y += (y[i] - my) * (y[i] - myold) # <<<<<<<<<<<<<< @@ -21503,7 +21957,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments __pyx_t_5 = __pyx_v_i; __pyx_v_M2y = (__pyx_v_M2y + (((*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_6 * __pyx_v_y.strides[0]) ))) - __pyx_v_my) * ((*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_5 * __pyx_v_y.strides[0]) ))) - __pyx_v_myold))); - /* "pytesmo/metrics/_fast_pairwise.pyx":42 + /* "pytesmo/metrics/_fast_pairwise.pyx":43 * M2x += (x[i] - mx) * (x[i] - mxold) * M2y += (y[i] - my) * (y[i] - myold) * C += (x[i] - mx) * (y[i] - myold) # <<<<<<<<<<<<<< @@ -21515,7 +21969,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments __pyx_v_C = (__pyx_v_C + (((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_5 * __pyx_v_x.strides[0]) ))) - __pyx_v_mx) * ((*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_6 * __pyx_v_y.strides[0]) ))) - __pyx_v_myold))); } - /* "pytesmo/metrics/_fast_pairwise.pyx":43 + /* "pytesmo/metrics/_fast_pairwise.pyx":44 * M2y += (y[i] - my) * (y[i] - myold) * C += (x[i] - mx) * (y[i] - myold) * return mx, my, M2x/n, M2y/n, C/n # <<<<<<<<<<<<<< @@ -21523,28 +21977,28 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = PyFloat_FromDouble(__pyx_v_mx); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_7 = PyFloat_FromDouble(__pyx_v_mx); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyFloat_FromDouble(__pyx_v_my); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_8 = PyFloat_FromDouble(__pyx_v_my); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PyFloat_FromDouble((__pyx_v_M2x / ((double)__pyx_v_n))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_9 = PyFloat_FromDouble((__pyx_v_M2x / ((double)__pyx_v_n))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PyFloat_FromDouble((__pyx_v_M2y / ((double)__pyx_v_n))); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_10 = PyFloat_FromDouble((__pyx_v_M2y / ((double)__pyx_v_n))); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = PyFloat_FromDouble((__pyx_v_C / ((double)__pyx_v_n))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_11 = PyFloat_FromDouble((__pyx_v_C / ((double)__pyx_v_n))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = PyTuple_New(5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7)) __PYX_ERR(0, 43, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7)) __PYX_ERR(0, 44, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_8)) __PYX_ERR(0, 43, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_8)) __PYX_ERR(0, 44, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_9); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_9)) __PYX_ERR(0, 43, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_9)) __PYX_ERR(0, 44, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_10); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_10)) __PYX_ERR(0, 43, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_10)) __PYX_ERR(0, 44, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_11); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 4, __pyx_t_11)) __PYX_ERR(0, 43, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 4, __pyx_t_11)) __PYX_ERR(0, 44, __pyx_L1_error); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; @@ -21554,7 +22008,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments __pyx_t_12 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":11 + /* "pytesmo/metrics/_fast_pairwise.pyx":12 * * * cpdef _moments_welford(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -21618,7 +22072,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_29__pyx_fuse_1_mome (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -21626,14 +22080,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_29__pyx_fuse_1_mome (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_moments_welford", 1, 2, 2, 1); __PYX_ERR(0, 11, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_moments_welford", 1, 2, 2, 1); __PYX_ERR(0, 12, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1_moments_welford") < 0)) __PYX_ERR(0, 11, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1_moments_welford") < 0)) __PYX_ERR(0, 12, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -21641,12 +22095,12 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_29__pyx_fuse_1_mome values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); } - __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 11, __pyx_L3_error) - __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 11, __pyx_L3_error) + __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 12, __pyx_L3_error) + __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 12, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_moments_welford", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 11, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_moments_welford", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 12, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -21686,9 +22140,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_28__pyx_fuse_1_mome int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1_moments_welford", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 11, __pyx_L1_error) } - if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 11, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments_welford(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 12, __pyx_L1_error) } + if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 12, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments_welford(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21705,7 +22159,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_28__pyx_fuse_1_mome return __pyx_r; } -/* "pytesmo/metrics/_fast_pairwise.pyx":48 +/* "pytesmo/metrics/_fast_pairwise.pyx":49 * * * cpdef bias(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -21765,7 +22219,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_3bias(PyObject *__p (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 49, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -21773,9 +22227,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_3bias(PyObject *__p (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 49, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 48, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 49, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -21783,9 +22237,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_3bias(PyObject *__p (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 49, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 48, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 49, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -21793,21 +22247,21 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_3bias(PyObject *__p (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 49, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 48, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 49, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 49, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 48, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 49, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -21829,7 +22283,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_3bias(PyObject *__p } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 48, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 49, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -21900,18 +22354,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; - Py_ssize_t __pyx_t_18; - int __pyx_t_19; + unsigned int __pyx_t_18; + Py_ssize_t __pyx_t_19; + int __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("bias", 0); __Pyx_INCREF(__pyx_v_kwargs); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 48, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 49, __pyx_L1_error); __pyx_v_dest_sig = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_v_kwargs != Py_None); @@ -21920,7 +22375,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 49, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_3); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; @@ -21928,21 +22383,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None); } - __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_v_itemsize = -1L; if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 48, __pyx_L1_error) + __PYX_ERR(0, 49, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 49, __pyx_L1_error) __pyx_t_2 = (0 < __pyx_t_5); if (__pyx_t_2) { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 48, __pyx_L1_error) + __PYX_ERR(0, 49, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0); __Pyx_INCREF(__pyx_t_1); @@ -21958,17 +22413,17 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 48, __pyx_L1_error) + __PYX_ERR(0, 49, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 49, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L7_bool_binop_done:; if (likely(__pyx_t_2)) { if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 48, __pyx_L1_error) + __PYX_ERR(0, 49, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_arg = __pyx_t_1; __pyx_t_1 = 0; @@ -21977,31 +22432,31 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED /*else*/ { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 48, __pyx_L1_error) + __PYX_ERR(0, 49, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 48, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 49, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 48, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 49, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_s); __Pyx_GIVEREF(__pyx_n_s_s); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 48, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 49, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 48, __pyx_L1_error) + __PYX_ERR(0, 49, __pyx_L1_error) } __pyx_L6:; while (1) { @@ -22009,7 +22464,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED if (__pyx_t_2) { __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -22017,13 +22472,13 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED } __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_base = __pyx_t_6; __pyx_t_6 = 0; __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -22044,14 +22499,14 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED __pyx_v_itemsize = -1L; __pyx_t_2 = (__pyx_v_dtype != Py_None); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_itemsize = __pyx_t_5; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_kind = __pyx_t_7; __pyx_v_dtype_signed = (__pyx_v_kind == 0x69); @@ -22066,15 +22521,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED __pyx_t_2 = __pyx_t_4; goto __pyx_L16_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L16_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 49, __pyx_L1_error) goto __pyx_L10_break; } __pyx_t_4 = ((sizeof(double)) == __pyx_v_itemsize); @@ -22083,15 +22538,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED __pyx_t_2 = __pyx_t_4; goto __pyx_L19_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L19_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 49, __pyx_L1_error) goto __pyx_L10_break; } break; @@ -22105,7 +22560,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED } __pyx_t_2 = (__pyx_v_arg == Py_None); if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 49, __pyx_L1_error) goto __pyx_L10_break; } { @@ -22116,7 +22571,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L22_error) + __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_as_memoryview = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; @@ -22127,7 +22582,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED goto __pyx_L33_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 49, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(float))); if (!__pyx_t_4) { } else { @@ -22141,7 +22596,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED goto __pyx_L31_bool_binop_done; } __pyx_L32_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 49, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L31_bool_binop_done:; @@ -22151,7 +22606,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 48, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 49, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -22163,7 +22618,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED goto __pyx_L39_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 49, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(double))); if (!__pyx_t_4) { } else { @@ -22177,7 +22632,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED goto __pyx_L37_bool_binop_done; } __pyx_L38_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 49, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L37_bool_binop_done:; @@ -22187,7 +22642,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 48, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 49, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -22205,7 +22660,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED __pyx_t_11 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_ValueError, __pyx_builtin_TypeError); if (__pyx_t_11) { __Pyx_AddTraceback("pytesmo.metrics._fast_pairwise.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 48, __pyx_L24_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 49, __pyx_L24_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_13); @@ -22234,19 +22689,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L29_try_end:; } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 49, __pyx_L1_error) goto __pyx_L10_break; } __pyx_L10_break:; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 49, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_2); if (__pyx_t_4) { __pyx_t_5 = 0; if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 48, __pyx_L1_error) + __PYX_ERR(0, 49, __pyx_L1_error) } - __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = __pyx_t_1; @@ -22254,7 +22709,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED while (1) { __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_13, __pyx_t_14, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_11); if (unlikely(__pyx_t_15 == 0)) break; - if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1); __pyx_t_1 = 0; @@ -22262,10 +22717,10 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16); @@ -22274,23 +22729,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_kp_s__11}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_16); @@ -22299,34 +22754,34 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s__12}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_18 = PyList_GET_SIZE(__pyx_t_16); - if (unlikely(__pyx_t_18 < 1)) { - __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_18); __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_19 = PyList_GET_SIZE(__pyx_t_16); + if (unlikely(__pyx_t_19 < 1)) { + __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_19); __PYX_ERR(0, 49, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_19-1); ((PyVarObject*)__pyx_t_16)->ob_size--; #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_19-1); #endif __Pyx_GOTREF(__pyx_t_6); #if !CYTHON_COMPILING_IN_CPYTHON - __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_18-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_19-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = __pyx_t_17; __pyx_t_17 = NULL; @@ -22338,36 +22793,36 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 49, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 49, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 48, __pyx_L1_error) + __PYX_ERR(0, 49, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 49, __pyx_L1_error) if (__pyx_t_4) { - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 48, __pyx_L1_error) + __PYX_ERR(0, 49, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -22376,9 +22831,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED /*else*/ { if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 48, __pyx_L1_error) + __PYX_ERR(0, 49, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = __pyx_t_6; __Pyx_INCREF(__pyx_t_16); @@ -22391,21 +22846,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 48, __pyx_L1_error) + __PYX_ERR(0, 49, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 49, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } - __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v__fused_sigindex); __Pyx_GIVEREF(__pyx_v__fused_sigindex); - if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 48, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 49, __pyx_L1_error); __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_13); @@ -22414,23 +22869,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 49, __pyx_L1_error) #endif if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 49, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; @@ -22442,25 +22897,25 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 49, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 49, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 48, __pyx_L1_error) + __PYX_ERR(0, 49, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -22470,85 +22925,85 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 49, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 49, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 48, __pyx_L1_error) + __PYX_ERR(0, 49, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L53; } /*else*/ { - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sigindex_matches); __Pyx_GIVEREF(__pyx_v_sigindex_matches); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 48, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 49, __pyx_L1_error); __Pyx_INCREF(__pyx_v_sigindex_candidates); __Pyx_GIVEREF(__pyx_v_sigindex_candidates); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 48, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 49, __pyx_L1_error); __pyx_t_16 = __pyx_t_1; __Pyx_INCREF(__pyx_t_16); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_5 >= 2) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 49, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; if (unlikely(__pyx_v_search_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 48, __pyx_L1_error) + __PYX_ERR(0, 49, __pyx_L1_error) } __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 49, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 49, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 48, __pyx_L1_error) + __PYX_ERR(0, 49, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__pyx_v_type_match != Py_None); if (__pyx_t_4) { - __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 49, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -22585,28 +23040,28 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_2bias(CYTHON_UNUSED __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0); __pyx_t_4 = (!__pyx_t_2); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 48, __pyx_L1_error) + __PYX_ERR(0, 49, __pyx_L1_error) } - __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 49, __pyx_L1_error) __pyx_t_4 = (__pyx_t_14 > 1); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 48, __pyx_L1_error) + __PYX_ERR(0, 49, __pyx_L1_error) } /*else*/ { __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 48, __pyx_L1_error) + __PYX_ERR(0, 49, __pyx_L1_error) } - __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_r = __pyx_t_13; __pyx_t_13 = 0; @@ -22669,7 +23124,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__P int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0bias", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":66 + /* "pytesmo/metrics/_fast_pairwise.pyx":67 * Bias between x and y. * """ * cdef floating b = 0 # <<<<<<<<<<<<<< @@ -22678,7 +23133,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__P */ __pyx_v_b = 0.0; - /* "pytesmo/metrics/_fast_pairwise.pyx":67 + /* "pytesmo/metrics/_fast_pairwise.pyx":68 * """ * cdef floating b = 0 * cdef int i, n = len(x) # <<<<<<<<<<<<<< @@ -22688,7 +23143,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__P __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_x); __pyx_v_n = __pyx_t_1; - /* "pytesmo/metrics/_fast_pairwise.pyx":68 + /* "pytesmo/metrics/_fast_pairwise.pyx":69 * cdef floating b = 0 * cdef int i, n = len(x) * for i in range(n): # <<<<<<<<<<<<<< @@ -22700,7 +23155,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__P for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; - /* "pytesmo/metrics/_fast_pairwise.pyx":69 + /* "pytesmo/metrics/_fast_pairwise.pyx":70 * cdef int i, n = len(x) * for i in range(n): * b += x[i] - y[i] # <<<<<<<<<<<<<< @@ -22712,7 +23167,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__P __pyx_v_b = (__pyx_v_b + ((*((float *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_5 * __pyx_v_x.strides[0]) ))) - (*((float *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_6 * __pyx_v_y.strides[0]) ))))); } - /* "pytesmo/metrics/_fast_pairwise.pyx":70 + /* "pytesmo/metrics/_fast_pairwise.pyx":71 * for i in range(n): * b += x[i] - y[i] * return b / n # <<<<<<<<<<<<<< @@ -22720,13 +23175,13 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__P * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = PyFloat_FromDouble((__pyx_v_b / ((float)__pyx_v_n))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_7 = PyFloat_FromDouble((__pyx_v_b / ((float)__pyx_v_n))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":48 + /* "pytesmo/metrics/_fast_pairwise.pyx":49 * * * cpdef bias(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -22785,7 +23240,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_33__pyx_fuse_0bias( (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 49, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -22793,14 +23248,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_33__pyx_fuse_0bias( (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 49, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0bias", 1, 2, 2, 1); __PYX_ERR(0, 48, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0bias", 1, 2, 2, 1); __PYX_ERR(0, 49, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0bias") < 0)) __PYX_ERR(0, 48, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0bias") < 0)) __PYX_ERR(0, 49, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -22808,12 +23263,12 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_33__pyx_fuse_0bias( values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); } - __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 48, __pyx_L3_error) - __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 48, __pyx_L3_error) + __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 49, __pyx_L3_error) + __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 49, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0bias", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 48, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0bias", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 49, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -22853,9 +23308,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_32__pyx_fuse_0bias( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0bias", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 48, __pyx_L1_error) } - if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 48, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 49, __pyx_L1_error) } + if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 49, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -22892,7 +23347,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__P int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1bias", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":66 + /* "pytesmo/metrics/_fast_pairwise.pyx":67 * Bias between x and y. * """ * cdef floating b = 0 # <<<<<<<<<<<<<< @@ -22901,7 +23356,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__P */ __pyx_v_b = 0.0; - /* "pytesmo/metrics/_fast_pairwise.pyx":67 + /* "pytesmo/metrics/_fast_pairwise.pyx":68 * """ * cdef floating b = 0 * cdef int i, n = len(x) # <<<<<<<<<<<<<< @@ -22911,7 +23366,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__P __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_x); __pyx_v_n = __pyx_t_1; - /* "pytesmo/metrics/_fast_pairwise.pyx":68 + /* "pytesmo/metrics/_fast_pairwise.pyx":69 * cdef floating b = 0 * cdef int i, n = len(x) * for i in range(n): # <<<<<<<<<<<<<< @@ -22923,7 +23378,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__P for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; - /* "pytesmo/metrics/_fast_pairwise.pyx":69 + /* "pytesmo/metrics/_fast_pairwise.pyx":70 * cdef int i, n = len(x) * for i in range(n): * b += x[i] - y[i] # <<<<<<<<<<<<<< @@ -22935,7 +23390,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__P __pyx_v_b = (__pyx_v_b + ((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_5 * __pyx_v_x.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_6 * __pyx_v_y.strides[0]) ))))); } - /* "pytesmo/metrics/_fast_pairwise.pyx":70 + /* "pytesmo/metrics/_fast_pairwise.pyx":71 * for i in range(n): * b += x[i] - y[i] * return b / n # <<<<<<<<<<<<<< @@ -22943,13 +23398,13 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__P * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = PyFloat_FromDouble((__pyx_v_b / ((double)__pyx_v_n))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_7 = PyFloat_FromDouble((__pyx_v_b / ((double)__pyx_v_n))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":48 + /* "pytesmo/metrics/_fast_pairwise.pyx":49 * * * cpdef bias(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -23008,7 +23463,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_35__pyx_fuse_1bias( (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 49, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -23016,14 +23471,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_35__pyx_fuse_1bias( (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 49, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1bias", 1, 2, 2, 1); __PYX_ERR(0, 48, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1bias", 1, 2, 2, 1); __PYX_ERR(0, 49, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1bias") < 0)) __PYX_ERR(0, 48, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1bias") < 0)) __PYX_ERR(0, 49, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -23031,12 +23486,12 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_35__pyx_fuse_1bias( values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); } - __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 48, __pyx_L3_error) - __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 48, __pyx_L3_error) + __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 49, __pyx_L3_error) + __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 49, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1bias", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 48, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1bias", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 49, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -23076,9 +23531,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_34__pyx_fuse_1bias( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1bias", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 48, __pyx_L1_error) } - if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 48, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 49, __pyx_L1_error) } + if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 49, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -23095,7 +23550,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_34__pyx_fuse_1bias( return __pyx_r; } -/* "pytesmo/metrics/_fast_pairwise.pyx":73 +/* "pytesmo/metrics/_fast_pairwise.pyx":74 * * * cpdef RSS(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -23155,7 +23610,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_5RSS(PyObject *__py (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -23163,9 +23618,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_5RSS(PyObject *__py (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 73, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 74, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -23173,9 +23628,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_5RSS(PyObject *__py (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 73, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 74, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -23183,21 +23638,21 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_5RSS(PyObject *__py (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 73, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 74, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 73, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 74, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -23219,7 +23674,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_5RSS(PyObject *__py } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 73, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 74, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -23290,18 +23745,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; - Py_ssize_t __pyx_t_18; - int __pyx_t_19; + unsigned int __pyx_t_18; + Py_ssize_t __pyx_t_19; + int __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("RSS", 0); __Pyx_INCREF(__pyx_v_kwargs); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 73, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 74, __pyx_L1_error); __pyx_v_dest_sig = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_v_kwargs != Py_None); @@ -23310,7 +23766,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 74, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_3); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; @@ -23318,21 +23774,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None); } - __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_v_itemsize = -1L; if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 73, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 74, __pyx_L1_error) __pyx_t_2 = (0 < __pyx_t_5); if (__pyx_t_2) { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 73, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0); __Pyx_INCREF(__pyx_t_1); @@ -23348,17 +23804,17 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 73, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 74, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L7_bool_binop_done:; if (likely(__pyx_t_2)) { if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 73, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_arg = __pyx_t_1; __pyx_t_1 = 0; @@ -23367,31 +23823,31 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED /*else*/ { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 73, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 73, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 73, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 74, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_s); __Pyx_GIVEREF(__pyx_n_s_s); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 73, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 74, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 73, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } __pyx_L6:; while (1) { @@ -23399,7 +23855,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED if (__pyx_t_2) { __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -23407,13 +23863,13 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED } __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_base = __pyx_t_6; __pyx_t_6 = 0; __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -23434,14 +23890,14 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED __pyx_v_itemsize = -1L; __pyx_t_2 = (__pyx_v_dtype != Py_None); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_itemsize = __pyx_t_5; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_kind = __pyx_t_7; __pyx_v_dtype_signed = (__pyx_v_kind == 0x69); @@ -23456,15 +23912,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED __pyx_t_2 = __pyx_t_4; goto __pyx_L16_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L16_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 74, __pyx_L1_error) goto __pyx_L10_break; } __pyx_t_4 = ((sizeof(double)) == __pyx_v_itemsize); @@ -23473,15 +23929,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED __pyx_t_2 = __pyx_t_4; goto __pyx_L19_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L19_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 74, __pyx_L1_error) goto __pyx_L10_break; } break; @@ -23495,7 +23951,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED } __pyx_t_2 = (__pyx_v_arg == Py_None); if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 74, __pyx_L1_error) goto __pyx_L10_break; } { @@ -23506,7 +23962,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L22_error) + __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_as_memoryview = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; @@ -23517,7 +23973,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED goto __pyx_L33_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(float))); if (!__pyx_t_4) { } else { @@ -23531,7 +23987,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED goto __pyx_L31_bool_binop_done; } __pyx_L32_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L31_bool_binop_done:; @@ -23541,7 +23997,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 73, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 74, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -23553,7 +24009,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED goto __pyx_L39_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(double))); if (!__pyx_t_4) { } else { @@ -23567,7 +24023,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED goto __pyx_L37_bool_binop_done; } __pyx_L38_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L37_bool_binop_done:; @@ -23577,7 +24033,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 73, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 74, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -23595,7 +24051,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED __pyx_t_11 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_ValueError, __pyx_builtin_TypeError); if (__pyx_t_11) { __Pyx_AddTraceback("pytesmo.metrics._fast_pairwise.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 73, __pyx_L24_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 74, __pyx_L24_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_13); @@ -23624,19 +24080,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L29_try_end:; } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 74, __pyx_L1_error) goto __pyx_L10_break; } __pyx_L10_break:; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 74, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_2); if (__pyx_t_4) { __pyx_t_5 = 0; if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 73, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } - __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = __pyx_t_1; @@ -23644,7 +24100,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED while (1) { __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_13, __pyx_t_14, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_11); if (unlikely(__pyx_t_15 == 0)) break; - if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1); __pyx_t_1 = 0; @@ -23652,10 +24108,10 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16); @@ -23664,23 +24120,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_kp_s__11}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_16); @@ -23689,34 +24145,34 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s__12}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_18 = PyList_GET_SIZE(__pyx_t_16); - if (unlikely(__pyx_t_18 < 1)) { - __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_18); __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_19 = PyList_GET_SIZE(__pyx_t_16); + if (unlikely(__pyx_t_19 < 1)) { + __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_19); __PYX_ERR(0, 74, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_19-1); ((PyVarObject*)__pyx_t_16)->ob_size--; #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_19-1); #endif __Pyx_GOTREF(__pyx_t_6); #if !CYTHON_COMPILING_IN_CPYTHON - __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_18-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_19-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = __pyx_t_17; __pyx_t_17 = NULL; @@ -23728,36 +24184,36 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 74, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 74, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 73, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 74, __pyx_L1_error) if (__pyx_t_4) { - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 73, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -23766,9 +24222,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED /*else*/ { if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 73, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = __pyx_t_6; __Pyx_INCREF(__pyx_t_16); @@ -23781,21 +24237,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 73, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 74, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } - __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v__fused_sigindex); __Pyx_GIVEREF(__pyx_v__fused_sigindex); - if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 73, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 74, __pyx_L1_error); __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_13); @@ -23804,23 +24260,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 74, __pyx_L1_error) #endif if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 74, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; @@ -23832,25 +24288,25 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 74, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 74, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 73, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -23860,85 +24316,85 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 74, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 74, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 73, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L53; } /*else*/ { - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sigindex_matches); __Pyx_GIVEREF(__pyx_v_sigindex_matches); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 73, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 74, __pyx_L1_error); __Pyx_INCREF(__pyx_v_sigindex_candidates); __Pyx_GIVEREF(__pyx_v_sigindex_candidates); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 73, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 74, __pyx_L1_error); __pyx_t_16 = __pyx_t_1; __Pyx_INCREF(__pyx_t_16); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_5 >= 2) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 74, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; if (unlikely(__pyx_v_search_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 73, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 74, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 74, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 73, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__pyx_v_type_match != Py_None); if (__pyx_t_4) { - __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 74, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -23975,28 +24431,28 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_4RSS(CYTHON_UNUSED __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0); __pyx_t_4 = (!__pyx_t_2); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 73, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } - __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 74, __pyx_L1_error) __pyx_t_4 = (__pyx_t_14 > 1); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 73, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } /*else*/ { __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 73, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) } - __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_r = __pyx_t_13; __pyx_t_13 = 0; @@ -24059,7 +24515,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_RSS(__Py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0RSS", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":89 + /* "pytesmo/metrics/_fast_pairwise.pyx":90 * Residual sum of squares. * """ * cdef floating sum = 0 # <<<<<<<<<<<<<< @@ -24068,7 +24524,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_RSS(__Py */ __pyx_v_sum = 0.0; - /* "pytesmo/metrics/_fast_pairwise.pyx":91 + /* "pytesmo/metrics/_fast_pairwise.pyx":92 * cdef floating sum = 0 * cdef int i * cdef int n = len(x) # <<<<<<<<<<<<<< @@ -24078,7 +24534,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_RSS(__Py __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_x); __pyx_v_n = __pyx_t_1; - /* "pytesmo/metrics/_fast_pairwise.pyx":92 + /* "pytesmo/metrics/_fast_pairwise.pyx":93 * cdef int i * cdef int n = len(x) * for i in range(n): # <<<<<<<<<<<<<< @@ -24090,7 +24546,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_RSS(__Py for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; - /* "pytesmo/metrics/_fast_pairwise.pyx":93 + /* "pytesmo/metrics/_fast_pairwise.pyx":94 * cdef int n = len(x) * for i in range(n): * sum += (x[i] - y[i])**2 # <<<<<<<<<<<<<< @@ -24102,7 +24558,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_RSS(__Py __pyx_v_sum = (__pyx_v_sum + powf(((*((float *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_5 * __pyx_v_x.strides[0]) ))) - (*((float *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_6 * __pyx_v_y.strides[0]) )))), 2.0)); } - /* "pytesmo/metrics/_fast_pairwise.pyx":94 + /* "pytesmo/metrics/_fast_pairwise.pyx":95 * for i in range(n): * sum += (x[i] - y[i])**2 * return sum # <<<<<<<<<<<<<< @@ -24110,13 +24566,13 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_RSS(__Py * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = PyFloat_FromDouble(__pyx_v_sum); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_7 = PyFloat_FromDouble(__pyx_v_sum); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":73 + /* "pytesmo/metrics/_fast_pairwise.pyx":74 * * * cpdef RSS(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -24175,7 +24631,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_39__pyx_fuse_0RSS(P (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -24183,14 +24639,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_39__pyx_fuse_0RSS(P (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0RSS", 1, 2, 2, 1); __PYX_ERR(0, 73, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0RSS", 1, 2, 2, 1); __PYX_ERR(0, 74, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0RSS") < 0)) __PYX_ERR(0, 73, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0RSS") < 0)) __PYX_ERR(0, 74, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -24198,12 +24654,12 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_39__pyx_fuse_0RSS(P values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); } - __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 73, __pyx_L3_error) - __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 73, __pyx_L3_error) + __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 74, __pyx_L3_error) + __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 74, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0RSS", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 73, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0RSS", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 74, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -24243,9 +24699,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_38__pyx_fuse_0RSS(C int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0RSS", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 73, __pyx_L1_error) } - if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 73, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_RSS(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 74, __pyx_L1_error) } + if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 74, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_RSS(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -24282,7 +24738,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_RSS(__Py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1RSS", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":89 + /* "pytesmo/metrics/_fast_pairwise.pyx":90 * Residual sum of squares. * """ * cdef floating sum = 0 # <<<<<<<<<<<<<< @@ -24291,7 +24747,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_RSS(__Py */ __pyx_v_sum = 0.0; - /* "pytesmo/metrics/_fast_pairwise.pyx":91 + /* "pytesmo/metrics/_fast_pairwise.pyx":92 * cdef floating sum = 0 * cdef int i * cdef int n = len(x) # <<<<<<<<<<<<<< @@ -24301,7 +24757,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_RSS(__Py __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_x); __pyx_v_n = __pyx_t_1; - /* "pytesmo/metrics/_fast_pairwise.pyx":92 + /* "pytesmo/metrics/_fast_pairwise.pyx":93 * cdef int i * cdef int n = len(x) * for i in range(n): # <<<<<<<<<<<<<< @@ -24313,7 +24769,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_RSS(__Py for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; - /* "pytesmo/metrics/_fast_pairwise.pyx":93 + /* "pytesmo/metrics/_fast_pairwise.pyx":94 * cdef int n = len(x) * for i in range(n): * sum += (x[i] - y[i])**2 # <<<<<<<<<<<<<< @@ -24325,7 +24781,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_RSS(__Py __pyx_v_sum = (__pyx_v_sum + pow(((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_5 * __pyx_v_x.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_6 * __pyx_v_y.strides[0]) )))), 2.0)); } - /* "pytesmo/metrics/_fast_pairwise.pyx":94 + /* "pytesmo/metrics/_fast_pairwise.pyx":95 * for i in range(n): * sum += (x[i] - y[i])**2 * return sum # <<<<<<<<<<<<<< @@ -24333,13 +24789,13 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_RSS(__Py * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = PyFloat_FromDouble(__pyx_v_sum); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_7 = PyFloat_FromDouble(__pyx_v_sum); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":73 + /* "pytesmo/metrics/_fast_pairwise.pyx":74 * * * cpdef RSS(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -24398,7 +24854,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_41__pyx_fuse_1RSS(P (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -24406,14 +24862,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_41__pyx_fuse_1RSS(P (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1RSS", 1, 2, 2, 1); __PYX_ERR(0, 73, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1RSS", 1, 2, 2, 1); __PYX_ERR(0, 74, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1RSS") < 0)) __PYX_ERR(0, 73, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1RSS") < 0)) __PYX_ERR(0, 74, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -24421,12 +24877,12 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_41__pyx_fuse_1RSS(P values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); } - __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 73, __pyx_L3_error) - __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 73, __pyx_L3_error) + __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 74, __pyx_L3_error) + __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 74, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1RSS", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 73, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1RSS", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 74, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -24466,9 +24922,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_40__pyx_fuse_1RSS(C int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1RSS", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 73, __pyx_L1_error) } - if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 73, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_RSS(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 74, __pyx_L1_error) } + if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 74, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_RSS(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -24485,7 +24941,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_40__pyx_fuse_1RSS(C return __pyx_r; } -/* "pytesmo/metrics/_fast_pairwise.pyx":97 +/* "pytesmo/metrics/_fast_pairwise.pyx":98 * * * cpdef mse_corr(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -24545,7 +25001,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_7mse_corr(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -24553,9 +25009,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_7mse_corr(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 97, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 98, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -24563,9 +25019,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_7mse_corr(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 97, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 98, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -24573,21 +25029,21 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_7mse_corr(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 97, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 98, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 97, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 98, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -24609,7 +25065,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_7mse_corr(PyObject } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 97, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 98, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -24680,18 +25136,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; - Py_ssize_t __pyx_t_18; - int __pyx_t_19; + unsigned int __pyx_t_18; + Py_ssize_t __pyx_t_19; + int __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("mse_corr", 0); __Pyx_INCREF(__pyx_v_kwargs); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 97, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 98, __pyx_L1_error); __pyx_v_dest_sig = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_v_kwargs != Py_None); @@ -24700,7 +25157,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 98, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_3); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; @@ -24708,21 +25165,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None); } - __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_v_itemsize = -1L; if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 98, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 98, __pyx_L1_error) __pyx_t_2 = (0 < __pyx_t_5); if (__pyx_t_2) { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 98, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0); __Pyx_INCREF(__pyx_t_1); @@ -24738,17 +25195,17 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 98, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 98, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L7_bool_binop_done:; if (likely(__pyx_t_2)) { if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 98, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_arg = __pyx_t_1; __pyx_t_1 = 0; @@ -24757,31 +25214,31 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN /*else*/ { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 98, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 97, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 97, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 98, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_s); __Pyx_GIVEREF(__pyx_n_s_s); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 97, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 98, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 98, __pyx_L1_error) } __pyx_L6:; while (1) { @@ -24789,7 +25246,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN if (__pyx_t_2) { __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -24797,13 +25254,13 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN } __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_base = __pyx_t_6; __pyx_t_6 = 0; __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -24824,14 +25281,14 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN __pyx_v_itemsize = -1L; __pyx_t_2 = (__pyx_v_dtype != Py_None); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_itemsize = __pyx_t_5; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_kind = __pyx_t_7; __pyx_v_dtype_signed = (__pyx_v_kind == 0x69); @@ -24846,15 +25303,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN __pyx_t_2 = __pyx_t_4; goto __pyx_L16_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L16_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 98, __pyx_L1_error) goto __pyx_L10_break; } __pyx_t_4 = ((sizeof(double)) == __pyx_v_itemsize); @@ -24863,15 +25320,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN __pyx_t_2 = __pyx_t_4; goto __pyx_L19_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L19_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 98, __pyx_L1_error) goto __pyx_L10_break; } break; @@ -24885,7 +25342,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN } __pyx_t_2 = (__pyx_v_arg == Py_None); if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 98, __pyx_L1_error) goto __pyx_L10_break; } { @@ -24896,7 +25353,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L22_error) + __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_as_memoryview = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; @@ -24907,7 +25364,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN goto __pyx_L33_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(float))); if (!__pyx_t_4) { } else { @@ -24921,7 +25378,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN goto __pyx_L31_bool_binop_done; } __pyx_L32_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L31_bool_binop_done:; @@ -24931,7 +25388,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 97, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 98, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -24943,7 +25400,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN goto __pyx_L39_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(double))); if (!__pyx_t_4) { } else { @@ -24957,7 +25414,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN goto __pyx_L37_bool_binop_done; } __pyx_L38_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L37_bool_binop_done:; @@ -24967,7 +25424,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 97, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 98, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -24985,7 +25442,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN __pyx_t_11 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_ValueError, __pyx_builtin_TypeError); if (__pyx_t_11) { __Pyx_AddTraceback("pytesmo.metrics._fast_pairwise.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 97, __pyx_L24_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 98, __pyx_L24_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_13); @@ -25014,19 +25471,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L29_try_end:; } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 98, __pyx_L1_error) goto __pyx_L10_break; } __pyx_L10_break:; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 98, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_2); if (__pyx_t_4) { __pyx_t_5 = 0; if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 98, __pyx_L1_error) } - __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = __pyx_t_1; @@ -25034,7 +25491,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN while (1) { __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_13, __pyx_t_14, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_11); if (unlikely(__pyx_t_15 == 0)) break; - if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1); __pyx_t_1 = 0; @@ -25042,10 +25499,10 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16); @@ -25054,23 +25511,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_kp_s__11}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_16); @@ -25079,34 +25536,34 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s__12}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_18 = PyList_GET_SIZE(__pyx_t_16); - if (unlikely(__pyx_t_18 < 1)) { - __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_18); __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_19 = PyList_GET_SIZE(__pyx_t_16); + if (unlikely(__pyx_t_19 < 1)) { + __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_19); __PYX_ERR(0, 98, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_19-1); ((PyVarObject*)__pyx_t_16)->ob_size--; #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_19-1); #endif __Pyx_GOTREF(__pyx_t_6); #if !CYTHON_COMPILING_IN_CPYTHON - __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_18-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_19-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = __pyx_t_17; __pyx_t_17 = NULL; @@ -25118,36 +25575,36 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 98, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 98, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 98, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 98, __pyx_L1_error) if (__pyx_t_4) { - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 98, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -25156,9 +25613,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN /*else*/ { if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 98, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = __pyx_t_6; __Pyx_INCREF(__pyx_t_16); @@ -25171,21 +25628,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 98, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 98, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } - __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v__fused_sigindex); __Pyx_GIVEREF(__pyx_v__fused_sigindex); - if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 97, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 98, __pyx_L1_error); __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_13); @@ -25194,23 +25651,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 98, __pyx_L1_error) #endif if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 98, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; @@ -25222,25 +25679,25 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 98, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 98, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 98, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -25250,85 +25707,85 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 98, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 98, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 98, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L53; } /*else*/ { - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sigindex_matches); __Pyx_GIVEREF(__pyx_v_sigindex_matches); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 97, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 98, __pyx_L1_error); __Pyx_INCREF(__pyx_v_sigindex_candidates); __Pyx_GIVEREF(__pyx_v_sigindex_candidates); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 97, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 98, __pyx_L1_error); __pyx_t_16 = __pyx_t_1; __Pyx_INCREF(__pyx_t_16); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_5 >= 2) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 98, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; if (unlikely(__pyx_v_search_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 98, __pyx_L1_error) } __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 98, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 98, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 98, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__pyx_v_type_match != Py_None); if (__pyx_t_4) { - __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 98, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -25365,28 +25822,28 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_6mse_corr(CYTHON_UN __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0); __pyx_t_4 = (!__pyx_t_2); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 98, __pyx_L1_error) } - __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 98, __pyx_L1_error) __pyx_t_4 = (__pyx_t_14 > 1); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 98, __pyx_L1_error) } /*else*/ { __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 98, __pyx_L1_error) } - __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_r = __pyx_t_13; __pyx_t_13 = 0; @@ -25457,14 +25914,14 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0mse_corr", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":128 + /* "pytesmo/metrics/_fast_pairwise.pyx":129 * """ * cdef floating mx, my, varx, vary, cov * mx, my, varx, vary, cov = _moments_welford(x, y) # <<<<<<<<<<<<<< * return _mse_corr_from_moments(mx, my, varx, vary, cov) * */ - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments_welford(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments_welford(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -25472,7 +25929,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr if (unlikely(size != 5)) { if (size > 5) __Pyx_RaiseTooManyValuesError(5); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 128, __pyx_L1_error) + __PYX_ERR(0, 129, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -25498,7 +25955,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr Py_ssize_t i; PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6}; for (i=0; i < 5; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 128, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -25508,7 +25965,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr } else { Py_ssize_t index = -1; PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6}; - __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); @@ -25517,7 +25974,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 5) < 0) __PYX_ERR(0, 128, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 5) < 0) __PYX_ERR(0, 129, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_unpacking_done; @@ -25525,18 +25982,18 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 128, __pyx_L1_error) + __PYX_ERR(0, 129, __pyx_L1_error) __pyx_L4_unpacking_done:; } - __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_11 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_11 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_11 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_5); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_5); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_mx = __pyx_t_9; __pyx_v_my = __pyx_t_10; @@ -25544,7 +26001,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr __pyx_v_vary = __pyx_t_12; __pyx_v_cov = __pyx_t_13; - /* "pytesmo/metrics/_fast_pairwise.pyx":129 + /* "pytesmo/metrics/_fast_pairwise.pyx":130 * cdef floating mx, my, varx, vary, cov * mx, my, varx, vary, cov = _moments_welford(x, y) * return _mse_corr_from_moments(mx, my, varx, vary, cov) # <<<<<<<<<<<<<< @@ -25552,13 +26009,13 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_corr_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_corr_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":97 + /* "pytesmo/metrics/_fast_pairwise.pyx":98 * * * cpdef mse_corr(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -25623,7 +26080,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_45__pyx_fuse_0mse_c (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -25631,14 +26088,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_45__pyx_fuse_0mse_c (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0mse_corr", 1, 2, 2, 1); __PYX_ERR(0, 97, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0mse_corr", 1, 2, 2, 1); __PYX_ERR(0, 98, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0mse_corr") < 0)) __PYX_ERR(0, 97, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0mse_corr") < 0)) __PYX_ERR(0, 98, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -25646,12 +26103,12 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_45__pyx_fuse_0mse_c values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); } - __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 97, __pyx_L3_error) - __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 97, __pyx_L3_error) + __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 98, __pyx_L3_error) + __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 98, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0mse_corr", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 97, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0mse_corr", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 98, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -25691,9 +26148,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_44__pyx_fuse_0mse_c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0mse_corr", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 97, __pyx_L1_error) } - if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 97, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 98, __pyx_L1_error) } + if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 98, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -25738,14 +26195,14 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1mse_corr", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":128 + /* "pytesmo/metrics/_fast_pairwise.pyx":129 * """ * cdef floating mx, my, varx, vary, cov * mx, my, varx, vary, cov = _moments_welford(x, y) # <<<<<<<<<<<<<< * return _mse_corr_from_moments(mx, my, varx, vary, cov) * */ - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments_welford(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments_welford(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -25753,7 +26210,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr if (unlikely(size != 5)) { if (size > 5) __Pyx_RaiseTooManyValuesError(5); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 128, __pyx_L1_error) + __PYX_ERR(0, 129, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -25779,7 +26236,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr Py_ssize_t i; PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6}; for (i=0; i < 5; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 128, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -25789,7 +26246,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr } else { Py_ssize_t index = -1; PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6}; - __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); @@ -25798,7 +26255,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 5) < 0) __PYX_ERR(0, 128, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 5) < 0) __PYX_ERR(0, 129, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_unpacking_done; @@ -25806,18 +26263,18 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 128, __pyx_L1_error) + __PYX_ERR(0, 129, __pyx_L1_error) __pyx_L4_unpacking_done:; } - __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_mx = __pyx_t_9; __pyx_v_my = __pyx_t_10; @@ -25825,7 +26282,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr __pyx_v_vary = __pyx_t_12; __pyx_v_cov = __pyx_t_13; - /* "pytesmo/metrics/_fast_pairwise.pyx":129 + /* "pytesmo/metrics/_fast_pairwise.pyx":130 * cdef floating mx, my, varx, vary, cov * mx, my, varx, vary, cov = _moments_welford(x, y) * return _mse_corr_from_moments(mx, my, varx, vary, cov) # <<<<<<<<<<<<<< @@ -25833,13 +26290,13 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_corr_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_corr_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":97 + /* "pytesmo/metrics/_fast_pairwise.pyx":98 * * * cpdef mse_corr(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -25904,7 +26361,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_47__pyx_fuse_1mse_c (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -25912,14 +26369,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_47__pyx_fuse_1mse_c (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1mse_corr", 1, 2, 2, 1); __PYX_ERR(0, 97, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1mse_corr", 1, 2, 2, 1); __PYX_ERR(0, 98, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1mse_corr") < 0)) __PYX_ERR(0, 97, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1mse_corr") < 0)) __PYX_ERR(0, 98, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -25927,12 +26384,12 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_47__pyx_fuse_1mse_c values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); } - __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 97, __pyx_L3_error) - __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 97, __pyx_L3_error) + __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 98, __pyx_L3_error) + __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 98, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1mse_corr", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 97, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1mse_corr", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 98, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -25972,9 +26429,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_46__pyx_fuse_1mse_c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1mse_corr", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 97, __pyx_L1_error) } - if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 97, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 98, __pyx_L1_error) } + if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 98, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_corr(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -25991,7 +26448,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_46__pyx_fuse_1mse_c return __pyx_r; } -/* "pytesmo/metrics/_fast_pairwise.pyx":132 +/* "pytesmo/metrics/_fast_pairwise.pyx":133 * * * cpdef _mse_corr_from_moments( # <<<<<<<<<<<<<< @@ -26051,7 +26508,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_9_mse_corr_from_mom (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -26059,9 +26516,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_9_mse_corr_from_mom (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 132, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 133, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -26069,9 +26526,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_9_mse_corr_from_mom (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 132, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 133, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -26079,21 +26536,21 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_9_mse_corr_from_mom (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 132, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 133, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 132, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 133, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -26115,7 +26572,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_9_mse_corr_from_mom } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 132, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 133, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -26173,18 +26630,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_8_mse_corr_from_mom PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; - Py_ssize_t __pyx_t_13; - int __pyx_t_14; + unsigned int __pyx_t_13; + Py_ssize_t __pyx_t_14; + int __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_mse_corr_from_moments", 0); __Pyx_INCREF(__pyx_v_kwargs); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 132, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 133, __pyx_L1_error); __pyx_v_dest_sig = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_v_kwargs != Py_None); @@ -26193,7 +26651,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_8_mse_corr_from_mom __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 133, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_3); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; @@ -26203,14 +26661,14 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_8_mse_corr_from_mom } if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 133, __pyx_L1_error) __pyx_t_2 = (0 < __pyx_t_5); if (__pyx_t_2) { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0); __Pyx_INCREF(__pyx_t_1); @@ -26226,17 +26684,17 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_8_mse_corr_from_mom } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_mx, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_mx, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 133, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L7_bool_binop_done:; if (likely(__pyx_t_2)) { if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_mx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_mx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_arg = __pyx_t_1; __pyx_t_1 = 0; @@ -26245,52 +26703,52 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_8_mse_corr_from_mom /*else*/ { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 132, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_5)) __PYX_ERR(0, 132, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_5)) __PYX_ERR(0, 133, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_s); __Pyx_GIVEREF(__pyx_n_s_s); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 132, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 133, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } __pyx_L6:; while (1) { __pyx_t_2 = PyFloat_Check(__pyx_v_arg); if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 133, __pyx_L1_error) goto __pyx_L10_break; } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 133, __pyx_L1_error) goto __pyx_L10_break; } __pyx_L10_break:; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 133, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_2); if (__pyx_t_4) { __pyx_t_5 = 0; if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } - __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = __pyx_t_1; @@ -26298,7 +26756,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_8_mse_corr_from_mom while (1) { __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_7, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_8); if (unlikely(__pyx_t_9 == 0)) break; - if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 132, __pyx_L1_error) + if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1); __pyx_t_1 = 0; @@ -26306,10 +26764,10 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_8_mse_corr_from_mom __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; - __pyx_t_9 = 0; + __pyx_t_13 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); @@ -26318,23 +26776,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_8_mse_corr_from_mom __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); - __pyx_t_9 = 1; + __pyx_t_13 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_kp_s__11}; - __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 132, __pyx_L1_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_split); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_split); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; - __pyx_t_9 = 0; + __pyx_t_13 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); @@ -26343,34 +26801,34 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_8_mse_corr_from_mom __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); - __pyx_t_9 = 1; + __pyx_t_13 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_kp_s__12}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } - __pyx_t_11 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_11 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_13 = PyList_GET_SIZE(__pyx_t_11); - if (unlikely(__pyx_t_13 < 1)) { - __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_13); __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_14 = PyList_GET_SIZE(__pyx_t_11); + if (unlikely(__pyx_t_14 < 1)) { + __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_14); __PYX_ERR(0, 133, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_10 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_13-1); + __pyx_t_10 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_14-1); ((PyVarObject*)__pyx_t_11)->ob_size--; #else - __pyx_t_10 = PySequence_ITEM(__pyx_t_11, __pyx_t_13-1); + __pyx_t_10 = PySequence_ITEM(__pyx_t_11, __pyx_t_14-1); #endif __Pyx_GOTREF(__pyx_t_10); #if !CYTHON_COMPILING_IN_CPYTHON - __pyx_t_12 = PySequence_GetSlice(__pyx_t_11, 0, __pyx_t_13-1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_12 = PySequence_GetSlice(__pyx_t_11, 0, __pyx_t_14-1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = __pyx_t_12; __pyx_t_12 = NULL; @@ -26382,36 +26840,36 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_8_mse_corr_from_mom __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1); - __pyx_t_13 = 0; + __pyx_t_14 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 133, __pyx_L1_error) #endif - if (__pyx_t_13 >= __pyx_temp) break; + if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_10); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_10); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 133, __pyx_L1_error) #else - __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_10); __pyx_t_10 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 133, __pyx_L1_error) if (__pyx_t_4) { - __pyx_t_10 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_10) < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_10) < 0))) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_INCREF(__pyx_t_10); __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -26420,9 +26878,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_8_mse_corr_from_mom /*else*/ { if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __pyx_t_10; __Pyx_INCREF(__pyx_t_11); @@ -26435,21 +26893,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_8_mse_corr_from_mom __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 133, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v__fused_sigindex); __Pyx_GIVEREF(__pyx_v__fused_sigindex); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 132, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 133, __pyx_L1_error); __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_6); @@ -26458,23 +26916,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_8_mse_corr_from_mom { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 133, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 133, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; @@ -26486,25 +26944,25 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_8_mse_corr_from_mom { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 133, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 133, __pyx_L1_error) #else - __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_11); __pyx_t_11 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } - __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_14 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_11); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -26514,85 +26972,85 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_8_mse_corr_from_mom { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 133, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 133, __pyx_L1_error) #else - __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_11); __pyx_t_11 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } - __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_14 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_11); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L21; } /*else*/ { - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sigindex_matches); __Pyx_GIVEREF(__pyx_v_sigindex_matches); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 132, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 133, __pyx_L1_error); __Pyx_INCREF(__pyx_v_sigindex_candidates); __Pyx_GIVEREF(__pyx_v_sigindex_candidates); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 132, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 133, __pyx_L1_error); __pyx_t_11 = __pyx_t_1; __Pyx_INCREF(__pyx_t_11); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_5 >= 2) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 133, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; if (unlikely(__pyx_v_search_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1); - __pyx_t_13 = 0; + __pyx_t_14 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 133, __pyx_L1_error) #endif - if (__pyx_t_13 >= __pyx_temp) break; + if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_10); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_10); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 133, __pyx_L1_error) #else - __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_10); __pyx_t_10 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_4 = (__pyx_v_type_match != Py_None); if (__pyx_t_4) { - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 133, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -26629,28 +27087,28 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_8_mse_corr_from_mom __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0); __pyx_t_4 = (!__pyx_t_2); if (unlikely(__pyx_t_4)) { - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 133, __pyx_L1_error) __pyx_t_4 = (__pyx_t_7 > 1); if (unlikely(__pyx_t_4)) { - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } /*else*/ { __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; @@ -26704,7 +27162,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_cor int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0_mse_corr_from_moments", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":135 + /* "pytesmo/metrics/_fast_pairwise.pyx":136 * floating mx, floating my, floating vx, floating vy, floating cov * ): * return max(2 * sqrt(vx) * sqrt(vy) - 2 * cov, 0) # <<<<<<<<<<<<<< @@ -26720,13 +27178,13 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_cor } else { __pyx_t_3 = __pyx_t_2; } - __pyx_t_5 = PyFloat_FromDouble(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_5 = PyFloat_FromDouble(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":132 + /* "pytesmo/metrics/_fast_pairwise.pyx":133 * * * cpdef _mse_corr_from_moments( # <<<<<<<<<<<<<< @@ -26794,7 +27252,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_51__pyx_fuse_0_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -26802,9 +27260,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_51__pyx_fuse_0_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_corr_from_moments", 1, 5, 5, 1); __PYX_ERR(0, 132, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_corr_from_moments", 1, 5, 5, 1); __PYX_ERR(0, 133, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -26812,9 +27270,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_51__pyx_fuse_0_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_corr_from_moments", 1, 5, 5, 2); __PYX_ERR(0, 132, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_corr_from_moments", 1, 5, 5, 2); __PYX_ERR(0, 133, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -26822,9 +27280,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_51__pyx_fuse_0_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_corr_from_moments", 1, 5, 5, 3); __PYX_ERR(0, 132, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_corr_from_moments", 1, 5, 5, 3); __PYX_ERR(0, 133, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -26832,14 +27290,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_51__pyx_fuse_0_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[4]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_corr_from_moments", 1, 5, 5, 4); __PYX_ERR(0, 132, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_corr_from_moments", 1, 5, 5, 4); __PYX_ERR(0, 133, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0_mse_corr_from_moments") < 0)) __PYX_ERR(0, 132, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0_mse_corr_from_moments") < 0)) __PYX_ERR(0, 133, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; @@ -26850,15 +27308,15 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_51__pyx_fuse_0_mse_ values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); } - __pyx_v_mx = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_mx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) - __pyx_v_my = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_my == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) - __pyx_v_vx = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_vx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) - __pyx_v_vy = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_vy == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) - __pyx_v_cov = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_cov == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) + __pyx_v_mx = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_mx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L3_error) + __pyx_v_my = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_my == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L3_error) + __pyx_v_vx = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_vx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L3_error) + __pyx_v_vy = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_vy == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L3_error) + __pyx_v_cov = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_cov == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_corr_from_moments", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 132, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_corr_from_moments", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 133, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -26894,7 +27352,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_50__pyx_fuse_0_mse_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0_mse_corr_from_moments", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_corr_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_vx, __pyx_v_vy, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_corr_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_vx, __pyx_v_vy, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -26926,7 +27384,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_cor int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1_mse_corr_from_moments", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":135 + /* "pytesmo/metrics/_fast_pairwise.pyx":136 * floating mx, floating my, floating vx, floating vy, floating cov * ): * return max(2 * sqrt(vx) * sqrt(vy) - 2 * cov, 0) # <<<<<<<<<<<<<< @@ -26942,13 +27400,13 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_cor } else { __pyx_t_3 = __pyx_t_2; } - __pyx_t_5 = PyFloat_FromDouble(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_5 = PyFloat_FromDouble(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":132 + /* "pytesmo/metrics/_fast_pairwise.pyx":133 * * * cpdef _mse_corr_from_moments( # <<<<<<<<<<<<<< @@ -27016,7 +27474,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_53__pyx_fuse_1_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -27024,9 +27482,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_53__pyx_fuse_1_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_corr_from_moments", 1, 5, 5, 1); __PYX_ERR(0, 132, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_corr_from_moments", 1, 5, 5, 1); __PYX_ERR(0, 133, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -27034,9 +27492,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_53__pyx_fuse_1_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_corr_from_moments", 1, 5, 5, 2); __PYX_ERR(0, 132, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_corr_from_moments", 1, 5, 5, 2); __PYX_ERR(0, 133, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -27044,9 +27502,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_53__pyx_fuse_1_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_corr_from_moments", 1, 5, 5, 3); __PYX_ERR(0, 132, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_corr_from_moments", 1, 5, 5, 3); __PYX_ERR(0, 133, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -27054,14 +27512,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_53__pyx_fuse_1_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[4]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_corr_from_moments", 1, 5, 5, 4); __PYX_ERR(0, 132, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_corr_from_moments", 1, 5, 5, 4); __PYX_ERR(0, 133, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1_mse_corr_from_moments") < 0)) __PYX_ERR(0, 132, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1_mse_corr_from_moments") < 0)) __PYX_ERR(0, 133, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; @@ -27072,15 +27530,15 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_53__pyx_fuse_1_mse_ values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); } - __pyx_v_mx = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_mx == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) - __pyx_v_my = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_my == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) - __pyx_v_vx = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_vx == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) - __pyx_v_vy = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_vy == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) - __pyx_v_cov = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_cov == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) + __pyx_v_mx = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_mx == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L3_error) + __pyx_v_my = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_my == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L3_error) + __pyx_v_vx = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_vx == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L3_error) + __pyx_v_vy = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_vy == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L3_error) + __pyx_v_cov = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_cov == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_corr_from_moments", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 132, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_corr_from_moments", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 133, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -27116,7 +27574,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_52__pyx_fuse_1_mse_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1_mse_corr_from_moments", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_corr_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_vx, __pyx_v_vy, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_corr_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_vx, __pyx_v_vy, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -27133,7 +27591,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_52__pyx_fuse_1_mse_ return __pyx_r; } -/* "pytesmo/metrics/_fast_pairwise.pyx":139 +/* "pytesmo/metrics/_fast_pairwise.pyx":140 * * * cpdef mse_var(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -27193,7 +27651,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_11mse_var(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -27201,9 +27659,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_11mse_var(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 139, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 140, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -27211,9 +27669,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_11mse_var(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 139, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 140, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -27221,21 +27679,21 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_11mse_var(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 139, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 140, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 139, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 140, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -27257,7 +27715,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_11mse_var(PyObject } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 139, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 140, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -27328,18 +27786,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; - Py_ssize_t __pyx_t_18; - int __pyx_t_19; + unsigned int __pyx_t_18; + Py_ssize_t __pyx_t_19; + int __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("mse_var", 0); __Pyx_INCREF(__pyx_v_kwargs); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 139, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 140, __pyx_L1_error); __pyx_v_dest_sig = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_v_kwargs != Py_None); @@ -27348,7 +27807,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 140, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_3); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; @@ -27356,21 +27815,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None); } - __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_v_itemsize = -1L; if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 140, __pyx_L1_error) __pyx_t_2 = (0 < __pyx_t_5); if (__pyx_t_2) { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0); __Pyx_INCREF(__pyx_t_1); @@ -27386,17 +27845,17 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 140, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L7_bool_binop_done:; if (likely(__pyx_t_2)) { if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_arg = __pyx_t_1; __pyx_t_1 = 0; @@ -27405,31 +27864,31 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN /*else*/ { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 139, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 139, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 140, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_s); __Pyx_GIVEREF(__pyx_n_s_s); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 139, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 140, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } __pyx_L6:; while (1) { @@ -27437,7 +27896,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN if (__pyx_t_2) { __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -27445,13 +27904,13 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN } __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_base = __pyx_t_6; __pyx_t_6 = 0; __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -27472,14 +27931,14 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN __pyx_v_itemsize = -1L; __pyx_t_2 = (__pyx_v_dtype != Py_None); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_itemsize = __pyx_t_5; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_kind = __pyx_t_7; __pyx_v_dtype_signed = (__pyx_v_kind == 0x69); @@ -27494,15 +27953,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN __pyx_t_2 = __pyx_t_4; goto __pyx_L16_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L16_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 140, __pyx_L1_error) goto __pyx_L10_break; } __pyx_t_4 = ((sizeof(double)) == __pyx_v_itemsize); @@ -27511,15 +27970,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN __pyx_t_2 = __pyx_t_4; goto __pyx_L19_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L19_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 140, __pyx_L1_error) goto __pyx_L10_break; } break; @@ -27533,7 +27992,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN } __pyx_t_2 = (__pyx_v_arg == Py_None); if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 140, __pyx_L1_error) goto __pyx_L10_break; } { @@ -27544,7 +28003,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L22_error) + __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_as_memoryview = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; @@ -27555,7 +28014,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN goto __pyx_L33_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(float))); if (!__pyx_t_4) { } else { @@ -27569,7 +28028,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN goto __pyx_L31_bool_binop_done; } __pyx_L32_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L31_bool_binop_done:; @@ -27579,7 +28038,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 139, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 140, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -27591,7 +28050,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN goto __pyx_L39_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(double))); if (!__pyx_t_4) { } else { @@ -27605,7 +28064,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN goto __pyx_L37_bool_binop_done; } __pyx_L38_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L37_bool_binop_done:; @@ -27615,7 +28074,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 139, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 140, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -27633,7 +28092,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN __pyx_t_11 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_ValueError, __pyx_builtin_TypeError); if (__pyx_t_11) { __Pyx_AddTraceback("pytesmo.metrics._fast_pairwise.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 139, __pyx_L24_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 140, __pyx_L24_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_13); @@ -27662,19 +28121,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L29_try_end:; } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 140, __pyx_L1_error) goto __pyx_L10_break; } __pyx_L10_break:; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 140, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_2); if (__pyx_t_4) { __pyx_t_5 = 0; if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } - __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = __pyx_t_1; @@ -27682,7 +28141,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN while (1) { __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_13, __pyx_t_14, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_11); if (unlikely(__pyx_t_15 == 0)) break; - if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1); __pyx_t_1 = 0; @@ -27690,10 +28149,10 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16); @@ -27702,23 +28161,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_kp_s__11}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_16); @@ -27727,34 +28186,34 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s__12}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_18 = PyList_GET_SIZE(__pyx_t_16); - if (unlikely(__pyx_t_18 < 1)) { - __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_18); __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_19 = PyList_GET_SIZE(__pyx_t_16); + if (unlikely(__pyx_t_19 < 1)) { + __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_19); __PYX_ERR(0, 140, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_19-1); ((PyVarObject*)__pyx_t_16)->ob_size--; #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_19-1); #endif __Pyx_GOTREF(__pyx_t_6); #if !CYTHON_COMPILING_IN_CPYTHON - __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_18-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_19-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = __pyx_t_17; __pyx_t_17 = NULL; @@ -27766,36 +28225,36 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 140, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 140, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 140, __pyx_L1_error) if (__pyx_t_4) { - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -27804,9 +28263,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN /*else*/ { if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = __pyx_t_6; __Pyx_INCREF(__pyx_t_16); @@ -27819,21 +28278,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 140, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } - __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v__fused_sigindex); __Pyx_GIVEREF(__pyx_v__fused_sigindex); - if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 139, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 140, __pyx_L1_error); __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_13); @@ -27842,23 +28301,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 140, __pyx_L1_error) #endif if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 140, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; @@ -27870,25 +28329,25 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 140, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 140, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -27898,85 +28357,85 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 140, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 140, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L53; } /*else*/ { - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sigindex_matches); __Pyx_GIVEREF(__pyx_v_sigindex_matches); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 139, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 140, __pyx_L1_error); __Pyx_INCREF(__pyx_v_sigindex_candidates); __Pyx_GIVEREF(__pyx_v_sigindex_candidates); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 139, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 140, __pyx_L1_error); __pyx_t_16 = __pyx_t_1; __Pyx_INCREF(__pyx_t_16); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_5 >= 2) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 140, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; if (unlikely(__pyx_v_search_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 140, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 140, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__pyx_v_type_match != Py_None); if (__pyx_t_4) { - __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 140, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -28013,28 +28472,28 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_10mse_var(CYTHON_UN __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0); __pyx_t_4 = (!__pyx_t_2); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } - __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 140, __pyx_L1_error) __pyx_t_4 = (__pyx_t_14 > 1); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } /*else*/ { __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } - __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_r = __pyx_t_13; __pyx_t_13 = 0; @@ -28105,14 +28564,14 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0mse_var", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":170 + /* "pytesmo/metrics/_fast_pairwise.pyx":171 * """ * cdef floating mx, my, varx, vary, cov * mx, my, varx, vary, cov = _moments_welford(x, y) # <<<<<<<<<<<<<< * return _mse_var_from_moments(mx, my, varx, vary, cov) * */ - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments_welford(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments_welford(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -28120,7 +28579,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var( if (unlikely(size != 5)) { if (size > 5) __Pyx_RaiseTooManyValuesError(5); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 170, __pyx_L1_error) + __PYX_ERR(0, 171, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -28146,7 +28605,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var( Py_ssize_t i; PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6}; for (i=0; i < 5; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 170, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -28156,7 +28615,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var( } else { Py_ssize_t index = -1; PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6}; - __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); @@ -28165,7 +28624,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var( __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 5) < 0) __PYX_ERR(0, 170, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 5) < 0) __PYX_ERR(0, 171, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_unpacking_done; @@ -28173,18 +28632,18 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var( __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 170, __pyx_L1_error) + __PYX_ERR(0, 171, __pyx_L1_error) __pyx_L4_unpacking_done:; } - __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_11 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_11 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_11 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_5); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_5); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_mx = __pyx_t_9; __pyx_v_my = __pyx_t_10; @@ -28192,7 +28651,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var( __pyx_v_vary = __pyx_t_12; __pyx_v_cov = __pyx_t_13; - /* "pytesmo/metrics/_fast_pairwise.pyx":171 + /* "pytesmo/metrics/_fast_pairwise.pyx":172 * cdef floating mx, my, varx, vary, cov * mx, my, varx, vary, cov = _moments_welford(x, y) * return _mse_var_from_moments(mx, my, varx, vary, cov) # <<<<<<<<<<<<<< @@ -28200,13 +28659,13 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var( * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_var_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_var_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":139 + /* "pytesmo/metrics/_fast_pairwise.pyx":140 * * * cpdef mse_var(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -28271,7 +28730,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_57__pyx_fuse_0mse_v (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -28279,14 +28738,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_57__pyx_fuse_0mse_v (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0mse_var", 1, 2, 2, 1); __PYX_ERR(0, 139, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0mse_var", 1, 2, 2, 1); __PYX_ERR(0, 140, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0mse_var") < 0)) __PYX_ERR(0, 139, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0mse_var") < 0)) __PYX_ERR(0, 140, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -28294,12 +28753,12 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_57__pyx_fuse_0mse_v values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); } - __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 139, __pyx_L3_error) - __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 139, __pyx_L3_error) + __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 140, __pyx_L3_error) + __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 140, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0mse_var", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 139, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0mse_var", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 140, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -28339,9 +28798,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_56__pyx_fuse_0mse_v int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0mse_var", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 139, __pyx_L1_error) } - if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 139, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 140, __pyx_L1_error) } + if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 140, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28386,14 +28845,14 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1mse_var", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":170 + /* "pytesmo/metrics/_fast_pairwise.pyx":171 * """ * cdef floating mx, my, varx, vary, cov * mx, my, varx, vary, cov = _moments_welford(x, y) # <<<<<<<<<<<<<< * return _mse_var_from_moments(mx, my, varx, vary, cov) * */ - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments_welford(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments_welford(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -28401,7 +28860,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var( if (unlikely(size != 5)) { if (size > 5) __Pyx_RaiseTooManyValuesError(5); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 170, __pyx_L1_error) + __PYX_ERR(0, 171, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -28427,7 +28886,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var( Py_ssize_t i; PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6}; for (i=0; i < 5; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 170, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -28437,7 +28896,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var( } else { Py_ssize_t index = -1; PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6}; - __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); @@ -28446,7 +28905,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var( __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 5) < 0) __PYX_ERR(0, 170, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 5) < 0) __PYX_ERR(0, 171, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_unpacking_done; @@ -28454,18 +28913,18 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var( __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 170, __pyx_L1_error) + __PYX_ERR(0, 171, __pyx_L1_error) __pyx_L4_unpacking_done:; } - __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_mx = __pyx_t_9; __pyx_v_my = __pyx_t_10; @@ -28473,7 +28932,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var( __pyx_v_vary = __pyx_t_12; __pyx_v_cov = __pyx_t_13; - /* "pytesmo/metrics/_fast_pairwise.pyx":171 + /* "pytesmo/metrics/_fast_pairwise.pyx":172 * cdef floating mx, my, varx, vary, cov * mx, my, varx, vary, cov = _moments_welford(x, y) * return _mse_var_from_moments(mx, my, varx, vary, cov) # <<<<<<<<<<<<<< @@ -28481,13 +28940,13 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var( * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_var_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_var_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":139 + /* "pytesmo/metrics/_fast_pairwise.pyx":140 * * * cpdef mse_var(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -28552,7 +29011,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_59__pyx_fuse_1mse_v (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -28560,14 +29019,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_59__pyx_fuse_1mse_v (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1mse_var", 1, 2, 2, 1); __PYX_ERR(0, 139, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1mse_var", 1, 2, 2, 1); __PYX_ERR(0, 140, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1mse_var") < 0)) __PYX_ERR(0, 139, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1mse_var") < 0)) __PYX_ERR(0, 140, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -28575,12 +29034,12 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_59__pyx_fuse_1mse_v values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); } - __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 139, __pyx_L3_error) - __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 139, __pyx_L3_error) + __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 140, __pyx_L3_error) + __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 140, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1mse_var", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 139, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1mse_var", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 140, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -28620,9 +29079,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_58__pyx_fuse_1mse_v int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1mse_var", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 139, __pyx_L1_error) } - if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 139, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 140, __pyx_L1_error) } + if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 140, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_var(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28639,7 +29098,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_58__pyx_fuse_1mse_v return __pyx_r; } -/* "pytesmo/metrics/_fast_pairwise.pyx":174 +/* "pytesmo/metrics/_fast_pairwise.pyx":175 * * * cpdef _mse_var_from_moments( # <<<<<<<<<<<<<< @@ -28699,7 +29158,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_13_mse_var_from_mom (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -28707,9 +29166,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_13_mse_var_from_mom (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 174, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 175, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -28717,9 +29176,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_13_mse_var_from_mom (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 174, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 175, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -28727,21 +29186,21 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_13_mse_var_from_mom (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 174, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 175, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 174, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 175, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -28763,7 +29222,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_13_mse_var_from_mom } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 174, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 175, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -28821,18 +29280,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_12_mse_var_from_mom PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; - Py_ssize_t __pyx_t_13; - int __pyx_t_14; + unsigned int __pyx_t_13; + Py_ssize_t __pyx_t_14; + int __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_mse_var_from_moments", 0); __Pyx_INCREF(__pyx_v_kwargs); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 174, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 175, __pyx_L1_error); __pyx_v_dest_sig = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_v_kwargs != Py_None); @@ -28841,7 +29301,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_12_mse_var_from_mom __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 175, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_3); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; @@ -28851,14 +29311,14 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_12_mse_var_from_mom } if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 175, __pyx_L1_error) __pyx_t_2 = (0 < __pyx_t_5); if (__pyx_t_2) { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0); __Pyx_INCREF(__pyx_t_1); @@ -28874,17 +29334,17 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_12_mse_var_from_mom } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_mx, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_mx, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 175, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L7_bool_binop_done:; if (likely(__pyx_t_2)) { if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_mx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_mx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_arg = __pyx_t_1; __pyx_t_1 = 0; @@ -28893,52 +29353,52 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_12_mse_var_from_mom /*else*/ { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 174, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_5)) __PYX_ERR(0, 174, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_5)) __PYX_ERR(0, 175, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_s); __Pyx_GIVEREF(__pyx_n_s_s); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 174, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 175, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } __pyx_L6:; while (1) { __pyx_t_2 = PyFloat_Check(__pyx_v_arg); if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 175, __pyx_L1_error) goto __pyx_L10_break; } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 175, __pyx_L1_error) goto __pyx_L10_break; } __pyx_L10_break:; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 175, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_2); if (__pyx_t_4) { __pyx_t_5 = 0; if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } - __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = __pyx_t_1; @@ -28946,7 +29406,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_12_mse_var_from_mom while (1) { __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_7, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_8); if (unlikely(__pyx_t_9 == 0)) break; - if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 174, __pyx_L1_error) + if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1); __pyx_t_1 = 0; @@ -28954,10 +29414,10 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_12_mse_var_from_mom __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; - __pyx_t_9 = 0; + __pyx_t_13 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); @@ -28966,23 +29426,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_12_mse_var_from_mom __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); - __pyx_t_9 = 1; + __pyx_t_13 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_kp_s__11}; - __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 174, __pyx_L1_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_split); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_split); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; - __pyx_t_9 = 0; + __pyx_t_13 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); @@ -28991,34 +29451,34 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_12_mse_var_from_mom __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); - __pyx_t_9 = 1; + __pyx_t_13 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_kp_s__12}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } - __pyx_t_11 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_11 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_13 = PyList_GET_SIZE(__pyx_t_11); - if (unlikely(__pyx_t_13 < 1)) { - __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_13); __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_14 = PyList_GET_SIZE(__pyx_t_11); + if (unlikely(__pyx_t_14 < 1)) { + __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_14); __PYX_ERR(0, 175, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_10 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_13-1); + __pyx_t_10 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_14-1); ((PyVarObject*)__pyx_t_11)->ob_size--; #else - __pyx_t_10 = PySequence_ITEM(__pyx_t_11, __pyx_t_13-1); + __pyx_t_10 = PySequence_ITEM(__pyx_t_11, __pyx_t_14-1); #endif __Pyx_GOTREF(__pyx_t_10); #if !CYTHON_COMPILING_IN_CPYTHON - __pyx_t_12 = PySequence_GetSlice(__pyx_t_11, 0, __pyx_t_13-1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_12 = PySequence_GetSlice(__pyx_t_11, 0, __pyx_t_14-1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = __pyx_t_12; __pyx_t_12 = NULL; @@ -29030,36 +29490,36 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_12_mse_var_from_mom __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1); - __pyx_t_13 = 0; + __pyx_t_14 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 175, __pyx_L1_error) #endif - if (__pyx_t_13 >= __pyx_temp) break; + if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_10); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_10); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 175, __pyx_L1_error) #else - __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_10); __pyx_t_10 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 175, __pyx_L1_error) if (__pyx_t_4) { - __pyx_t_10 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_10) < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_10) < 0))) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_INCREF(__pyx_t_10); __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -29068,9 +29528,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_12_mse_var_from_mom /*else*/ { if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __pyx_t_10; __Pyx_INCREF(__pyx_t_11); @@ -29083,21 +29543,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_12_mse_var_from_mom __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 175, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v__fused_sigindex); __Pyx_GIVEREF(__pyx_v__fused_sigindex); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 174, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 175, __pyx_L1_error); __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_6); @@ -29106,23 +29566,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_12_mse_var_from_mom { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 175, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 175, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; @@ -29134,25 +29594,25 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_12_mse_var_from_mom { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 175, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 175, __pyx_L1_error) #else - __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_11); __pyx_t_11 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } - __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_14 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_11); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -29162,85 +29622,85 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_12_mse_var_from_mom { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 175, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 175, __pyx_L1_error) #else - __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_11); __pyx_t_11 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } - __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_14 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_11); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L21; } /*else*/ { - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sigindex_matches); __Pyx_GIVEREF(__pyx_v_sigindex_matches); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 174, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 175, __pyx_L1_error); __Pyx_INCREF(__pyx_v_sigindex_candidates); __Pyx_GIVEREF(__pyx_v_sigindex_candidates); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 174, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 175, __pyx_L1_error); __pyx_t_11 = __pyx_t_1; __Pyx_INCREF(__pyx_t_11); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_5 >= 2) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 175, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; if (unlikely(__pyx_v_search_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1); - __pyx_t_13 = 0; + __pyx_t_14 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 175, __pyx_L1_error) #endif - if (__pyx_t_13 >= __pyx_temp) break; + if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_10); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_10); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 175, __pyx_L1_error) #else - __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_10); __pyx_t_10 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_4 = (__pyx_v_type_match != Py_None); if (__pyx_t_4) { - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 175, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -29277,28 +29737,28 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_12_mse_var_from_mom __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0); __pyx_t_4 = (!__pyx_t_2); if (unlikely(__pyx_t_4)) { - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 175, __pyx_L1_error) __pyx_t_4 = (__pyx_t_7 > 1); if (unlikely(__pyx_t_4)) { - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } /*else*/ { __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 174, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; @@ -29348,7 +29808,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_var int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0_mse_var_from_moments", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":177 + /* "pytesmo/metrics/_fast_pairwise.pyx":178 * floating mx, floating my, floating vx, floating vy, floating cov * ): * return (sqrt(vx) - sqrt(vy)) ** 2 # <<<<<<<<<<<<<< @@ -29356,13 +29816,13 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_var * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(pow((sqrt(__pyx_v_vx) - sqrt(__pyx_v_vy)), 2.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(pow((sqrt(__pyx_v_vx) - sqrt(__pyx_v_vy)), 2.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":174 + /* "pytesmo/metrics/_fast_pairwise.pyx":175 * * * cpdef _mse_var_from_moments( # <<<<<<<<<<<<<< @@ -29430,7 +29890,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_63__pyx_fuse_0_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -29438,9 +29898,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_63__pyx_fuse_0_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_var_from_moments", 1, 5, 5, 1); __PYX_ERR(0, 174, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_var_from_moments", 1, 5, 5, 1); __PYX_ERR(0, 175, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -29448,9 +29908,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_63__pyx_fuse_0_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_var_from_moments", 1, 5, 5, 2); __PYX_ERR(0, 174, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_var_from_moments", 1, 5, 5, 2); __PYX_ERR(0, 175, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -29458,9 +29918,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_63__pyx_fuse_0_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_var_from_moments", 1, 5, 5, 3); __PYX_ERR(0, 174, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_var_from_moments", 1, 5, 5, 3); __PYX_ERR(0, 175, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -29468,14 +29928,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_63__pyx_fuse_0_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[4]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_var_from_moments", 1, 5, 5, 4); __PYX_ERR(0, 174, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_var_from_moments", 1, 5, 5, 4); __PYX_ERR(0, 175, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0_mse_var_from_moments") < 0)) __PYX_ERR(0, 174, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0_mse_var_from_moments") < 0)) __PYX_ERR(0, 175, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; @@ -29486,15 +29946,15 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_63__pyx_fuse_0_mse_ values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); } - __pyx_v_mx = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_mx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) - __pyx_v_my = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_my == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) - __pyx_v_vx = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_vx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) - __pyx_v_vy = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_vy == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) - __pyx_v_cov = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_cov == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) + __pyx_v_mx = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_mx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 176, __pyx_L3_error) + __pyx_v_my = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_my == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 176, __pyx_L3_error) + __pyx_v_vx = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_vx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 176, __pyx_L3_error) + __pyx_v_vy = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_vy == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 176, __pyx_L3_error) + __pyx_v_cov = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_cov == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 176, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_var_from_moments", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 174, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_var_from_moments", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 175, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -29530,7 +29990,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_62__pyx_fuse_0_mse_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0_mse_var_from_moments", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_var_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_vx, __pyx_v_vy, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_var_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_vx, __pyx_v_vy, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -29558,7 +30018,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_var int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1_mse_var_from_moments", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":177 + /* "pytesmo/metrics/_fast_pairwise.pyx":178 * floating mx, floating my, floating vx, floating vy, floating cov * ): * return (sqrt(vx) - sqrt(vy)) ** 2 # <<<<<<<<<<<<<< @@ -29566,13 +30026,13 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_var * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(pow((sqrt(__pyx_v_vx) - sqrt(__pyx_v_vy)), 2.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(pow((sqrt(__pyx_v_vx) - sqrt(__pyx_v_vy)), 2.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":174 + /* "pytesmo/metrics/_fast_pairwise.pyx":175 * * * cpdef _mse_var_from_moments( # <<<<<<<<<<<<<< @@ -29640,7 +30100,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_65__pyx_fuse_1_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -29648,9 +30108,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_65__pyx_fuse_1_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_var_from_moments", 1, 5, 5, 1); __PYX_ERR(0, 174, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_var_from_moments", 1, 5, 5, 1); __PYX_ERR(0, 175, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -29658,9 +30118,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_65__pyx_fuse_1_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_var_from_moments", 1, 5, 5, 2); __PYX_ERR(0, 174, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_var_from_moments", 1, 5, 5, 2); __PYX_ERR(0, 175, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -29668,9 +30128,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_65__pyx_fuse_1_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_var_from_moments", 1, 5, 5, 3); __PYX_ERR(0, 174, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_var_from_moments", 1, 5, 5, 3); __PYX_ERR(0, 175, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -29678,14 +30138,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_65__pyx_fuse_1_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[4]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_var_from_moments", 1, 5, 5, 4); __PYX_ERR(0, 174, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_var_from_moments", 1, 5, 5, 4); __PYX_ERR(0, 175, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1_mse_var_from_moments") < 0)) __PYX_ERR(0, 174, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1_mse_var_from_moments") < 0)) __PYX_ERR(0, 175, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; @@ -29696,15 +30156,15 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_65__pyx_fuse_1_mse_ values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); } - __pyx_v_mx = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_mx == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) - __pyx_v_my = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_my == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) - __pyx_v_vx = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_vx == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) - __pyx_v_vy = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_vy == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) - __pyx_v_cov = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_cov == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) + __pyx_v_mx = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_mx == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 176, __pyx_L3_error) + __pyx_v_my = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_my == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 176, __pyx_L3_error) + __pyx_v_vx = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_vx == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 176, __pyx_L3_error) + __pyx_v_vy = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_vy == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 176, __pyx_L3_error) + __pyx_v_cov = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_cov == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 176, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_var_from_moments", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 174, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_var_from_moments", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 175, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -29740,7 +30200,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_64__pyx_fuse_1_mse_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1_mse_var_from_moments", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_var_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_vx, __pyx_v_vy, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_var_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_vx, __pyx_v_vy, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -29757,7 +30217,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_64__pyx_fuse_1_mse_ return __pyx_r; } -/* "pytesmo/metrics/_fast_pairwise.pyx":180 +/* "pytesmo/metrics/_fast_pairwise.pyx":181 * * * cpdef mse_bias(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -29817,7 +30277,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_15mse_bias(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -29825,9 +30285,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_15mse_bias(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 180, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 181, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -29835,9 +30295,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_15mse_bias(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 180, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 181, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -29845,21 +30305,21 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_15mse_bias(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 180, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 181, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 180, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 181, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -29881,7 +30341,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_15mse_bias(PyObject } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 180, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 181, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -29952,18 +30412,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; - Py_ssize_t __pyx_t_18; - int __pyx_t_19; + unsigned int __pyx_t_18; + Py_ssize_t __pyx_t_19; + int __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("mse_bias", 0); __Pyx_INCREF(__pyx_v_kwargs); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 180, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 181, __pyx_L1_error); __pyx_v_dest_sig = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_v_kwargs != Py_None); @@ -29972,7 +30433,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 181, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_3); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; @@ -29980,21 +30441,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None); } - __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_v_itemsize = -1L; if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 180, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 181, __pyx_L1_error) __pyx_t_2 = (0 < __pyx_t_5); if (__pyx_t_2) { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 180, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0); __Pyx_INCREF(__pyx_t_1); @@ -30010,17 +30471,17 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 180, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 181, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L7_bool_binop_done:; if (likely(__pyx_t_2)) { if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 180, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_arg = __pyx_t_1; __pyx_t_1 = 0; @@ -30029,31 +30490,31 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U /*else*/ { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 180, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 180, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 180, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 181, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_s); __Pyx_GIVEREF(__pyx_n_s_s); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 180, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 181, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 180, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) } __pyx_L6:; while (1) { @@ -30061,7 +30522,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U if (__pyx_t_2) { __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -30069,13 +30530,13 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U } __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_base = __pyx_t_6; __pyx_t_6 = 0; __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -30096,14 +30557,14 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U __pyx_v_itemsize = -1L; __pyx_t_2 = (__pyx_v_dtype != Py_None); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_itemsize = __pyx_t_5; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_kind = __pyx_t_7; __pyx_v_dtype_signed = (__pyx_v_kind == 0x69); @@ -30118,15 +30579,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U __pyx_t_2 = __pyx_t_4; goto __pyx_L16_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L16_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 181, __pyx_L1_error) goto __pyx_L10_break; } __pyx_t_4 = ((sizeof(double)) == __pyx_v_itemsize); @@ -30135,15 +30596,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U __pyx_t_2 = __pyx_t_4; goto __pyx_L19_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L19_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 181, __pyx_L1_error) goto __pyx_L10_break; } break; @@ -30157,7 +30618,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U } __pyx_t_2 = (__pyx_v_arg == Py_None); if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 181, __pyx_L1_error) goto __pyx_L10_break; } { @@ -30168,7 +30629,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L22_error) + __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_as_memoryview = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; @@ -30179,7 +30640,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U goto __pyx_L33_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(float))); if (!__pyx_t_4) { } else { @@ -30193,7 +30654,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U goto __pyx_L31_bool_binop_done; } __pyx_L32_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L31_bool_binop_done:; @@ -30203,7 +30664,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 180, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 181, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -30215,7 +30676,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U goto __pyx_L39_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(double))); if (!__pyx_t_4) { } else { @@ -30229,7 +30690,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U goto __pyx_L37_bool_binop_done; } __pyx_L38_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L37_bool_binop_done:; @@ -30239,7 +30700,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 180, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 181, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -30257,7 +30718,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U __pyx_t_11 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_ValueError, __pyx_builtin_TypeError); if (__pyx_t_11) { __Pyx_AddTraceback("pytesmo.metrics._fast_pairwise.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 180, __pyx_L24_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 181, __pyx_L24_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_13); @@ -30286,19 +30747,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L29_try_end:; } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 181, __pyx_L1_error) goto __pyx_L10_break; } __pyx_L10_break:; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 181, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_2); if (__pyx_t_4) { __pyx_t_5 = 0; if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 180, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) } - __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = __pyx_t_1; @@ -30306,7 +30767,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U while (1) { __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_13, __pyx_t_14, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_11); if (unlikely(__pyx_t_15 == 0)) break; - if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 180, __pyx_L1_error) + if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1); __pyx_t_1 = 0; @@ -30314,10 +30775,10 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16); @@ -30326,23 +30787,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_kp_s__11}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_16); @@ -30351,34 +30812,34 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s__12}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_18 = PyList_GET_SIZE(__pyx_t_16); - if (unlikely(__pyx_t_18 < 1)) { - __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_18); __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_19 = PyList_GET_SIZE(__pyx_t_16); + if (unlikely(__pyx_t_19 < 1)) { + __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_19); __PYX_ERR(0, 181, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_19-1); ((PyVarObject*)__pyx_t_16)->ob_size--; #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_19-1); #endif __Pyx_GOTREF(__pyx_t_6); #if !CYTHON_COMPILING_IN_CPYTHON - __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_18-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_19-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = __pyx_t_17; __pyx_t_17 = NULL; @@ -30390,36 +30851,36 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 181, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 181, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 180, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 181, __pyx_L1_error) if (__pyx_t_4) { - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 180, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -30428,9 +30889,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U /*else*/ { if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 180, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = __pyx_t_6; __Pyx_INCREF(__pyx_t_16); @@ -30443,21 +30904,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 180, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 181, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } - __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v__fused_sigindex); __Pyx_GIVEREF(__pyx_v__fused_sigindex); - if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 180, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 181, __pyx_L1_error); __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_13); @@ -30466,23 +30927,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 181, __pyx_L1_error) #endif if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 181, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; @@ -30494,25 +30955,25 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 181, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 181, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 180, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -30522,85 +30983,85 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 181, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 181, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 180, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L53; } /*else*/ { - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sigindex_matches); __Pyx_GIVEREF(__pyx_v_sigindex_matches); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 180, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 181, __pyx_L1_error); __Pyx_INCREF(__pyx_v_sigindex_candidates); __Pyx_GIVEREF(__pyx_v_sigindex_candidates); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 180, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 181, __pyx_L1_error); __pyx_t_16 = __pyx_t_1; __Pyx_INCREF(__pyx_t_16); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_5 >= 2) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 181, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; if (unlikely(__pyx_v_search_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 180, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) } __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 181, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 181, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 180, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__pyx_v_type_match != Py_None); if (__pyx_t_4) { - __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 181, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -30637,28 +31098,28 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_14mse_bias(CYTHON_U __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0); __pyx_t_4 = (!__pyx_t_2); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 180, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) } - __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 181, __pyx_L1_error) __pyx_t_4 = (__pyx_t_14 > 1); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 180, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) } /*else*/ { __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 180, __pyx_L1_error) + __PYX_ERR(0, 181, __pyx_L1_error) } - __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_r = __pyx_t_13; __pyx_t_13 = 0; @@ -30713,7 +31174,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_bias int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0mse_bias", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":209 + /* "pytesmo/metrics/_fast_pairwise.pyx":210 * Bias component of MSE. * """ * return bias(x, y) ** 2 # <<<<<<<<<<<<<< @@ -30721,16 +31182,16 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_bias * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_Power(__pyx_t_1, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_t_2 = PyNumber_Power(__pyx_t_1, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":180 + /* "pytesmo/metrics/_fast_pairwise.pyx":181 * * * cpdef mse_bias(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -30790,7 +31251,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_69__pyx_fuse_0mse_b (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -30798,14 +31259,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_69__pyx_fuse_0mse_b (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0mse_bias", 1, 2, 2, 1); __PYX_ERR(0, 180, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0mse_bias", 1, 2, 2, 1); __PYX_ERR(0, 181, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0mse_bias") < 0)) __PYX_ERR(0, 180, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0mse_bias") < 0)) __PYX_ERR(0, 181, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -30813,12 +31274,12 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_69__pyx_fuse_0mse_b values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); } - __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 180, __pyx_L3_error) - __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 180, __pyx_L3_error) + __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 181, __pyx_L3_error) + __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 181, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0mse_bias", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 180, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0mse_bias", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 181, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -30858,9 +31319,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_68__pyx_fuse_0mse_b int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0mse_bias", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 180, __pyx_L1_error) } - if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 180, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_bias(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 181, __pyx_L1_error) } + if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 181, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_bias(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -30889,7 +31350,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_bias int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1mse_bias", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":209 + /* "pytesmo/metrics/_fast_pairwise.pyx":210 * Bias component of MSE. * """ * return bias(x, y) ** 2 # <<<<<<<<<<<<<< @@ -30897,16 +31358,16 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_bias * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_bias(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_Power(__pyx_t_1, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_t_2 = PyNumber_Power(__pyx_t_1, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":180 + /* "pytesmo/metrics/_fast_pairwise.pyx":181 * * * cpdef mse_bias(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -30966,7 +31427,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_71__pyx_fuse_1mse_b (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -30974,14 +31435,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_71__pyx_fuse_1mse_b (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1mse_bias", 1, 2, 2, 1); __PYX_ERR(0, 180, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1mse_bias", 1, 2, 2, 1); __PYX_ERR(0, 181, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1mse_bias") < 0)) __PYX_ERR(0, 180, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1mse_bias") < 0)) __PYX_ERR(0, 181, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -30989,12 +31450,12 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_71__pyx_fuse_1mse_b values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); } - __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 180, __pyx_L3_error) - __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 180, __pyx_L3_error) + __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 181, __pyx_L3_error) + __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 181, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1mse_bias", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 180, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1mse_bias", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 181, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -31034,9 +31495,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_70__pyx_fuse_1mse_b int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1mse_bias", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 180, __pyx_L1_error) } - if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 180, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_bias(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 181, __pyx_L1_error) } + if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 181, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_bias(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -31053,7 +31514,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_70__pyx_fuse_1mse_b return __pyx_r; } -/* "pytesmo/metrics/_fast_pairwise.pyx":212 +/* "pytesmo/metrics/_fast_pairwise.pyx":213 * * * cpdef _mse_bias_from_moments( # <<<<<<<<<<<<<< @@ -31113,7 +31574,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_17_mse_bias_from_mo (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -31121,9 +31582,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_17_mse_bias_from_mo (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 212, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 213, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -31131,9 +31592,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_17_mse_bias_from_mo (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 212, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 213, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -31141,21 +31602,21 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_17_mse_bias_from_mo (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 212, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 213, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 212, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 213, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -31177,7 +31638,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_17_mse_bias_from_mo } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 212, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 213, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -31235,18 +31696,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_16_mse_bias_from_mo PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; - Py_ssize_t __pyx_t_13; - int __pyx_t_14; + unsigned int __pyx_t_13; + Py_ssize_t __pyx_t_14; + int __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_mse_bias_from_moments", 0); __Pyx_INCREF(__pyx_v_kwargs); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 212, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 213, __pyx_L1_error); __pyx_v_dest_sig = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_v_kwargs != Py_None); @@ -31255,7 +31717,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_16_mse_bias_from_mo __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 213, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_3); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; @@ -31265,14 +31727,14 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_16_mse_bias_from_mo } if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 213, __pyx_L1_error) __pyx_t_2 = (0 < __pyx_t_5); if (__pyx_t_2) { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0); __Pyx_INCREF(__pyx_t_1); @@ -31288,17 +31750,17 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_16_mse_bias_from_mo } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_mx, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_mx, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 213, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L7_bool_binop_done:; if (likely(__pyx_t_2)) { if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_mx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_mx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_arg = __pyx_t_1; __pyx_t_1 = 0; @@ -31307,52 +31769,52 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_16_mse_bias_from_mo /*else*/ { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 212, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_5)) __PYX_ERR(0, 212, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_5)) __PYX_ERR(0, 213, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_s); __Pyx_GIVEREF(__pyx_n_s_s); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 212, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 213, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) } __pyx_L6:; while (1) { __pyx_t_2 = PyFloat_Check(__pyx_v_arg); if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 213, __pyx_L1_error) goto __pyx_L10_break; } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 213, __pyx_L1_error) goto __pyx_L10_break; } __pyx_L10_break:; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 213, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_2); if (__pyx_t_4) { __pyx_t_5 = 0; if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) } - __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = __pyx_t_1; @@ -31360,7 +31822,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_16_mse_bias_from_mo while (1) { __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_7, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_8); if (unlikely(__pyx_t_9 == 0)) break; - if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 212, __pyx_L1_error) + if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1); __pyx_t_1 = 0; @@ -31368,10 +31830,10 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_16_mse_bias_from_mo __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; - __pyx_t_9 = 0; + __pyx_t_13 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); @@ -31380,23 +31842,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_16_mse_bias_from_mo __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); - __pyx_t_9 = 1; + __pyx_t_13 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_kp_s__11}; - __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 212, __pyx_L1_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_split); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_split); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; - __pyx_t_9 = 0; + __pyx_t_13 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); @@ -31405,34 +31867,34 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_16_mse_bias_from_mo __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); - __pyx_t_9 = 1; + __pyx_t_13 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_kp_s__12}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } - __pyx_t_11 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_11 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_13 = PyList_GET_SIZE(__pyx_t_11); - if (unlikely(__pyx_t_13 < 1)) { - __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_13); __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_14 = PyList_GET_SIZE(__pyx_t_11); + if (unlikely(__pyx_t_14 < 1)) { + __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_14); __PYX_ERR(0, 213, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_10 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_13-1); + __pyx_t_10 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_14-1); ((PyVarObject*)__pyx_t_11)->ob_size--; #else - __pyx_t_10 = PySequence_ITEM(__pyx_t_11, __pyx_t_13-1); + __pyx_t_10 = PySequence_ITEM(__pyx_t_11, __pyx_t_14-1); #endif __Pyx_GOTREF(__pyx_t_10); #if !CYTHON_COMPILING_IN_CPYTHON - __pyx_t_12 = PySequence_GetSlice(__pyx_t_11, 0, __pyx_t_13-1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_12 = PySequence_GetSlice(__pyx_t_11, 0, __pyx_t_14-1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = __pyx_t_12; __pyx_t_12 = NULL; @@ -31444,36 +31906,36 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_16_mse_bias_from_mo __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1); - __pyx_t_13 = 0; + __pyx_t_14 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 213, __pyx_L1_error) #endif - if (__pyx_t_13 >= __pyx_temp) break; + if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_10); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_10); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 213, __pyx_L1_error) #else - __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_10); __pyx_t_10 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 213, __pyx_L1_error) if (__pyx_t_4) { - __pyx_t_10 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_10) < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_10) < 0))) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_INCREF(__pyx_t_10); __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -31482,9 +31944,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_16_mse_bias_from_mo /*else*/ { if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __pyx_t_10; __Pyx_INCREF(__pyx_t_11); @@ -31497,21 +31959,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_16_mse_bias_from_mo __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 213, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v__fused_sigindex); __Pyx_GIVEREF(__pyx_v__fused_sigindex); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 212, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 213, __pyx_L1_error); __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_6); @@ -31520,23 +31982,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_16_mse_bias_from_mo { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 213, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 213, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; @@ -31548,25 +32010,25 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_16_mse_bias_from_mo { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 213, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 213, __pyx_L1_error) #else - __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_11); __pyx_t_11 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) } - __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_14 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_11); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -31576,85 +32038,85 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_16_mse_bias_from_mo { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 213, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 213, __pyx_L1_error) #else - __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_11); __pyx_t_11 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) } - __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_14 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_11); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L21; } /*else*/ { - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sigindex_matches); __Pyx_GIVEREF(__pyx_v_sigindex_matches); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 212, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 213, __pyx_L1_error); __Pyx_INCREF(__pyx_v_sigindex_candidates); __Pyx_GIVEREF(__pyx_v_sigindex_candidates); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 212, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 213, __pyx_L1_error); __pyx_t_11 = __pyx_t_1; __Pyx_INCREF(__pyx_t_11); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_5 >= 2) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 213, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; if (unlikely(__pyx_v_search_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) } __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1); - __pyx_t_13 = 0; + __pyx_t_14 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 213, __pyx_L1_error) #endif - if (__pyx_t_13 >= __pyx_temp) break; + if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_10); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_10); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 213, __pyx_L1_error) #else - __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_10); __pyx_t_10 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_4 = (__pyx_v_type_match != Py_None); if (__pyx_t_4) { - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 213, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -31691,28 +32153,28 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_16_mse_bias_from_mo __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0); __pyx_t_4 = (!__pyx_t_2); if (unlikely(__pyx_t_4)) { - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 213, __pyx_L1_error) __pyx_t_4 = (__pyx_t_7 > 1); if (unlikely(__pyx_t_4)) { - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) } /*else*/ { __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; @@ -31762,7 +32224,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_bia int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0_mse_bias_from_moments", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":215 + /* "pytesmo/metrics/_fast_pairwise.pyx":216 * floating mx, floating my, floating vx, floating vy, floating cov * ): * return (mx - my) ** 2 # <<<<<<<<<<<<<< @@ -31770,13 +32232,13 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_bia * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(powf((__pyx_v_mx - __pyx_v_my), 2.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(powf((__pyx_v_mx - __pyx_v_my), 2.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":212 + /* "pytesmo/metrics/_fast_pairwise.pyx":213 * * * cpdef _mse_bias_from_moments( # <<<<<<<<<<<<<< @@ -31844,7 +32306,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_75__pyx_fuse_0_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -31852,9 +32314,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_75__pyx_fuse_0_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_bias_from_moments", 1, 5, 5, 1); __PYX_ERR(0, 212, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_bias_from_moments", 1, 5, 5, 1); __PYX_ERR(0, 213, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -31862,9 +32324,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_75__pyx_fuse_0_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_bias_from_moments", 1, 5, 5, 2); __PYX_ERR(0, 212, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_bias_from_moments", 1, 5, 5, 2); __PYX_ERR(0, 213, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -31872,9 +32334,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_75__pyx_fuse_0_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_bias_from_moments", 1, 5, 5, 3); __PYX_ERR(0, 212, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_bias_from_moments", 1, 5, 5, 3); __PYX_ERR(0, 213, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -31882,14 +32344,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_75__pyx_fuse_0_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[4]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_bias_from_moments", 1, 5, 5, 4); __PYX_ERR(0, 212, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_bias_from_moments", 1, 5, 5, 4); __PYX_ERR(0, 213, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0_mse_bias_from_moments") < 0)) __PYX_ERR(0, 212, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0_mse_bias_from_moments") < 0)) __PYX_ERR(0, 213, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; @@ -31900,15 +32362,15 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_75__pyx_fuse_0_mse_ values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); } - __pyx_v_mx = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_mx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) - __pyx_v_my = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_my == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) - __pyx_v_vx = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_vx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) - __pyx_v_vy = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_vy == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) - __pyx_v_cov = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_cov == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) + __pyx_v_mx = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_mx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L3_error) + __pyx_v_my = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_my == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L3_error) + __pyx_v_vx = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_vx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L3_error) + __pyx_v_vy = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_vy == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L3_error) + __pyx_v_cov = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_cov == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_bias_from_moments", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 212, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_mse_bias_from_moments", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 213, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -31944,7 +32406,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_74__pyx_fuse_0_mse_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0_mse_bias_from_moments", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_bias_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_vx, __pyx_v_vy, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_bias_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_vx, __pyx_v_vy, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -31972,7 +32434,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_bia int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1_mse_bias_from_moments", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":215 + /* "pytesmo/metrics/_fast_pairwise.pyx":216 * floating mx, floating my, floating vx, floating vy, floating cov * ): * return (mx - my) ** 2 # <<<<<<<<<<<<<< @@ -31980,13 +32442,13 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_bia * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(pow((__pyx_v_mx - __pyx_v_my), 2.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(pow((__pyx_v_mx - __pyx_v_my), 2.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":212 + /* "pytesmo/metrics/_fast_pairwise.pyx":213 * * * cpdef _mse_bias_from_moments( # <<<<<<<<<<<<<< @@ -32054,7 +32516,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_77__pyx_fuse_1_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -32062,9 +32524,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_77__pyx_fuse_1_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_bias_from_moments", 1, 5, 5, 1); __PYX_ERR(0, 212, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_bias_from_moments", 1, 5, 5, 1); __PYX_ERR(0, 213, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -32072,9 +32534,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_77__pyx_fuse_1_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_bias_from_moments", 1, 5, 5, 2); __PYX_ERR(0, 212, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_bias_from_moments", 1, 5, 5, 2); __PYX_ERR(0, 213, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -32082,9 +32544,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_77__pyx_fuse_1_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_bias_from_moments", 1, 5, 5, 3); __PYX_ERR(0, 212, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_bias_from_moments", 1, 5, 5, 3); __PYX_ERR(0, 213, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -32092,14 +32554,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_77__pyx_fuse_1_mse_ (void)__Pyx_Arg_NewRef_VARARGS(values[4]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_bias_from_moments", 1, 5, 5, 4); __PYX_ERR(0, 212, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_bias_from_moments", 1, 5, 5, 4); __PYX_ERR(0, 213, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1_mse_bias_from_moments") < 0)) __PYX_ERR(0, 212, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1_mse_bias_from_moments") < 0)) __PYX_ERR(0, 213, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; @@ -32110,15 +32572,15 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_77__pyx_fuse_1_mse_ values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); } - __pyx_v_mx = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_mx == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) - __pyx_v_my = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_my == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) - __pyx_v_vx = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_vx == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) - __pyx_v_vy = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_vy == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) - __pyx_v_cov = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_cov == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) + __pyx_v_mx = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_mx == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L3_error) + __pyx_v_my = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_my == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L3_error) + __pyx_v_vx = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_vx == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L3_error) + __pyx_v_vy = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_vy == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L3_error) + __pyx_v_cov = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_cov == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_bias_from_moments", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 212, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_mse_bias_from_moments", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 213, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -32154,7 +32616,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_76__pyx_fuse_1_mse_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1_mse_bias_from_moments", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_bias_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_vx, __pyx_v_vy, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_bias_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_vx, __pyx_v_vy, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -32171,7 +32633,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_76__pyx_fuse_1_mse_ return __pyx_r; } -/* "pytesmo/metrics/_fast_pairwise.pyx":224 +/* "pytesmo/metrics/_fast_pairwise.pyx":225 * # 48.3 s 8.69 s per loop (mean std. dev. of 7 runs, 10000 loops each) * # -> 32 times faster! * cpdef mse_decomposition(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -32231,7 +32693,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_19mse_decomposition (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -32239,9 +32701,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_19mse_decomposition (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 224, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 225, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -32249,9 +32711,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_19mse_decomposition (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 224, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 225, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -32259,21 +32721,21 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_19mse_decomposition (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 224, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 225, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 224, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 225, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -32295,7 +32757,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_19mse_decomposition } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 224, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 225, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -32366,18 +32828,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; - Py_ssize_t __pyx_t_18; - int __pyx_t_19; + unsigned int __pyx_t_18; + Py_ssize_t __pyx_t_19; + int __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("mse_decomposition", 0); __Pyx_INCREF(__pyx_v_kwargs); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 224, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 225, __pyx_L1_error); __pyx_v_dest_sig = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_v_kwargs != Py_None); @@ -32386,7 +32849,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 225, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_3); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; @@ -32394,21 +32857,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None); } - __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_v_itemsize = -1L; if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 225, __pyx_L1_error) __pyx_t_2 = (0 < __pyx_t_5); if (__pyx_t_2) { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0); __Pyx_INCREF(__pyx_t_1); @@ -32424,17 +32887,17 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 225, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L7_bool_binop_done:; if (likely(__pyx_t_2)) { if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_arg = __pyx_t_1; __pyx_t_1 = 0; @@ -32443,31 +32906,31 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition /*else*/ { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 224, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 224, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 225, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_s); __Pyx_GIVEREF(__pyx_n_s_s); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 224, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 225, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) } __pyx_L6:; while (1) { @@ -32475,7 +32938,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition if (__pyx_t_2) { __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -32483,13 +32946,13 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition } __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_base = __pyx_t_6; __pyx_t_6 = 0; __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -32510,14 +32973,14 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition __pyx_v_itemsize = -1L; __pyx_t_2 = (__pyx_v_dtype != Py_None); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_itemsize = __pyx_t_5; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_kind = __pyx_t_7; __pyx_v_dtype_signed = (__pyx_v_kind == 0x69); @@ -32532,15 +32995,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition __pyx_t_2 = __pyx_t_4; goto __pyx_L16_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L16_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 225, __pyx_L1_error) goto __pyx_L10_break; } __pyx_t_4 = ((sizeof(double)) == __pyx_v_itemsize); @@ -32549,15 +33012,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition __pyx_t_2 = __pyx_t_4; goto __pyx_L19_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L19_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 225, __pyx_L1_error) goto __pyx_L10_break; } break; @@ -32571,7 +33034,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition } __pyx_t_2 = (__pyx_v_arg == Py_None); if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 225, __pyx_L1_error) goto __pyx_L10_break; } { @@ -32582,7 +33045,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L22_error) + __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_as_memoryview = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; @@ -32593,7 +33056,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition goto __pyx_L33_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(float))); if (!__pyx_t_4) { } else { @@ -32607,7 +33070,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition goto __pyx_L31_bool_binop_done; } __pyx_L32_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L31_bool_binop_done:; @@ -32617,7 +33080,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 224, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 225, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -32629,7 +33092,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition goto __pyx_L39_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(double))); if (!__pyx_t_4) { } else { @@ -32643,7 +33106,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition goto __pyx_L37_bool_binop_done; } __pyx_L38_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L37_bool_binop_done:; @@ -32653,7 +33116,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 224, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 225, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -32671,7 +33134,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition __pyx_t_11 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_ValueError, __pyx_builtin_TypeError); if (__pyx_t_11) { __Pyx_AddTraceback("pytesmo.metrics._fast_pairwise.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 224, __pyx_L24_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 225, __pyx_L24_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_13); @@ -32700,19 +33163,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L29_try_end:; } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 225, __pyx_L1_error) goto __pyx_L10_break; } __pyx_L10_break:; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 225, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_2); if (__pyx_t_4) { __pyx_t_5 = 0; if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) } - __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = __pyx_t_1; @@ -32720,7 +33183,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition while (1) { __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_13, __pyx_t_14, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_11); if (unlikely(__pyx_t_15 == 0)) break; - if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1); __pyx_t_1 = 0; @@ -32728,10 +33191,10 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16); @@ -32740,23 +33203,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_kp_s__11}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_16); @@ -32765,34 +33228,34 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s__12}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_18 = PyList_GET_SIZE(__pyx_t_16); - if (unlikely(__pyx_t_18 < 1)) { - __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_18); __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_19 = PyList_GET_SIZE(__pyx_t_16); + if (unlikely(__pyx_t_19 < 1)) { + __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_19); __PYX_ERR(0, 225, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_19-1); ((PyVarObject*)__pyx_t_16)->ob_size--; #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_19-1); #endif __Pyx_GOTREF(__pyx_t_6); #if !CYTHON_COMPILING_IN_CPYTHON - __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_18-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_19-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = __pyx_t_17; __pyx_t_17 = NULL; @@ -32804,36 +33267,36 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 225, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 225, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 225, __pyx_L1_error) if (__pyx_t_4) { - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -32842,9 +33305,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition /*else*/ { if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = __pyx_t_6; __Pyx_INCREF(__pyx_t_16); @@ -32857,21 +33320,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 225, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } - __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v__fused_sigindex); __Pyx_GIVEREF(__pyx_v__fused_sigindex); - if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 224, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 225, __pyx_L1_error); __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_13); @@ -32880,23 +33343,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 225, __pyx_L1_error) #endif if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 225, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; @@ -32908,25 +33371,25 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 225, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 225, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -32936,85 +33399,85 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 225, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 225, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L53; } /*else*/ { - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sigindex_matches); __Pyx_GIVEREF(__pyx_v_sigindex_matches); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 224, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 225, __pyx_L1_error); __Pyx_INCREF(__pyx_v_sigindex_candidates); __Pyx_GIVEREF(__pyx_v_sigindex_candidates); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 224, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 225, __pyx_L1_error); __pyx_t_16 = __pyx_t_1; __Pyx_INCREF(__pyx_t_16); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_5 >= 2) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 225, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; if (unlikely(__pyx_v_search_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) } __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 225, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 225, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__pyx_v_type_match != Py_None); if (__pyx_t_4) { - __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 225, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -33051,28 +33514,28 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_18mse_decomposition __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0); __pyx_t_4 = (!__pyx_t_2); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) } - __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 225, __pyx_L1_error) __pyx_t_4 = (__pyx_t_14 > 1); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) } /*else*/ { __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) } - __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_r = __pyx_t_13; __pyx_t_13 = 0; @@ -33147,14 +33610,14 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_deco int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0mse_decomposition", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":266 + /* "pytesmo/metrics/_fast_pairwise.pyx":267 * """ * cdef floating mx, my, varx, vary, cov * mx, my, varx, vary, cov = _moments_welford(x, y) # <<<<<<<<<<<<<< * * # decompositions */ - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments_welford(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments_welford(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -33162,7 +33625,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_deco if (unlikely(size != 5)) { if (size > 5) __Pyx_RaiseTooManyValuesError(5); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 266, __pyx_L1_error) + __PYX_ERR(0, 267, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -33188,7 +33651,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_deco Py_ssize_t i; PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6}; for (i=0; i < 5; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 266, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -33198,7 +33661,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_deco } else { Py_ssize_t index = -1; PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6}; - __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); @@ -33207,7 +33670,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_deco __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 5) < 0) __PYX_ERR(0, 266, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 5) < 0) __PYX_ERR(0, 267, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_unpacking_done; @@ -33215,18 +33678,18 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_deco __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 266, __pyx_L1_error) + __PYX_ERR(0, 267, __pyx_L1_error) __pyx_L4_unpacking_done:; } - __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_11 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_11 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_11 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_5); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_5); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_mx = __pyx_t_9; __pyx_v_my = __pyx_t_10; @@ -33234,58 +33697,58 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_deco __pyx_v_vary = __pyx_t_12; __pyx_v_cov = __pyx_t_13; - /* "pytesmo/metrics/_fast_pairwise.pyx":269 + /* "pytesmo/metrics/_fast_pairwise.pyx":270 * * # decompositions * mse_corr = _mse_corr_from_moments(mx, my, varx, vary, cov) # <<<<<<<<<<<<<< * mse_var = _mse_var_from_moments(mx, my, varx, vary, cov) * mse_bias = _mse_bias_from_moments(mx, my, varx, vary, cov) */ - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_corr_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_corr_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mse_corr = __pyx_t_1; __pyx_t_1 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":270 + /* "pytesmo/metrics/_fast_pairwise.pyx":271 * # decompositions * mse_corr = _mse_corr_from_moments(mx, my, varx, vary, cov) * mse_var = _mse_var_from_moments(mx, my, varx, vary, cov) # <<<<<<<<<<<<<< * mse_bias = _mse_bias_from_moments(mx, my, varx, vary, cov) * mse = mse_corr + mse_var + mse_bias */ - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_var_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_var_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mse_var = __pyx_t_1; __pyx_t_1 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":271 + /* "pytesmo/metrics/_fast_pairwise.pyx":272 * mse_corr = _mse_corr_from_moments(mx, my, varx, vary, cov) * mse_var = _mse_var_from_moments(mx, my, varx, vary, cov) * mse_bias = _mse_bias_from_moments(mx, my, varx, vary, cov) # <<<<<<<<<<<<<< * mse = mse_corr + mse_var + mse_bias * return mse, mse_corr, mse_bias, mse_var */ - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_bias_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_bias_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mse_bias = __pyx_t_1; __pyx_t_1 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":272 + /* "pytesmo/metrics/_fast_pairwise.pyx":273 * mse_var = _mse_var_from_moments(mx, my, varx, vary, cov) * mse_bias = _mse_bias_from_moments(mx, my, varx, vary, cov) * mse = mse_corr + mse_var + mse_bias # <<<<<<<<<<<<<< * return mse, mse_corr, mse_bias, mse_var * */ - __pyx_t_1 = PyNumber_Add(__pyx_v_mse_corr, __pyx_v_mse_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_mse_corr, __pyx_v_mse_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_v_mse_bias); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_v_mse_bias); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_mse = __pyx_t_6; __pyx_t_6 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":273 + /* "pytesmo/metrics/_fast_pairwise.pyx":274 * mse_bias = _mse_bias_from_moments(mx, my, varx, vary, cov) * mse = mse_corr + mse_var + mse_bias * return mse, mse_corr, mse_bias, mse_var # <<<<<<<<<<<<<< @@ -33293,25 +33756,25 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_deco * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_mse); __Pyx_GIVEREF(__pyx_v_mse); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_mse)) __PYX_ERR(0, 273, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_mse)) __PYX_ERR(0, 274, __pyx_L1_error); __Pyx_INCREF(__pyx_v_mse_corr); __Pyx_GIVEREF(__pyx_v_mse_corr); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_mse_corr)) __PYX_ERR(0, 273, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_mse_corr)) __PYX_ERR(0, 274, __pyx_L1_error); __Pyx_INCREF(__pyx_v_mse_bias); __Pyx_GIVEREF(__pyx_v_mse_bias); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_mse_bias)) __PYX_ERR(0, 273, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_mse_bias)) __PYX_ERR(0, 274, __pyx_L1_error); __Pyx_INCREF(__pyx_v_mse_var); __Pyx_GIVEREF(__pyx_v_mse_var); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_mse_var)) __PYX_ERR(0, 273, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_mse_var)) __PYX_ERR(0, 274, __pyx_L1_error); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":224 + /* "pytesmo/metrics/_fast_pairwise.pyx":225 * # 48.3 s 8.69 s per loop (mean std. dev. of 7 runs, 10000 loops each) * # -> 32 times faster! * cpdef mse_decomposition(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -33380,7 +33843,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_81__pyx_fuse_0mse_d (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -33388,14 +33851,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_81__pyx_fuse_0mse_d (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0mse_decomposition", 1, 2, 2, 1); __PYX_ERR(0, 224, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0mse_decomposition", 1, 2, 2, 1); __PYX_ERR(0, 225, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0mse_decomposition") < 0)) __PYX_ERR(0, 224, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0mse_decomposition") < 0)) __PYX_ERR(0, 225, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -33403,12 +33866,12 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_81__pyx_fuse_0mse_d values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); } - __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 224, __pyx_L3_error) - __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 224, __pyx_L3_error) + __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 225, __pyx_L3_error) + __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 225, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0mse_decomposition", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 224, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0mse_decomposition", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 225, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -33448,9 +33911,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_80__pyx_fuse_0mse_d int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0mse_decomposition", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 224, __pyx_L1_error) } - if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 224, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_decomposition(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 225, __pyx_L1_error) } + if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 225, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_decomposition(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -33499,14 +33962,14 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_deco int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1mse_decomposition", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":266 + /* "pytesmo/metrics/_fast_pairwise.pyx":267 * """ * cdef floating mx, my, varx, vary, cov * mx, my, varx, vary, cov = _moments_welford(x, y) # <<<<<<<<<<<<<< * * # decompositions */ - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments_welford(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__moments_welford(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -33514,7 +33977,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_deco if (unlikely(size != 5)) { if (size > 5) __Pyx_RaiseTooManyValuesError(5); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 266, __pyx_L1_error) + __PYX_ERR(0, 267, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -33540,7 +34003,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_deco Py_ssize_t i; PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6}; for (i=0; i < 5; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 266, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -33550,7 +34013,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_deco } else { Py_ssize_t index = -1; PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6}; - __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); @@ -33559,7 +34022,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_deco __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 5) < 0) __PYX_ERR(0, 266, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 5) < 0) __PYX_ERR(0, 267, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_unpacking_done; @@ -33567,18 +34030,18 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_deco __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 266, __pyx_L1_error) + __PYX_ERR(0, 267, __pyx_L1_error) __pyx_L4_unpacking_done:; } - __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_mx = __pyx_t_9; __pyx_v_my = __pyx_t_10; @@ -33586,58 +34049,58 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_deco __pyx_v_vary = __pyx_t_12; __pyx_v_cov = __pyx_t_13; - /* "pytesmo/metrics/_fast_pairwise.pyx":269 + /* "pytesmo/metrics/_fast_pairwise.pyx":270 * * # decompositions * mse_corr = _mse_corr_from_moments(mx, my, varx, vary, cov) # <<<<<<<<<<<<<< * mse_var = _mse_var_from_moments(mx, my, varx, vary, cov) * mse_bias = _mse_bias_from_moments(mx, my, varx, vary, cov) */ - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_corr_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_corr_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mse_corr = __pyx_t_1; __pyx_t_1 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":270 + /* "pytesmo/metrics/_fast_pairwise.pyx":271 * # decompositions * mse_corr = _mse_corr_from_moments(mx, my, varx, vary, cov) * mse_var = _mse_var_from_moments(mx, my, varx, vary, cov) # <<<<<<<<<<<<<< * mse_bias = _mse_bias_from_moments(mx, my, varx, vary, cov) * mse = mse_corr + mse_var + mse_bias */ - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_var_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_var_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mse_var = __pyx_t_1; __pyx_t_1 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":271 + /* "pytesmo/metrics/_fast_pairwise.pyx":272 * mse_corr = _mse_corr_from_moments(mx, my, varx, vary, cov) * mse_var = _mse_var_from_moments(mx, my, varx, vary, cov) * mse_bias = _mse_bias_from_moments(mx, my, varx, vary, cov) # <<<<<<<<<<<<<< * mse = mse_corr + mse_var + mse_bias * return mse, mse_corr, mse_bias, mse_var */ - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_bias_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__mse_bias_from_moments(__pyx_v_mx, __pyx_v_my, __pyx_v_varx, __pyx_v_vary, __pyx_v_cov, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mse_bias = __pyx_t_1; __pyx_t_1 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":272 + /* "pytesmo/metrics/_fast_pairwise.pyx":273 * mse_var = _mse_var_from_moments(mx, my, varx, vary, cov) * mse_bias = _mse_bias_from_moments(mx, my, varx, vary, cov) * mse = mse_corr + mse_var + mse_bias # <<<<<<<<<<<<<< * return mse, mse_corr, mse_bias, mse_var * */ - __pyx_t_1 = PyNumber_Add(__pyx_v_mse_corr, __pyx_v_mse_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_mse_corr, __pyx_v_mse_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_v_mse_bias); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_v_mse_bias); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_mse = __pyx_t_6; __pyx_t_6 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":273 + /* "pytesmo/metrics/_fast_pairwise.pyx":274 * mse_bias = _mse_bias_from_moments(mx, my, varx, vary, cov) * mse = mse_corr + mse_var + mse_bias * return mse, mse_corr, mse_bias, mse_var # <<<<<<<<<<<<<< @@ -33645,25 +34108,25 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_deco * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_mse); __Pyx_GIVEREF(__pyx_v_mse); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_mse)) __PYX_ERR(0, 273, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_mse)) __PYX_ERR(0, 274, __pyx_L1_error); __Pyx_INCREF(__pyx_v_mse_corr); __Pyx_GIVEREF(__pyx_v_mse_corr); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_mse_corr)) __PYX_ERR(0, 273, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_mse_corr)) __PYX_ERR(0, 274, __pyx_L1_error); __Pyx_INCREF(__pyx_v_mse_bias); __Pyx_GIVEREF(__pyx_v_mse_bias); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_mse_bias)) __PYX_ERR(0, 273, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_mse_bias)) __PYX_ERR(0, 274, __pyx_L1_error); __Pyx_INCREF(__pyx_v_mse_var); __Pyx_GIVEREF(__pyx_v_mse_var); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_mse_var)) __PYX_ERR(0, 273, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_mse_var)) __PYX_ERR(0, 274, __pyx_L1_error); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":224 + /* "pytesmo/metrics/_fast_pairwise.pyx":225 * # 48.3 s 8.69 s per loop (mean std. dev. of 7 runs, 10000 loops each) * # -> 32 times faster! * cpdef mse_decomposition(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -33732,7 +34195,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_83__pyx_fuse_1mse_d (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -33740,14 +34203,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_83__pyx_fuse_1mse_d (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1mse_decomposition", 1, 2, 2, 1); __PYX_ERR(0, 224, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1mse_decomposition", 1, 2, 2, 1); __PYX_ERR(0, 225, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1mse_decomposition") < 0)) __PYX_ERR(0, 224, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1mse_decomposition") < 0)) __PYX_ERR(0, 225, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -33755,12 +34218,12 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_83__pyx_fuse_1mse_d values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); } - __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 224, __pyx_L3_error) - __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 224, __pyx_L3_error) + __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 225, __pyx_L3_error) + __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 225, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1mse_decomposition", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 224, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1mse_decomposition", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 225, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -33800,9 +34263,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_82__pyx_fuse_1mse_d int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1mse_decomposition", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 224, __pyx_L1_error) } - if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 224, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_decomposition(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 225, __pyx_L1_error) } + if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 225, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_mse_decomposition(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -33819,7 +34282,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_82__pyx_fuse_1mse_d return __pyx_r; } -/* "pytesmo/metrics/_fast_pairwise.pyx":276 +/* "pytesmo/metrics/_fast_pairwise.pyx":277 * * * cpdef _ubrmsd(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -33879,7 +34342,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_21_ubrmsd(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -33887,9 +34350,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_21_ubrmsd(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 276, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 277, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -33897,9 +34360,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_21_ubrmsd(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 276, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 277, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -33907,21 +34370,21 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_21_ubrmsd(PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 276, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 277, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 276, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 277, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -33943,7 +34406,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_21_ubrmsd(PyObject } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 276, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 277, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -34014,18 +34477,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; - Py_ssize_t __pyx_t_18; - int __pyx_t_19; + unsigned int __pyx_t_18; + Py_ssize_t __pyx_t_19; + int __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_ubrmsd", 0); __Pyx_INCREF(__pyx_v_kwargs); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 276, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 277, __pyx_L1_error); __pyx_v_dest_sig = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_v_kwargs != Py_None); @@ -34034,7 +34498,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 277, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_3); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; @@ -34042,21 +34506,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None); } - __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_v_itemsize = -1L; if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 277, __pyx_L1_error) __pyx_t_2 = (0 < __pyx_t_5); if (__pyx_t_2) { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0); __Pyx_INCREF(__pyx_t_1); @@ -34072,17 +34536,17 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 277, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L7_bool_binop_done:; if (likely(__pyx_t_2)) { if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_arg = __pyx_t_1; __pyx_t_1 = 0; @@ -34091,31 +34555,31 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN /*else*/ { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 276, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 276, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 277, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_s); __Pyx_GIVEREF(__pyx_n_s_s); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 276, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 277, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } __pyx_L6:; while (1) { @@ -34123,7 +34587,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN if (__pyx_t_2) { __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -34131,13 +34595,13 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN } __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_base = __pyx_t_6; __pyx_t_6 = 0; __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -34158,14 +34622,14 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN __pyx_v_itemsize = -1L; __pyx_t_2 = (__pyx_v_dtype != Py_None); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_itemsize = __pyx_t_5; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_kind = __pyx_t_7; __pyx_v_dtype_signed = (__pyx_v_kind == 0x69); @@ -34180,15 +34644,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN __pyx_t_2 = __pyx_t_4; goto __pyx_L16_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L16_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 277, __pyx_L1_error) goto __pyx_L10_break; } __pyx_t_4 = ((sizeof(double)) == __pyx_v_itemsize); @@ -34197,15 +34661,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN __pyx_t_2 = __pyx_t_4; goto __pyx_L19_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L19_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 277, __pyx_L1_error) goto __pyx_L10_break; } break; @@ -34219,7 +34683,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN } __pyx_t_2 = (__pyx_v_arg == Py_None); if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 277, __pyx_L1_error) goto __pyx_L10_break; } { @@ -34230,7 +34694,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L22_error) + __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_as_memoryview = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; @@ -34241,7 +34705,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN goto __pyx_L33_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(float))); if (!__pyx_t_4) { } else { @@ -34255,7 +34719,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN goto __pyx_L31_bool_binop_done; } __pyx_L32_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L31_bool_binop_done:; @@ -34265,7 +34729,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 276, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 277, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -34277,7 +34741,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN goto __pyx_L39_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(double))); if (!__pyx_t_4) { } else { @@ -34291,7 +34755,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN goto __pyx_L37_bool_binop_done; } __pyx_L38_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L37_bool_binop_done:; @@ -34301,7 +34765,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 276, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 277, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -34319,7 +34783,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN __pyx_t_11 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_ValueError, __pyx_builtin_TypeError); if (__pyx_t_11) { __Pyx_AddTraceback("pytesmo.metrics._fast_pairwise.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 276, __pyx_L24_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 277, __pyx_L24_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_13); @@ -34348,19 +34812,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L29_try_end:; } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 277, __pyx_L1_error) goto __pyx_L10_break; } __pyx_L10_break:; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 277, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_2); if (__pyx_t_4) { __pyx_t_5 = 0; if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } - __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = __pyx_t_1; @@ -34368,7 +34832,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN while (1) { __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_13, __pyx_t_14, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_11); if (unlikely(__pyx_t_15 == 0)) break; - if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 276, __pyx_L1_error) + if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1); __pyx_t_1 = 0; @@ -34376,10 +34840,10 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16); @@ -34388,23 +34852,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_kp_s__11}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_16); @@ -34413,34 +34877,34 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s__12}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_18 = PyList_GET_SIZE(__pyx_t_16); - if (unlikely(__pyx_t_18 < 1)) { - __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_18); __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_19 = PyList_GET_SIZE(__pyx_t_16); + if (unlikely(__pyx_t_19 < 1)) { + __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_19); __PYX_ERR(0, 277, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_19-1); ((PyVarObject*)__pyx_t_16)->ob_size--; #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_19-1); #endif __Pyx_GOTREF(__pyx_t_6); #if !CYTHON_COMPILING_IN_CPYTHON - __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_18-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_19-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = __pyx_t_17; __pyx_t_17 = NULL; @@ -34452,36 +34916,36 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 277, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 277, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 277, __pyx_L1_error) if (__pyx_t_4) { - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -34490,9 +34954,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN /*else*/ { if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = __pyx_t_6; __Pyx_INCREF(__pyx_t_16); @@ -34505,21 +34969,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 277, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } - __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v__fused_sigindex); __Pyx_GIVEREF(__pyx_v__fused_sigindex); - if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 276, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 277, __pyx_L1_error); __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_13); @@ -34528,23 +34992,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 277, __pyx_L1_error) #endif if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 277, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; @@ -34556,25 +35020,25 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 277, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 277, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -34584,85 +35048,85 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 277, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 277, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L53; } /*else*/ { - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sigindex_matches); __Pyx_GIVEREF(__pyx_v_sigindex_matches); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 276, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 277, __pyx_L1_error); __Pyx_INCREF(__pyx_v_sigindex_candidates); __Pyx_GIVEREF(__pyx_v_sigindex_candidates); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 276, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 277, __pyx_L1_error); __pyx_t_16 = __pyx_t_1; __Pyx_INCREF(__pyx_t_16); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_5 >= 2) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 277, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; if (unlikely(__pyx_v_search_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 277, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 277, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__pyx_v_type_match != Py_None); if (__pyx_t_4) { - __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 277, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -34699,28 +35163,28 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_20_ubrmsd(CYTHON_UN __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0); __pyx_t_4 = (!__pyx_t_2); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } - __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 277, __pyx_L1_error) __pyx_t_4 = (__pyx_t_14 > 1); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } /*else*/ { __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } - __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_r = __pyx_t_13; __pyx_t_13 = 0; @@ -34786,7 +35250,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0_ubrmsd", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":302 + /* "pytesmo/metrics/_fast_pairwise.pyx":303 * Unbiased root-mean-square deviation (uRMSD). * """ * cdef floating mx = 0, my = 0 # <<<<<<<<<<<<<< @@ -34796,7 +35260,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( __pyx_v_mx = 0.0; __pyx_v_my = 0.0; - /* "pytesmo/metrics/_fast_pairwise.pyx":303 + /* "pytesmo/metrics/_fast_pairwise.pyx":304 * """ * cdef floating mx = 0, my = 0 * cdef floating sum = 0 # <<<<<<<<<<<<<< @@ -34805,7 +35269,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( */ __pyx_v_sum = 0.0; - /* "pytesmo/metrics/_fast_pairwise.pyx":304 + /* "pytesmo/metrics/_fast_pairwise.pyx":305 * cdef floating mx = 0, my = 0 * cdef floating sum = 0 * cdef int i, n = len(x) # <<<<<<<<<<<<<< @@ -34815,7 +35279,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_x); __pyx_v_n = __pyx_t_1; - /* "pytesmo/metrics/_fast_pairwise.pyx":306 + /* "pytesmo/metrics/_fast_pairwise.pyx":307 * cdef int i, n = len(x) * * if n == 0: # <<<<<<<<<<<<<< @@ -34825,7 +35289,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( __pyx_t_2 = (__pyx_v_n == 0); if (__pyx_t_2) { - /* "pytesmo/metrics/_fast_pairwise.pyx":307 + /* "pytesmo/metrics/_fast_pairwise.pyx":308 * * if n == 0: * return NAN # <<<<<<<<<<<<<< @@ -34833,13 +35297,13 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( * # calculate means */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyFloat_FromDouble(NPY_NAN); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(NPY_NAN); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":306 + /* "pytesmo/metrics/_fast_pairwise.pyx":307 * cdef int i, n = len(x) * * if n == 0: # <<<<<<<<<<<<<< @@ -34848,7 +35312,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( */ } - /* "pytesmo/metrics/_fast_pairwise.pyx":310 + /* "pytesmo/metrics/_fast_pairwise.pyx":311 * * # calculate means * for i in range(n): # <<<<<<<<<<<<<< @@ -34860,7 +35324,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "pytesmo/metrics/_fast_pairwise.pyx":311 + /* "pytesmo/metrics/_fast_pairwise.pyx":312 * # calculate means * for i in range(n): * mx += x[i] # <<<<<<<<<<<<<< @@ -34870,7 +35334,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( __pyx_t_7 = __pyx_v_i; __pyx_v_mx = (__pyx_v_mx + (*((float *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_7 * __pyx_v_x.strides[0]) )))); - /* "pytesmo/metrics/_fast_pairwise.pyx":312 + /* "pytesmo/metrics/_fast_pairwise.pyx":313 * for i in range(n): * mx += x[i] * my += y[i] # <<<<<<<<<<<<<< @@ -34881,7 +35345,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( __pyx_v_my = (__pyx_v_my + (*((float *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_7 * __pyx_v_y.strides[0]) )))); } - /* "pytesmo/metrics/_fast_pairwise.pyx":313 + /* "pytesmo/metrics/_fast_pairwise.pyx":314 * mx += x[i] * my += y[i] * mx /= n # <<<<<<<<<<<<<< @@ -34890,7 +35354,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( */ __pyx_v_mx = (__pyx_v_mx / __pyx_v_n); - /* "pytesmo/metrics/_fast_pairwise.pyx":314 + /* "pytesmo/metrics/_fast_pairwise.pyx":315 * my += y[i] * mx /= n * my /= n # <<<<<<<<<<<<<< @@ -34899,7 +35363,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( */ __pyx_v_my = (__pyx_v_my / __pyx_v_n); - /* "pytesmo/metrics/_fast_pairwise.pyx":317 + /* "pytesmo/metrics/_fast_pairwise.pyx":318 * * # get unbiased values * for i in range(n): # <<<<<<<<<<<<<< @@ -34911,7 +35375,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "pytesmo/metrics/_fast_pairwise.pyx":318 + /* "pytesmo/metrics/_fast_pairwise.pyx":319 * # get unbiased values * for i in range(n): * sum += ((x[i] - mx) - (y[i] - my))**2 # <<<<<<<<<<<<<< @@ -34923,7 +35387,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( __pyx_v_sum = (__pyx_v_sum + powf((((*((float *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_7 * __pyx_v_x.strides[0]) ))) - __pyx_v_mx) - ((*((float *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_8 * __pyx_v_y.strides[0]) ))) - __pyx_v_my)), 2.0)); } - /* "pytesmo/metrics/_fast_pairwise.pyx":319 + /* "pytesmo/metrics/_fast_pairwise.pyx":320 * for i in range(n): * sum += ((x[i] - mx) - (y[i] - my))**2 * return sqrt(sum / n) # <<<<<<<<<<<<<< @@ -34931,13 +35395,13 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyFloat_FromDouble(sqrt((__pyx_v_sum / ((float)__pyx_v_n)))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(sqrt((__pyx_v_sum / ((float)__pyx_v_n)))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":276 + /* "pytesmo/metrics/_fast_pairwise.pyx":277 * * * cpdef _ubrmsd(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -34996,7 +35460,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_87__pyx_fuse_0_ubrm (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -35004,14 +35468,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_87__pyx_fuse_0_ubrm (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_ubrmsd", 1, 2, 2, 1); __PYX_ERR(0, 276, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_ubrmsd", 1, 2, 2, 1); __PYX_ERR(0, 277, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0_ubrmsd") < 0)) __PYX_ERR(0, 276, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0_ubrmsd") < 0)) __PYX_ERR(0, 277, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -35019,12 +35483,12 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_87__pyx_fuse_0_ubrm values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); } - __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 276, __pyx_L3_error) - __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 276, __pyx_L3_error) + __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 277, __pyx_L3_error) + __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 277, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_ubrmsd", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 276, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_ubrmsd", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 277, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -35064,9 +35528,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_86__pyx_fuse_0_ubrm int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0_ubrmsd", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 276, __pyx_L1_error) } - if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 276, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 277, __pyx_L1_error) } + if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 277, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -35106,7 +35570,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1_ubrmsd", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":302 + /* "pytesmo/metrics/_fast_pairwise.pyx":303 * Unbiased root-mean-square deviation (uRMSD). * """ * cdef floating mx = 0, my = 0 # <<<<<<<<<<<<<< @@ -35116,7 +35580,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( __pyx_v_mx = 0.0; __pyx_v_my = 0.0; - /* "pytesmo/metrics/_fast_pairwise.pyx":303 + /* "pytesmo/metrics/_fast_pairwise.pyx":304 * """ * cdef floating mx = 0, my = 0 * cdef floating sum = 0 # <<<<<<<<<<<<<< @@ -35125,7 +35589,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( */ __pyx_v_sum = 0.0; - /* "pytesmo/metrics/_fast_pairwise.pyx":304 + /* "pytesmo/metrics/_fast_pairwise.pyx":305 * cdef floating mx = 0, my = 0 * cdef floating sum = 0 * cdef int i, n = len(x) # <<<<<<<<<<<<<< @@ -35135,7 +35599,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_x); __pyx_v_n = __pyx_t_1; - /* "pytesmo/metrics/_fast_pairwise.pyx":306 + /* "pytesmo/metrics/_fast_pairwise.pyx":307 * cdef int i, n = len(x) * * if n == 0: # <<<<<<<<<<<<<< @@ -35145,7 +35609,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( __pyx_t_2 = (__pyx_v_n == 0); if (__pyx_t_2) { - /* "pytesmo/metrics/_fast_pairwise.pyx":307 + /* "pytesmo/metrics/_fast_pairwise.pyx":308 * * if n == 0: * return NAN # <<<<<<<<<<<<<< @@ -35153,13 +35617,13 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( * # calculate means */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyFloat_FromDouble(NPY_NAN); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(NPY_NAN); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":306 + /* "pytesmo/metrics/_fast_pairwise.pyx":307 * cdef int i, n = len(x) * * if n == 0: # <<<<<<<<<<<<<< @@ -35168,7 +35632,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( */ } - /* "pytesmo/metrics/_fast_pairwise.pyx":310 + /* "pytesmo/metrics/_fast_pairwise.pyx":311 * * # calculate means * for i in range(n): # <<<<<<<<<<<<<< @@ -35180,7 +35644,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "pytesmo/metrics/_fast_pairwise.pyx":311 + /* "pytesmo/metrics/_fast_pairwise.pyx":312 * # calculate means * for i in range(n): * mx += x[i] # <<<<<<<<<<<<<< @@ -35190,7 +35654,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( __pyx_t_7 = __pyx_v_i; __pyx_v_mx = (__pyx_v_mx + (*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_7 * __pyx_v_x.strides[0]) )))); - /* "pytesmo/metrics/_fast_pairwise.pyx":312 + /* "pytesmo/metrics/_fast_pairwise.pyx":313 * for i in range(n): * mx += x[i] * my += y[i] # <<<<<<<<<<<<<< @@ -35201,7 +35665,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( __pyx_v_my = (__pyx_v_my + (*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_7 * __pyx_v_y.strides[0]) )))); } - /* "pytesmo/metrics/_fast_pairwise.pyx":313 + /* "pytesmo/metrics/_fast_pairwise.pyx":314 * mx += x[i] * my += y[i] * mx /= n # <<<<<<<<<<<<<< @@ -35210,7 +35674,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( */ __pyx_v_mx = (__pyx_v_mx / __pyx_v_n); - /* "pytesmo/metrics/_fast_pairwise.pyx":314 + /* "pytesmo/metrics/_fast_pairwise.pyx":315 * my += y[i] * mx /= n * my /= n # <<<<<<<<<<<<<< @@ -35219,7 +35683,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( */ __pyx_v_my = (__pyx_v_my / __pyx_v_n); - /* "pytesmo/metrics/_fast_pairwise.pyx":317 + /* "pytesmo/metrics/_fast_pairwise.pyx":318 * * # get unbiased values * for i in range(n): # <<<<<<<<<<<<<< @@ -35231,7 +35695,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "pytesmo/metrics/_fast_pairwise.pyx":318 + /* "pytesmo/metrics/_fast_pairwise.pyx":319 * # get unbiased values * for i in range(n): * sum += ((x[i] - mx) - (y[i] - my))**2 # <<<<<<<<<<<<<< @@ -35243,7 +35707,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( __pyx_v_sum = (__pyx_v_sum + pow((((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_7 * __pyx_v_x.strides[0]) ))) - __pyx_v_mx) - ((*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_8 * __pyx_v_y.strides[0]) ))) - __pyx_v_my)), 2.0)); } - /* "pytesmo/metrics/_fast_pairwise.pyx":319 + /* "pytesmo/metrics/_fast_pairwise.pyx":320 * for i in range(n): * sum += ((x[i] - mx) - (y[i] - my))**2 * return sqrt(sum / n) # <<<<<<<<<<<<<< @@ -35251,13 +35715,13 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd( * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyFloat_FromDouble(sqrt((__pyx_v_sum / ((double)__pyx_v_n)))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(sqrt((__pyx_v_sum / ((double)__pyx_v_n)))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":276 + /* "pytesmo/metrics/_fast_pairwise.pyx":277 * * * cpdef _ubrmsd(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< @@ -35316,7 +35780,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_89__pyx_fuse_1_ubrm (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -35324,14 +35788,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_89__pyx_fuse_1_ubrm (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_ubrmsd", 1, 2, 2, 1); __PYX_ERR(0, 276, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_ubrmsd", 1, 2, 2, 1); __PYX_ERR(0, 277, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1_ubrmsd") < 0)) __PYX_ERR(0, 276, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1_ubrmsd") < 0)) __PYX_ERR(0, 277, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -35339,12 +35803,12 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_89__pyx_fuse_1_ubrm values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); } - __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 276, __pyx_L3_error) - __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 276, __pyx_L3_error) + __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 277, __pyx_L3_error) + __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 277, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_ubrmsd", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 276, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_ubrmsd", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 277, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -35384,9 +35848,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_88__pyx_fuse_1_ubrm int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1_ubrmsd", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 276, __pyx_L1_error) } - if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 276, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 277, __pyx_L1_error) } + if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 277, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__ubrmsd(__pyx_v_x, __pyx_v_y, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -35403,7 +35867,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_88__pyx_fuse_1_ubrm return __pyx_r; } -/* "pytesmo/metrics/_fast_pairwise.pyx":322 +/* "pytesmo/metrics/_fast_pairwise.pyx":323 * * * cpdef _pearsonr_from_moments(floating varx, floating vary, floating cov, int n): # <<<<<<<<<<<<<< @@ -35463,7 +35927,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_23_pearsonr_from_mo (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -35471,9 +35935,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_23_pearsonr_from_mo (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 322, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 323, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -35481,9 +35945,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_23_pearsonr_from_mo (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 322, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 323, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -35491,21 +35955,21 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_23_pearsonr_from_mo (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 322, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 323, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 322, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 323, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -35527,7 +35991,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_23_pearsonr_from_mo } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 322, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 323, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -35585,18 +36049,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_22_pearsonr_from_mo PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; - Py_ssize_t __pyx_t_13; - int __pyx_t_14; + unsigned int __pyx_t_13; + Py_ssize_t __pyx_t_14; + int __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_pearsonr_from_moments", 0); __Pyx_INCREF(__pyx_v_kwargs); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 322, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 323, __pyx_L1_error); __pyx_v_dest_sig = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_v_kwargs != Py_None); @@ -35605,7 +36070,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_22_pearsonr_from_mo __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 323, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_3); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; @@ -35615,14 +36080,14 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_22_pearsonr_from_mo } if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 323, __pyx_L1_error) __pyx_t_2 = (0 < __pyx_t_5); if (__pyx_t_2) { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0); __Pyx_INCREF(__pyx_t_1); @@ -35638,17 +36103,17 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_22_pearsonr_from_mo } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_varx, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_varx, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 323, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L7_bool_binop_done:; if (likely(__pyx_t_2)) { if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_varx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_varx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_arg = __pyx_t_1; __pyx_t_1 = 0; @@ -35657,52 +36122,52 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_22_pearsonr_from_mo /*else*/ { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 322, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_4)) __PYX_ERR(0, 322, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_4)) __PYX_ERR(0, 323, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_s); __Pyx_GIVEREF(__pyx_n_s_s); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 322, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 323, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } __pyx_L6:; while (1) { __pyx_t_2 = PyFloat_Check(__pyx_v_arg); if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 323, __pyx_L1_error) goto __pyx_L10_break; } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 323, __pyx_L1_error) goto __pyx_L10_break; } __pyx_L10_break:; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 323, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_2); if (__pyx_t_4) { __pyx_t_5 = 0; if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } - __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = __pyx_t_1; @@ -35710,7 +36175,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_22_pearsonr_from_mo while (1) { __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_7, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_8); if (unlikely(__pyx_t_9 == 0)) break; - if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 322, __pyx_L1_error) + if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1); __pyx_t_1 = 0; @@ -35718,10 +36183,10 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_22_pearsonr_from_mo __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; - __pyx_t_9 = 0; + __pyx_t_13 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); @@ -35730,23 +36195,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_22_pearsonr_from_mo __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); - __pyx_t_9 = 1; + __pyx_t_13 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_kp_s__11}; - __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 322, __pyx_L1_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_split); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_split); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; - __pyx_t_9 = 0; + __pyx_t_13 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); @@ -35755,34 +36220,34 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_22_pearsonr_from_mo __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); - __pyx_t_9 = 1; + __pyx_t_13 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_kp_s__12}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } - __pyx_t_11 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_11 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_13 = PyList_GET_SIZE(__pyx_t_11); - if (unlikely(__pyx_t_13 < 1)) { - __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_13); __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_14 = PyList_GET_SIZE(__pyx_t_11); + if (unlikely(__pyx_t_14 < 1)) { + __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_14); __PYX_ERR(0, 323, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_10 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_13-1); + __pyx_t_10 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_14-1); ((PyVarObject*)__pyx_t_11)->ob_size--; #else - __pyx_t_10 = PySequence_ITEM(__pyx_t_11, __pyx_t_13-1); + __pyx_t_10 = PySequence_ITEM(__pyx_t_11, __pyx_t_14-1); #endif __Pyx_GOTREF(__pyx_t_10); #if !CYTHON_COMPILING_IN_CPYTHON - __pyx_t_12 = PySequence_GetSlice(__pyx_t_11, 0, __pyx_t_13-1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_12 = PySequence_GetSlice(__pyx_t_11, 0, __pyx_t_14-1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = __pyx_t_12; __pyx_t_12 = NULL; @@ -35794,36 +36259,36 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_22_pearsonr_from_mo __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1); - __pyx_t_13 = 0; + __pyx_t_14 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 323, __pyx_L1_error) #endif - if (__pyx_t_13 >= __pyx_temp) break; + if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_10); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_10); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 323, __pyx_L1_error) #else - __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_10); __pyx_t_10 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 323, __pyx_L1_error) if (__pyx_t_4) { - __pyx_t_10 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_10) < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_10) < 0))) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_INCREF(__pyx_t_10); __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -35832,9 +36297,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_22_pearsonr_from_mo /*else*/ { if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __pyx_t_10; __Pyx_INCREF(__pyx_t_11); @@ -35847,21 +36312,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_22_pearsonr_from_mo __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 323, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v__fused_sigindex); __Pyx_GIVEREF(__pyx_v__fused_sigindex); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 322, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 323, __pyx_L1_error); __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_6); @@ -35870,23 +36335,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_22_pearsonr_from_mo { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 323, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 323, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; @@ -35898,25 +36363,25 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_22_pearsonr_from_mo { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 323, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 323, __pyx_L1_error) #else - __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_11); __pyx_t_11 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } - __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_14 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_11); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -35926,85 +36391,85 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_22_pearsonr_from_mo { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 323, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 323, __pyx_L1_error) #else - __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_11); __pyx_t_11 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } - __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_14 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_11); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L21; } /*else*/ { - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sigindex_matches); __Pyx_GIVEREF(__pyx_v_sigindex_matches); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 322, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 323, __pyx_L1_error); __Pyx_INCREF(__pyx_v_sigindex_candidates); __Pyx_GIVEREF(__pyx_v_sigindex_candidates); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 322, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 323, __pyx_L1_error); __pyx_t_11 = __pyx_t_1; __Pyx_INCREF(__pyx_t_11); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_5 >= 2) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 323, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; if (unlikely(__pyx_v_search_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1); - __pyx_t_13 = 0; + __pyx_t_14 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 323, __pyx_L1_error) #endif - if (__pyx_t_13 >= __pyx_temp) break; + if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_10); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_10); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 323, __pyx_L1_error) #else - __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_10); __pyx_t_10 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_4 = (__pyx_v_type_match != Py_None); if (__pyx_t_4) { - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 323, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -36041,28 +36506,28 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_22_pearsonr_from_mo __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0); __pyx_t_4 = (!__pyx_t_2); if (unlikely(__pyx_t_4)) { - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 323, __pyx_L1_error) __pyx_t_4 = (__pyx_t_7 > 1); if (unlikely(__pyx_t_4)) { - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } /*else*/ { __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 322, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; @@ -36122,14 +36587,14 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson double __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; - int __pyx_t_12; + unsigned int __pyx_t_12; float __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0_pearsonr_from_moments", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":326 + /* "pytesmo/metrics/_fast_pairwise.pyx":327 * * # not defined in this case * if varx == 0 or vary == 0: # <<<<<<<<<<<<<< @@ -36147,7 +36612,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "pytesmo/metrics/_fast_pairwise.pyx":327 + /* "pytesmo/metrics/_fast_pairwise.pyx":328 * # not defined in this case * if varx == 0 or vary == 0: * return np.nan, np.nan # <<<<<<<<<<<<<< @@ -36155,29 +36620,29 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson * # due to rounding errors, values slightly above 1 are possible */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 327, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 328, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5)) __PYX_ERR(0, 327, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5)) __PYX_ERR(0, 328, __pyx_L1_error); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":326 + /* "pytesmo/metrics/_fast_pairwise.pyx":327 * * # not defined in this case * if varx == 0 or vary == 0: # <<<<<<<<<<<<<< @@ -36186,7 +36651,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson */ } - /* "pytesmo/metrics/_fast_pairwise.pyx":330 + /* "pytesmo/metrics/_fast_pairwise.pyx":331 * * # due to rounding errors, values slightly above 1 are possible * R = max(-1, min(cov / sqrt(varx * vary), 1)) # <<<<<<<<<<<<<< @@ -36211,7 +36676,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson } __pyx_v_R = __pyx_t_8; - /* "pytesmo/metrics/_fast_pairwise.pyx":333 + /* "pytesmo/metrics/_fast_pairwise.pyx":334 * * # p-value for R * if fabs(R) == 1.0: # <<<<<<<<<<<<<< @@ -36221,7 +36686,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson __pyx_t_1 = (fabs(__pyx_v_R) == 1.0); if (__pyx_t_1) { - /* "pytesmo/metrics/_fast_pairwise.pyx":334 + /* "pytesmo/metrics/_fast_pairwise.pyx":335 * # p-value for R * if fabs(R) == 1.0: * p_R = 0.0 # <<<<<<<<<<<<<< @@ -36230,7 +36695,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson */ __pyx_v_p_R = 0.0; - /* "pytesmo/metrics/_fast_pairwise.pyx":333 + /* "pytesmo/metrics/_fast_pairwise.pyx":334 * * # p-value for R * if fabs(R) == 1.0: # <<<<<<<<<<<<<< @@ -36240,7 +36705,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson goto __pyx_L6; } - /* "pytesmo/metrics/_fast_pairwise.pyx":336 + /* "pytesmo/metrics/_fast_pairwise.pyx":337 * p_R = 0.0 * else: * df = n - 2 # <<<<<<<<<<<<<< @@ -36250,7 +36715,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson /*else*/ { __pyx_v_df = (__pyx_v_n - 2); - /* "pytesmo/metrics/_fast_pairwise.pyx":337 + /* "pytesmo/metrics/_fast_pairwise.pyx":338 * else: * df = n - 2 * t_squared = R * R * (df / ((1.0 - R) * (1.0 + R))) # <<<<<<<<<<<<<< @@ -36259,7 +36724,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson */ __pyx_v_t_squared = ((__pyx_v_R * __pyx_v_R) * (((double)__pyx_v_df) / ((1.0 - __pyx_v_R) * (1.0 + __pyx_v_R)))); - /* "pytesmo/metrics/_fast_pairwise.pyx":338 + /* "pytesmo/metrics/_fast_pairwise.pyx":339 * df = n - 2 * t_squared = R * R * (df / ((1.0 - R) * (1.0 + R))) * z = min(float(df) / (df + t_squared), 1.0) # <<<<<<<<<<<<<< @@ -36276,18 +36741,18 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson } __pyx_v_z = __pyx_t_9; - /* "pytesmo/metrics/_fast_pairwise.pyx":339 + /* "pytesmo/metrics/_fast_pairwise.pyx":340 * t_squared = R * R * (df / ((1.0 - R) * (1.0 + R))) * z = min(float(df) / (df + t_squared), 1.0) * p_R = betainc(0.5*df, 0.5, z) # <<<<<<<<<<<<<< * return R, p_R * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_betainc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_betainc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyFloat_FromDouble((0.5 * __pyx_v_df)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_4 = PyFloat_FromDouble((0.5 * __pyx_v_df)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = PyFloat_FromDouble(__pyx_v_z); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_10 = PyFloat_FromDouble(__pyx_v_z); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = NULL; __pyx_t_12 = 0; @@ -36309,17 +36774,17 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 339, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_p_R = __pyx_t_13; } __pyx_L6:; - /* "pytesmo/metrics/_fast_pairwise.pyx":340 + /* "pytesmo/metrics/_fast_pairwise.pyx":341 * z = min(float(df) / (df + t_squared), 1.0) * p_R = betainc(0.5*df, 0.5, z) * return R, p_R # <<<<<<<<<<<<<< @@ -36327,23 +36792,23 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyFloat_FromDouble(__pyx_v_R); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_R); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyFloat_FromDouble(__pyx_v_p_R); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_p_R); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3)) __PYX_ERR(0, 340, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3)) __PYX_ERR(0, 341, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5)) __PYX_ERR(0, 340, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5)) __PYX_ERR(0, 341, __pyx_L1_error); __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":322 + /* "pytesmo/metrics/_fast_pairwise.pyx":323 * * * cpdef _pearsonr_from_moments(floating varx, floating vary, floating cov, int n): # <<<<<<<<<<<<<< @@ -36412,7 +36877,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_93__pyx_fuse_0_pear (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -36420,9 +36885,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_93__pyx_fuse_0_pear (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_pearsonr_from_moments", 1, 4, 4, 1); __PYX_ERR(0, 322, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_pearsonr_from_moments", 1, 4, 4, 1); __PYX_ERR(0, 323, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -36430,9 +36895,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_93__pyx_fuse_0_pear (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_pearsonr_from_moments", 1, 4, 4, 2); __PYX_ERR(0, 322, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_pearsonr_from_moments", 1, 4, 4, 2); __PYX_ERR(0, 323, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -36440,14 +36905,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_93__pyx_fuse_0_pear (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_pearsonr_from_moments", 1, 4, 4, 3); __PYX_ERR(0, 322, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_pearsonr_from_moments", 1, 4, 4, 3); __PYX_ERR(0, 323, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0_pearsonr_from_moments") < 0)) __PYX_ERR(0, 322, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0_pearsonr_from_moments") < 0)) __PYX_ERR(0, 323, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 4)) { goto __pyx_L5_argtuple_error; @@ -36457,14 +36922,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_93__pyx_fuse_0_pear values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); } - __pyx_v_varx = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_varx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) - __pyx_v_vary = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_vary == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) - __pyx_v_cov = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_cov == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) - __pyx_v_n = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + __pyx_v_varx = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_varx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) + __pyx_v_vary = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_vary == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) + __pyx_v_cov = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_cov == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) + __pyx_v_n = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_pearsonr_from_moments", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 322, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_pearsonr_from_moments", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 323, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -36500,7 +36965,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_92__pyx_fuse_0_pear int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0_pearsonr_from_moments", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearsonr_from_moments(__pyx_v_varx, __pyx_v_vary, __pyx_v_cov, __pyx_v_n, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearsonr_from_moments(__pyx_v_varx, __pyx_v_vary, __pyx_v_cov, __pyx_v_n, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -36538,13 +37003,13 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson double __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; - int __pyx_t_12; + unsigned int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1_pearsonr_from_moments", 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":326 + /* "pytesmo/metrics/_fast_pairwise.pyx":327 * * # not defined in this case * if varx == 0 or vary == 0: # <<<<<<<<<<<<<< @@ -36562,7 +37027,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "pytesmo/metrics/_fast_pairwise.pyx":327 + /* "pytesmo/metrics/_fast_pairwise.pyx":328 * # not defined in this case * if varx == 0 or vary == 0: * return np.nan, np.nan # <<<<<<<<<<<<<< @@ -36570,29 +37035,29 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson * # due to rounding errors, values slightly above 1 are possible */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 327, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 328, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5)) __PYX_ERR(0, 327, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5)) __PYX_ERR(0, 328, __pyx_L1_error); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":326 + /* "pytesmo/metrics/_fast_pairwise.pyx":327 * * # not defined in this case * if varx == 0 or vary == 0: # <<<<<<<<<<<<<< @@ -36601,7 +37066,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson */ } - /* "pytesmo/metrics/_fast_pairwise.pyx":330 + /* "pytesmo/metrics/_fast_pairwise.pyx":331 * * # due to rounding errors, values slightly above 1 are possible * R = max(-1, min(cov / sqrt(varx * vary), 1)) # <<<<<<<<<<<<<< @@ -36626,7 +37091,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson } __pyx_v_R = __pyx_t_8; - /* "pytesmo/metrics/_fast_pairwise.pyx":333 + /* "pytesmo/metrics/_fast_pairwise.pyx":334 * * # p-value for R * if fabs(R) == 1.0: # <<<<<<<<<<<<<< @@ -36636,7 +37101,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson __pyx_t_1 = (fabs(__pyx_v_R) == 1.0); if (__pyx_t_1) { - /* "pytesmo/metrics/_fast_pairwise.pyx":334 + /* "pytesmo/metrics/_fast_pairwise.pyx":335 * # p-value for R * if fabs(R) == 1.0: * p_R = 0.0 # <<<<<<<<<<<<<< @@ -36645,7 +37110,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson */ __pyx_v_p_R = 0.0; - /* "pytesmo/metrics/_fast_pairwise.pyx":333 + /* "pytesmo/metrics/_fast_pairwise.pyx":334 * * # p-value for R * if fabs(R) == 1.0: # <<<<<<<<<<<<<< @@ -36655,7 +37120,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson goto __pyx_L6; } - /* "pytesmo/metrics/_fast_pairwise.pyx":336 + /* "pytesmo/metrics/_fast_pairwise.pyx":337 * p_R = 0.0 * else: * df = n - 2 # <<<<<<<<<<<<<< @@ -36665,7 +37130,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson /*else*/ { __pyx_v_df = (__pyx_v_n - 2); - /* "pytesmo/metrics/_fast_pairwise.pyx":337 + /* "pytesmo/metrics/_fast_pairwise.pyx":338 * else: * df = n - 2 * t_squared = R * R * (df / ((1.0 - R) * (1.0 + R))) # <<<<<<<<<<<<<< @@ -36674,7 +37139,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson */ __pyx_v_t_squared = ((__pyx_v_R * __pyx_v_R) * (__pyx_v_df / ((1.0 - __pyx_v_R) * (1.0 + __pyx_v_R)))); - /* "pytesmo/metrics/_fast_pairwise.pyx":338 + /* "pytesmo/metrics/_fast_pairwise.pyx":339 * df = n - 2 * t_squared = R * R * (df / ((1.0 - R) * (1.0 + R))) * z = min(float(df) / (df + t_squared), 1.0) # <<<<<<<<<<<<<< @@ -36691,18 +37156,18 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson } __pyx_v_z = __pyx_t_9; - /* "pytesmo/metrics/_fast_pairwise.pyx":339 + /* "pytesmo/metrics/_fast_pairwise.pyx":340 * t_squared = R * R * (df / ((1.0 - R) * (1.0 + R))) * z = min(float(df) / (df + t_squared), 1.0) * p_R = betainc(0.5*df, 0.5, z) # <<<<<<<<<<<<<< * return R, p_R * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_betainc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_betainc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyFloat_FromDouble((0.5 * __pyx_v_df)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_4 = PyFloat_FromDouble((0.5 * __pyx_v_df)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = PyFloat_FromDouble(__pyx_v_z); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_10 = PyFloat_FromDouble(__pyx_v_z); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = NULL; __pyx_t_12 = 0; @@ -36724,17 +37189,17 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 339, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_p_R = __pyx_t_9; } __pyx_L6:; - /* "pytesmo/metrics/_fast_pairwise.pyx":340 + /* "pytesmo/metrics/_fast_pairwise.pyx":341 * z = min(float(df) / (df + t_squared), 1.0) * p_R = betainc(0.5*df, 0.5, z) * return R, p_R # <<<<<<<<<<<<<< @@ -36742,23 +37207,23 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearson * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyFloat_FromDouble(__pyx_v_R); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_R); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyFloat_FromDouble(__pyx_v_p_R); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_p_R); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3)) __PYX_ERR(0, 340, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3)) __PYX_ERR(0, 341, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5)) __PYX_ERR(0, 340, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5)) __PYX_ERR(0, 341, __pyx_L1_error); __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":322 + /* "pytesmo/metrics/_fast_pairwise.pyx":323 * * * cpdef _pearsonr_from_moments(floating varx, floating vary, floating cov, int n): # <<<<<<<<<<<<<< @@ -36827,7 +37292,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_95__pyx_fuse_1_pear (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -36835,9 +37300,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_95__pyx_fuse_1_pear (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_pearsonr_from_moments", 1, 4, 4, 1); __PYX_ERR(0, 322, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_pearsonr_from_moments", 1, 4, 4, 1); __PYX_ERR(0, 323, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -36845,9 +37310,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_95__pyx_fuse_1_pear (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_pearsonr_from_moments", 1, 4, 4, 2); __PYX_ERR(0, 322, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_pearsonr_from_moments", 1, 4, 4, 2); __PYX_ERR(0, 323, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -36855,14 +37320,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_95__pyx_fuse_1_pear (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_pearsonr_from_moments", 1, 4, 4, 3); __PYX_ERR(0, 322, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_pearsonr_from_moments", 1, 4, 4, 3); __PYX_ERR(0, 323, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1_pearsonr_from_moments") < 0)) __PYX_ERR(0, 322, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1_pearsonr_from_moments") < 0)) __PYX_ERR(0, 323, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 4)) { goto __pyx_L5_argtuple_error; @@ -36872,14 +37337,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_95__pyx_fuse_1_pear values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3); } - __pyx_v_varx = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_varx == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) - __pyx_v_vary = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_vary == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) - __pyx_v_cov = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_cov == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) - __pyx_v_n = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + __pyx_v_varx = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_varx == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) + __pyx_v_vary = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_vary == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) + __pyx_v_cov = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_cov == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) + __pyx_v_n = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_pearsonr_from_moments", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 322, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_pearsonr_from_moments", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 323, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -36915,7 +37380,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_94__pyx_fuse_1_pear int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1_pearsonr_from_moments", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearsonr_from_moments(__pyx_v_varx, __pyx_v_vary, __pyx_v_cov, __pyx_v_n, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearsonr_from_moments(__pyx_v_varx, __pyx_v_vary, __pyx_v_cov, __pyx_v_n, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -36932,7 +37397,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_94__pyx_fuse_1_pear return __pyx_r; } -/* "pytesmo/metrics/_fast_pairwise.pyx":346 +/* "pytesmo/metrics/_fast_pairwise.pyx":347 * # old: 76.7 ms 1.62 ms per loop (mean std. dev. of 7 runs, 10 loops each) * # new: 117 s 836 ns per loop (mean std. dev. of 7 runs, 10000 loops each) * cpdef rolling_pr_rmsd(double [:] timestamps, # <<<<<<<<<<<<<< @@ -36992,7 +37457,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_25rolling_pr_rmsd(P (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -37000,9 +37465,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_25rolling_pr_rmsd(P (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 347, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -37010,9 +37475,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_25rolling_pr_rmsd(P (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 347, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -37020,21 +37485,21 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_25rolling_pr_rmsd(P (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 347, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 346, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 347, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -37056,7 +37521,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_25rolling_pr_rmsd(P } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 347, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -37127,18 +37592,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; - Py_ssize_t __pyx_t_18; - int __pyx_t_19; + unsigned int __pyx_t_18; + Py_ssize_t __pyx_t_19; + int __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("rolling_pr_rmsd", 0); __Pyx_INCREF(__pyx_v_kwargs); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 346, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 347, __pyx_L1_error); __pyx_v_dest_sig = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_v_kwargs != Py_None); @@ -37147,7 +37613,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 347, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_3); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; @@ -37155,21 +37621,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None); } - __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_v_itemsize = -1L; if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 347, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 347, __pyx_L1_error) __pyx_t_2 = (1 < __pyx_t_5); if (__pyx_t_2) { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 347, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 1); __Pyx_INCREF(__pyx_t_1); @@ -37185,17 +37651,17 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 347, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_x, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 347, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L7_bool_binop_done:; if (likely(__pyx_t_2)) { if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 347, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_arg = __pyx_t_1; __pyx_t_1 = 0; @@ -37204,31 +37670,31 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C /*else*/ { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 347, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 346, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 347, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_6); __Pyx_GIVEREF(__pyx_int_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_6)) __PYX_ERR(0, 346, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_6)) __PYX_ERR(0, 347, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_s); __Pyx_GIVEREF(__pyx_n_s_s); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 346, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 347, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 347, __pyx_L1_error) } __pyx_L6:; while (1) { @@ -37236,7 +37702,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C if (__pyx_t_2) { __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -37244,13 +37710,13 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C } __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_base = __pyx_t_6; __pyx_t_6 = 0; __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -37271,14 +37737,14 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C __pyx_v_itemsize = -1L; __pyx_t_2 = (__pyx_v_dtype != Py_None); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_itemsize = __pyx_t_5; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_kind = __pyx_t_7; __pyx_v_dtype_signed = (__pyx_v_kind == 0x69); @@ -37293,15 +37759,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C __pyx_t_2 = __pyx_t_4; goto __pyx_L16_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L16_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 347, __pyx_L1_error) goto __pyx_L10_break; } __pyx_t_4 = ((sizeof(double)) == __pyx_v_itemsize); @@ -37310,15 +37776,15 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C __pyx_t_2 = __pyx_t_4; goto __pyx_L19_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L19_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 347, __pyx_L1_error) goto __pyx_L10_break; } break; @@ -37332,7 +37798,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C } __pyx_t_2 = (__pyx_v_arg == Py_None); if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 347, __pyx_L1_error) goto __pyx_L10_break; } { @@ -37343,7 +37809,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L22_error) + __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_as_memoryview = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; @@ -37354,7 +37820,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C goto __pyx_L33_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(float))); if (!__pyx_t_4) { } else { @@ -37368,7 +37834,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C goto __pyx_L31_bool_binop_done; } __pyx_L32_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L31_bool_binop_done:; @@ -37378,7 +37844,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 346, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 347, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -37390,7 +37856,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C goto __pyx_L39_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(double))); if (!__pyx_t_4) { } else { @@ -37404,7 +37870,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C goto __pyx_L37_bool_binop_done; } __pyx_L38_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L37_bool_binop_done:; @@ -37414,7 +37880,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 346, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 347, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -37432,7 +37898,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C __pyx_t_11 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_ValueError, __pyx_builtin_TypeError); if (__pyx_t_11) { __Pyx_AddTraceback("pytesmo.metrics._fast_pairwise.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 346, __pyx_L24_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 347, __pyx_L24_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_13); @@ -37461,19 +37927,19 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L29_try_end:; } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 347, __pyx_L1_error) goto __pyx_L10_break; } __pyx_L10_break:; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 347, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_2); if (__pyx_t_4) { __pyx_t_5 = 0; if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 347, __pyx_L1_error) } - __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = __pyx_t_1; @@ -37481,7 +37947,7 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C while (1) { __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_13, __pyx_t_14, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_11); if (unlikely(__pyx_t_15 == 0)) break; - if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1); __pyx_t_1 = 0; @@ -37489,10 +37955,10 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16); @@ -37501,23 +37967,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_kp_s__11}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_16); @@ -37526,34 +37992,34 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s__12}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_18 = PyList_GET_SIZE(__pyx_t_16); - if (unlikely(__pyx_t_18 < 1)) { - __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_18); __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_19 = PyList_GET_SIZE(__pyx_t_16); + if (unlikely(__pyx_t_19 < 1)) { + __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_19); __PYX_ERR(0, 347, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_19-1); ((PyVarObject*)__pyx_t_16)->ob_size--; #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_19-1); #endif __Pyx_GOTREF(__pyx_t_6); #if !CYTHON_COMPILING_IN_CPYTHON - __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_18-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_19-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = __pyx_t_17; __pyx_t_17 = NULL; @@ -37565,36 +38031,36 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 347, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 347, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 347, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 347, __pyx_L1_error) if (__pyx_t_4) { - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 347, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -37603,9 +38069,9 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C /*else*/ { if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 347, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = __pyx_t_6; __Pyx_INCREF(__pyx_t_16); @@ -37618,21 +38084,21 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 347, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 347, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } - __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v__fused_sigindex); __Pyx_GIVEREF(__pyx_v__fused_sigindex); - if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 346, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 347, __pyx_L1_error); __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_13); @@ -37641,23 +38107,23 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 347, __pyx_L1_error) #endif if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 347, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; @@ -37669,25 +38135,25 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 347, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 347, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 347, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -37697,85 +38163,85 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 347, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 347, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 347, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L53; } /*else*/ { - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sigindex_matches); __Pyx_GIVEREF(__pyx_v_sigindex_matches); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 346, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 347, __pyx_L1_error); __Pyx_INCREF(__pyx_v_sigindex_candidates); __Pyx_GIVEREF(__pyx_v_sigindex_candidates); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 346, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 347, __pyx_L1_error); __pyx_t_16 = __pyx_t_1; __Pyx_INCREF(__pyx_t_16); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_5 >= 2) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 347, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; if (unlikely(__pyx_v_search_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 347, __pyx_L1_error) } __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 347, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 347, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 347, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__pyx_v_type_match != Py_None); if (__pyx_t_4) { - __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 347, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -37812,28 +38278,28 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_24rolling_pr_rmsd(C __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0); __pyx_t_4 = (!__pyx_t_2); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 347, __pyx_L1_error) } - __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 347, __pyx_L1_error) __pyx_t_4 = (__pyx_t_14 > 1); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 347, __pyx_L1_error) } /*else*/ { __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 347, __pyx_L1_error) } - __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_r = __pyx_t_13; __pyx_t_13 = 0; @@ -37947,7 +38413,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_pybuffernd_rmsd_arr.data = NULL; __pyx_pybuffernd_rmsd_arr.rcbuffer = &__pyx_pybuffer_rmsd_arr; - /* "pytesmo/metrics/_fast_pairwise.pyx":385 + /* "pytesmo/metrics/_fast_pairwise.pyx":386 * cdef floating [:] rmsd_view * * n_ts = len(timestamps) # <<<<<<<<<<<<<< @@ -37957,48 +38423,48 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_timestamps); __pyx_v_n_ts = __pyx_t_1; - /* "pytesmo/metrics/_fast_pairwise.pyx":388 + /* "pytesmo/metrics/_fast_pairwise.pyx":389 * # allocate numpy arrays of the correct dtype for returning * if floating is float: * pr_arr = np.empty((n_ts, 2), dtype=np.float32) # <<<<<<<<<<<<<< * rmsd_arr = np.empty(n_ts, dtype=np.float32) * elif floating is double: */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 388, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 388, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_n_ts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 388, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_n_ts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 388, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 388, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_2)) __PYX_ERR(0, 388, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_2)) __PYX_ERR(0, 389, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 388, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 388, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 389, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 388, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 388, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 388, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 388, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 388, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 388, __pyx_L1_error) + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 389, __pyx_L1_error) __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; @@ -38015,46 +38481,46 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_pr_arr.diminfo[0].strides = __pyx_pybuffernd_pr_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pr_arr.diminfo[0].shape = __pyx_pybuffernd_pr_arr.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_pr_arr.diminfo[1].strides = __pyx_pybuffernd_pr_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_pr_arr.diminfo[1].shape = __pyx_pybuffernd_pr_arr.rcbuffer->pybuffer.shape[1]; - if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 388, __pyx_L1_error) + if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 389, __pyx_L1_error) } __pyx_t_7 = 0; __pyx_v_pr_arr = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":389 + /* "pytesmo/metrics/_fast_pairwise.pyx":390 * if floating is float: * pr_arr = np.empty((n_ts, 2), dtype=np.float32) * rmsd_arr = np.empty(n_ts, dtype=np.float32) # <<<<<<<<<<<<<< * elif floating is double: * pr_arr = np.empty((n_ts, 2), dtype=np.float64) */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 389, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_n_ts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 389, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_n_ts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6)) __PYX_ERR(0, 389, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6)) __PYX_ERR(0, 390, __pyx_L1_error); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 389, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 389, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 389, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 389, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 389, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 390, __pyx_L1_error) __pyx_t_12 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; @@ -38071,37 +38537,37 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_rmsd_arr.diminfo[0].strides = __pyx_pybuffernd_rmsd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rmsd_arr.diminfo[0].shape = __pyx_pybuffernd_rmsd_arr.rcbuffer->pybuffer.shape[0]; - if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 389, __pyx_L1_error) + if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 390, __pyx_L1_error) } __pyx_t_12 = 0; __pyx_v_rmsd_arr = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":396 + /* "pytesmo/metrics/_fast_pairwise.pyx":397 * raise ValueError("Unkown floating type") * # work on memoryviews instead of on arrays directly * pr_view = pr_arr # <<<<<<<<<<<<<< * rmsd_view = rmsd_arr * */ - __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_dsds_float(((PyObject *)__pyx_v_pr_arr), PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 396, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_dsds_float(((PyObject *)__pyx_v_pr_arr), PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 397, __pyx_L1_error) __pyx_v_pr_view = __pyx_t_13; __pyx_t_13.memview = NULL; __pyx_t_13.data = NULL; - /* "pytesmo/metrics/_fast_pairwise.pyx":397 + /* "pytesmo/metrics/_fast_pairwise.pyx":398 * # work on memoryviews instead of on arrays directly * pr_view = pr_arr * rmsd_view = rmsd_arr # <<<<<<<<<<<<<< * * mx = my = msd = M2x = M2y = C = 0 */ - __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(((PyObject *)__pyx_v_rmsd_arr), PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 397, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(((PyObject *)__pyx_v_rmsd_arr), PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 398, __pyx_L1_error) __pyx_v_rmsd_view = __pyx_t_14; __pyx_t_14.memview = NULL; __pyx_t_14.data = NULL; - /* "pytesmo/metrics/_fast_pairwise.pyx":399 + /* "pytesmo/metrics/_fast_pairwise.pyx":400 * rmsd_view = rmsd_arr * * mx = my = msd = M2x = M2y = C = 0 # <<<<<<<<<<<<<< @@ -38115,7 +38581,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_v_M2y = 0.0; __pyx_v_C = 0.0; - /* "pytesmo/metrics/_fast_pairwise.pyx":400 + /* "pytesmo/metrics/_fast_pairwise.pyx":401 * * mx = my = msd = M2x = M2y = C = 0 * lower = 0 # <<<<<<<<<<<<<< @@ -38124,7 +38590,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_lower = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":401 + /* "pytesmo/metrics/_fast_pairwise.pyx":402 * mx = my = msd = M2x = M2y = C = 0 * lower = 0 * upper = -1 # <<<<<<<<<<<<<< @@ -38133,7 +38599,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_upper = -1; - /* "pytesmo/metrics/_fast_pairwise.pyx":402 + /* "pytesmo/metrics/_fast_pairwise.pyx":403 * lower = 0 * upper = -1 * rolling_nobs = 0 # <<<<<<<<<<<<<< @@ -38142,7 +38608,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_rolling_nobs = 0.0; - /* "pytesmo/metrics/_fast_pairwise.pyx":403 + /* "pytesmo/metrics/_fast_pairwise.pyx":404 * upper = -1 * rolling_nobs = 0 * for i in range(n_ts): # <<<<<<<<<<<<<< @@ -38154,7 +38620,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_i = __pyx_t_16; - /* "pytesmo/metrics/_fast_pairwise.pyx":404 + /* "pytesmo/metrics/_fast_pairwise.pyx":405 * rolling_nobs = 0 * for i in range(n_ts): * lold = lower # <<<<<<<<<<<<<< @@ -38163,7 +38629,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_lold = __pyx_v_lower; - /* "pytesmo/metrics/_fast_pairwise.pyx":405 + /* "pytesmo/metrics/_fast_pairwise.pyx":406 * for i in range(n_ts): * lold = lower * uold = upper # <<<<<<<<<<<<<< @@ -38172,7 +38638,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_uold = __pyx_v_upper; - /* "pytesmo/metrics/_fast_pairwise.pyx":409 + /* "pytesmo/metrics/_fast_pairwise.pyx":410 * * # find interval * if center: # <<<<<<<<<<<<<< @@ -38182,7 +38648,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_17 = (__pyx_v_center != 0); if (__pyx_t_17) { - /* "pytesmo/metrics/_fast_pairwise.pyx":411 + /* "pytesmo/metrics/_fast_pairwise.pyx":412 * if center: * # find new start * for j in range(lower, n_ts): # <<<<<<<<<<<<<< @@ -38194,7 +38660,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ for (__pyx_t_20 = __pyx_v_lower; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; - /* "pytesmo/metrics/_fast_pairwise.pyx":412 + /* "pytesmo/metrics/_fast_pairwise.pyx":413 * # find new start * for j in range(lower, n_ts): * lower = j # <<<<<<<<<<<<<< @@ -38203,7 +38669,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_lower = __pyx_v_j; - /* "pytesmo/metrics/_fast_pairwise.pyx":413 + /* "pytesmo/metrics/_fast_pairwise.pyx":414 * for j in range(lower, n_ts): * lower = j * if timestamps[j] >= timestamps[i] - window_size: # <<<<<<<<<<<<<< @@ -38215,7 +38681,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_17 = ((*((double *) ( /* dim=0 */ (__pyx_v_timestamps.data + __pyx_t_21 * __pyx_v_timestamps.strides[0]) ))) >= ((*((double *) ( /* dim=0 */ (__pyx_v_timestamps.data + __pyx_t_22 * __pyx_v_timestamps.strides[0]) ))) - __pyx_v_window_size)); if (__pyx_t_17) { - /* "pytesmo/metrics/_fast_pairwise.pyx":414 + /* "pytesmo/metrics/_fast_pairwise.pyx":415 * lower = j * if timestamps[j] >= timestamps[i] - window_size: * break # <<<<<<<<<<<<<< @@ -38224,7 +38690,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ goto __pyx_L7_break; - /* "pytesmo/metrics/_fast_pairwise.pyx":413 + /* "pytesmo/metrics/_fast_pairwise.pyx":414 * for j in range(lower, n_ts): * lower = j * if timestamps[j] >= timestamps[i] - window_size: # <<<<<<<<<<<<<< @@ -38235,7 +38701,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ } __pyx_L7_break:; - /* "pytesmo/metrics/_fast_pairwise.pyx":421 + /* "pytesmo/metrics/_fast_pairwise.pyx":422 * * # if we're not at the end yet * if timestamps[n_ts - 1] > timestamps[i] + window_size: # <<<<<<<<<<<<<< @@ -38247,7 +38713,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_17 = ((*((double *) ( /* dim=0 */ (__pyx_v_timestamps.data + __pyx_t_22 * __pyx_v_timestamps.strides[0]) ))) > ((*((double *) ( /* dim=0 */ (__pyx_v_timestamps.data + __pyx_t_21 * __pyx_v_timestamps.strides[0]) ))) + __pyx_v_window_size)); if (__pyx_t_17) { - /* "pytesmo/metrics/_fast_pairwise.pyx":422 + /* "pytesmo/metrics/_fast_pairwise.pyx":423 * # if we're not at the end yet * if timestamps[n_ts - 1] > timestamps[i] + window_size: * if i == 0: # <<<<<<<<<<<<<< @@ -38257,7 +38723,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_17 = (__pyx_v_i == 0); if (__pyx_t_17) { - /* "pytesmo/metrics/_fast_pairwise.pyx":426 + /* "pytesmo/metrics/_fast_pairwise.pyx":427 * # correctly, but in the following upper must be at least 1, * # so we don't access an invalid index * upper = 1 # <<<<<<<<<<<<<< @@ -38266,7 +38732,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_upper = 1; - /* "pytesmo/metrics/_fast_pairwise.pyx":422 + /* "pytesmo/metrics/_fast_pairwise.pyx":423 * # if we're not at the end yet * if timestamps[n_ts - 1] > timestamps[i] + window_size: * if i == 0: # <<<<<<<<<<<<<< @@ -38275,7 +38741,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ } - /* "pytesmo/metrics/_fast_pairwise.pyx":427 + /* "pytesmo/metrics/_fast_pairwise.pyx":428 * # so we don't access an invalid index * upper = 1 * for j in range(upper, n_ts): # <<<<<<<<<<<<<< @@ -38287,7 +38753,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ for (__pyx_t_20 = __pyx_v_upper; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; - /* "pytesmo/metrics/_fast_pairwise.pyx":430 + /* "pytesmo/metrics/_fast_pairwise.pyx":431 * # j - 1 because we want the index that is still inside the * # window * upper = j - 1 # <<<<<<<<<<<<<< @@ -38296,7 +38762,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_upper = (__pyx_v_j - 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":431 + /* "pytesmo/metrics/_fast_pairwise.pyx":432 * # window * upper = j - 1 * if timestamps[j] > timestamps[i] + window_size: # <<<<<<<<<<<<<< @@ -38308,7 +38774,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_17 = ((*((double *) ( /* dim=0 */ (__pyx_v_timestamps.data + __pyx_t_21 * __pyx_v_timestamps.strides[0]) ))) > ((*((double *) ( /* dim=0 */ (__pyx_v_timestamps.data + __pyx_t_22 * __pyx_v_timestamps.strides[0]) ))) + __pyx_v_window_size)); if (__pyx_t_17) { - /* "pytesmo/metrics/_fast_pairwise.pyx":432 + /* "pytesmo/metrics/_fast_pairwise.pyx":433 * upper = j - 1 * if timestamps[j] > timestamps[i] + window_size: * break # <<<<<<<<<<<<<< @@ -38317,7 +38783,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ goto __pyx_L12_break; - /* "pytesmo/metrics/_fast_pairwise.pyx":431 + /* "pytesmo/metrics/_fast_pairwise.pyx":432 * # window * upper = j - 1 * if timestamps[j] > timestamps[i] + window_size: # <<<<<<<<<<<<<< @@ -38328,7 +38794,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ } __pyx_L12_break:; - /* "pytesmo/metrics/_fast_pairwise.pyx":421 + /* "pytesmo/metrics/_fast_pairwise.pyx":422 * * # if we're not at the end yet * if timestamps[n_ts - 1] > timestamps[i] + window_size: # <<<<<<<<<<<<<< @@ -38338,7 +38804,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ goto __pyx_L9; } - /* "pytesmo/metrics/_fast_pairwise.pyx":434 + /* "pytesmo/metrics/_fast_pairwise.pyx":435 * break * else: * upper = n_ts - 1 # <<<<<<<<<<<<<< @@ -38350,7 +38816,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ } __pyx_L9:; - /* "pytesmo/metrics/_fast_pairwise.pyx":409 + /* "pytesmo/metrics/_fast_pairwise.pyx":410 * * # find interval * if center: # <<<<<<<<<<<<<< @@ -38360,7 +38826,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ goto __pyx_L5; } - /* "pytesmo/metrics/_fast_pairwise.pyx":437 + /* "pytesmo/metrics/_fast_pairwise.pyx":438 * * else: * for j in range(lower, n_ts): # <<<<<<<<<<<<<< @@ -38373,7 +38839,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ for (__pyx_t_20 = __pyx_v_lower; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; - /* "pytesmo/metrics/_fast_pairwise.pyx":438 + /* "pytesmo/metrics/_fast_pairwise.pyx":439 * else: * for j in range(lower, n_ts): * lower = j # <<<<<<<<<<<<<< @@ -38382,7 +38848,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_lower = __pyx_v_j; - /* "pytesmo/metrics/_fast_pairwise.pyx":439 + /* "pytesmo/metrics/_fast_pairwise.pyx":440 * for j in range(lower, n_ts): * lower = j * if timestamps[j] > timestamps[i] - window_size: # <<<<<<<<<<<<<< @@ -38394,7 +38860,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_17 = ((*((double *) ( /* dim=0 */ (__pyx_v_timestamps.data + __pyx_t_22 * __pyx_v_timestamps.strides[0]) ))) > ((*((double *) ( /* dim=0 */ (__pyx_v_timestamps.data + __pyx_t_21 * __pyx_v_timestamps.strides[0]) ))) - __pyx_v_window_size)); if (__pyx_t_17) { - /* "pytesmo/metrics/_fast_pairwise.pyx":440 + /* "pytesmo/metrics/_fast_pairwise.pyx":441 * lower = j * if timestamps[j] > timestamps[i] - window_size: * break # <<<<<<<<<<<<<< @@ -38403,7 +38869,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ goto __pyx_L15_break; - /* "pytesmo/metrics/_fast_pairwise.pyx":439 + /* "pytesmo/metrics/_fast_pairwise.pyx":440 * for j in range(lower, n_ts): * lower = j * if timestamps[j] > timestamps[i] - window_size: # <<<<<<<<<<<<<< @@ -38414,7 +38880,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ } __pyx_L15_break:; - /* "pytesmo/metrics/_fast_pairwise.pyx":441 + /* "pytesmo/metrics/_fast_pairwise.pyx":442 * if timestamps[j] > timestamps[i] - window_size: * break * upper = i # <<<<<<<<<<<<<< @@ -38425,7 +38891,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ } __pyx_L5:; - /* "pytesmo/metrics/_fast_pairwise.pyx":449 + /* "pytesmo/metrics/_fast_pairwise.pyx":450 * * # first, add the new terms with Welford's algorithm * for j in range(uold+1, upper+1): # <<<<<<<<<<<<<< @@ -38437,7 +38903,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ for (__pyx_t_18 = (__pyx_v_uold + 1); __pyx_t_18 < __pyx_t_24; __pyx_t_18+=1) { __pyx_v_j = __pyx_t_18; - /* "pytesmo/metrics/_fast_pairwise.pyx":450 + /* "pytesmo/metrics/_fast_pairwise.pyx":451 * # first, add the new terms with Welford's algorithm * for j in range(uold+1, upper+1): * mxold = mx # <<<<<<<<<<<<<< @@ -38446,7 +38912,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_mxold = __pyx_v_mx; - /* "pytesmo/metrics/_fast_pairwise.pyx":451 + /* "pytesmo/metrics/_fast_pairwise.pyx":452 * for j in range(uold+1, upper+1): * mxold = mx * myold = my # <<<<<<<<<<<<<< @@ -38455,7 +38921,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_myold = __pyx_v_my; - /* "pytesmo/metrics/_fast_pairwise.pyx":452 + /* "pytesmo/metrics/_fast_pairwise.pyx":453 * mxold = mx * myold = my * rolling_nobs += 1 # <<<<<<<<<<<<<< @@ -38464,7 +38930,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_rolling_nobs = (__pyx_v_rolling_nobs + 1.0); - /* "pytesmo/metrics/_fast_pairwise.pyx":453 + /* "pytesmo/metrics/_fast_pairwise.pyx":454 * myold = my * rolling_nobs += 1 * mx += (x[j] - mx) / rolling_nobs # <<<<<<<<<<<<<< @@ -38474,7 +38940,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_21 = __pyx_v_j; __pyx_v_mx = (__pyx_v_mx + (((*((float *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_21 * __pyx_v_x.strides[0]) ))) - __pyx_v_mx) / __pyx_v_rolling_nobs)); - /* "pytesmo/metrics/_fast_pairwise.pyx":454 + /* "pytesmo/metrics/_fast_pairwise.pyx":455 * rolling_nobs += 1 * mx += (x[j] - mx) / rolling_nobs * my += (y[j] - my) / rolling_nobs # <<<<<<<<<<<<<< @@ -38484,7 +38950,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_21 = __pyx_v_j; __pyx_v_my = (__pyx_v_my + (((*((float *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_21 * __pyx_v_y.strides[0]) ))) - __pyx_v_my) / __pyx_v_rolling_nobs)); - /* "pytesmo/metrics/_fast_pairwise.pyx":455 + /* "pytesmo/metrics/_fast_pairwise.pyx":456 * mx += (x[j] - mx) / rolling_nobs * my += (y[j] - my) / rolling_nobs * msd += ((x[j] - y[j])**2 - msd) / rolling_nobs # <<<<<<<<<<<<<< @@ -38495,7 +38961,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_22 = __pyx_v_j; __pyx_v_msd = (__pyx_v_msd + ((powf(((*((float *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_21 * __pyx_v_x.strides[0]) ))) - (*((float *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_22 * __pyx_v_y.strides[0]) )))), 2.0) - __pyx_v_msd) / __pyx_v_rolling_nobs)); - /* "pytesmo/metrics/_fast_pairwise.pyx":456 + /* "pytesmo/metrics/_fast_pairwise.pyx":457 * my += (y[j] - my) / rolling_nobs * msd += ((x[j] - y[j])**2 - msd) / rolling_nobs * M2x += (x[j] - mx) * (x[j] - mxold) # <<<<<<<<<<<<<< @@ -38506,7 +38972,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_21 = __pyx_v_j; __pyx_v_M2x = (__pyx_v_M2x + (((*((float *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_22 * __pyx_v_x.strides[0]) ))) - __pyx_v_mx) * ((*((float *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_21 * __pyx_v_x.strides[0]) ))) - __pyx_v_mxold))); - /* "pytesmo/metrics/_fast_pairwise.pyx":457 + /* "pytesmo/metrics/_fast_pairwise.pyx":458 * msd += ((x[j] - y[j])**2 - msd) / rolling_nobs * M2x += (x[j] - mx) * (x[j] - mxold) * M2y += (y[j] - my) * (y[j] - myold) # <<<<<<<<<<<<<< @@ -38517,7 +38983,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_22 = __pyx_v_j; __pyx_v_M2y = (__pyx_v_M2y + (((*((float *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_21 * __pyx_v_y.strides[0]) ))) - __pyx_v_my) * ((*((float *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_22 * __pyx_v_y.strides[0]) ))) - __pyx_v_myold))); - /* "pytesmo/metrics/_fast_pairwise.pyx":458 + /* "pytesmo/metrics/_fast_pairwise.pyx":459 * M2x += (x[j] - mx) * (x[j] - mxold) * M2y += (y[j] - my) * (y[j] - myold) * C += (x[j] - mx) * (y[j] - myold) # <<<<<<<<<<<<<< @@ -38529,7 +38995,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_v_C = (__pyx_v_C + (((*((float *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_22 * __pyx_v_x.strides[0]) ))) - __pyx_v_mx) * ((*((float *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_21 * __pyx_v_y.strides[0]) ))) - __pyx_v_myold))); } - /* "pytesmo/metrics/_fast_pairwise.pyx":463 + /* "pytesmo/metrics/_fast_pairwise.pyx":464 * # the old values here correspond to the m_n values in the formula, * # that's why the order is different here * for j in range(lold, lower): # <<<<<<<<<<<<<< @@ -38541,7 +39007,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ for (__pyx_t_20 = __pyx_v_lold; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; - /* "pytesmo/metrics/_fast_pairwise.pyx":464 + /* "pytesmo/metrics/_fast_pairwise.pyx":465 * # that's why the order is different here * for j in range(lold, lower): * mxold = mx # <<<<<<<<<<<<<< @@ -38550,7 +39016,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_mxold = __pyx_v_mx; - /* "pytesmo/metrics/_fast_pairwise.pyx":465 + /* "pytesmo/metrics/_fast_pairwise.pyx":466 * for j in range(lold, lower): * mxold = mx * myold = my # <<<<<<<<<<<<<< @@ -38559,7 +39025,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_myold = __pyx_v_my; - /* "pytesmo/metrics/_fast_pairwise.pyx":466 + /* "pytesmo/metrics/_fast_pairwise.pyx":467 * mxold = mx * myold = my * rolling_nobs -= 1 # <<<<<<<<<<<<<< @@ -38568,7 +39034,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_rolling_nobs = (__pyx_v_rolling_nobs - 1.0); - /* "pytesmo/metrics/_fast_pairwise.pyx":467 + /* "pytesmo/metrics/_fast_pairwise.pyx":468 * myold = my * rolling_nobs -= 1 * mx -= (x[j] - mx) / rolling_nobs # <<<<<<<<<<<<<< @@ -38578,7 +39044,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_21 = __pyx_v_j; __pyx_v_mx = (__pyx_v_mx - (((*((float *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_21 * __pyx_v_x.strides[0]) ))) - __pyx_v_mx) / __pyx_v_rolling_nobs)); - /* "pytesmo/metrics/_fast_pairwise.pyx":468 + /* "pytesmo/metrics/_fast_pairwise.pyx":469 * rolling_nobs -= 1 * mx -= (x[j] - mx) / rolling_nobs * my -= (y[j] - my) / rolling_nobs # <<<<<<<<<<<<<< @@ -38588,7 +39054,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_21 = __pyx_v_j; __pyx_v_my = (__pyx_v_my - (((*((float *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_21 * __pyx_v_y.strides[0]) ))) - __pyx_v_my) / __pyx_v_rolling_nobs)); - /* "pytesmo/metrics/_fast_pairwise.pyx":469 + /* "pytesmo/metrics/_fast_pairwise.pyx":470 * mx -= (x[j] - mx) / rolling_nobs * my -= (y[j] - my) / rolling_nobs * msd -= ((x[j] - y[j])**2 - msd) / rolling_nobs # <<<<<<<<<<<<<< @@ -38599,7 +39065,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_22 = __pyx_v_j; __pyx_v_msd = (__pyx_v_msd - ((powf(((*((float *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_21 * __pyx_v_x.strides[0]) ))) - (*((float *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_22 * __pyx_v_y.strides[0]) )))), 2.0) - __pyx_v_msd) / __pyx_v_rolling_nobs)); - /* "pytesmo/metrics/_fast_pairwise.pyx":470 + /* "pytesmo/metrics/_fast_pairwise.pyx":471 * my -= (y[j] - my) / rolling_nobs * msd -= ((x[j] - y[j])**2 - msd) / rolling_nobs * M2x -= (x[j] - mxold) * (x[j] - mx) # <<<<<<<<<<<<<< @@ -38610,7 +39076,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_21 = __pyx_v_j; __pyx_v_M2x = (__pyx_v_M2x - (((*((float *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_22 * __pyx_v_x.strides[0]) ))) - __pyx_v_mxold) * ((*((float *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_21 * __pyx_v_x.strides[0]) ))) - __pyx_v_mx))); - /* "pytesmo/metrics/_fast_pairwise.pyx":471 + /* "pytesmo/metrics/_fast_pairwise.pyx":472 * msd -= ((x[j] - y[j])**2 - msd) / rolling_nobs * M2x -= (x[j] - mxold) * (x[j] - mx) * M2y -= (y[j] - myold) * (y[j] - my) # <<<<<<<<<<<<<< @@ -38621,7 +39087,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_22 = __pyx_v_j; __pyx_v_M2y = (__pyx_v_M2y - (((*((float *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_21 * __pyx_v_y.strides[0]) ))) - __pyx_v_myold) * ((*((float *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_22 * __pyx_v_y.strides[0]) ))) - __pyx_v_my))); - /* "pytesmo/metrics/_fast_pairwise.pyx":472 + /* "pytesmo/metrics/_fast_pairwise.pyx":473 * M2x -= (x[j] - mxold) * (x[j] - mx) * M2y -= (y[j] - myold) * (y[j] - my) * C -= (x[j] - mxold) * (y[j] - my) # <<<<<<<<<<<<<< @@ -38633,7 +39099,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_v_C = (__pyx_v_C - (((*((float *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_22 * __pyx_v_x.strides[0]) ))) - __pyx_v_mxold) * ((*((float *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_21 * __pyx_v_y.strides[0]) ))) - __pyx_v_my))); } - /* "pytesmo/metrics/_fast_pairwise.pyx":475 + /* "pytesmo/metrics/_fast_pairwise.pyx":476 * * # check if we have enough observations * num_obs = upper - lower + 1 # <<<<<<<<<<<<<< @@ -38642,7 +39108,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_num_obs = ((__pyx_v_upper - __pyx_v_lower) + 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":476 + /* "pytesmo/metrics/_fast_pairwise.pyx":477 * # check if we have enough observations * num_obs = upper - lower + 1 * if num_obs == 0 or num_obs < min_periods: # <<<<<<<<<<<<<< @@ -38660,7 +39126,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_L22_bool_binop_done:; if (__pyx_t_17) { - /* "pytesmo/metrics/_fast_pairwise.pyx":477 + /* "pytesmo/metrics/_fast_pairwise.pyx":478 * num_obs = upper - lower + 1 * if num_obs == 0 or num_obs < min_periods: * pr_view[i, 0] = NAN # <<<<<<<<<<<<<< @@ -38671,7 +39137,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_22 = 0; *((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_pr_view.data + __pyx_t_21 * __pyx_v_pr_view.strides[0]) ) + __pyx_t_22 * __pyx_v_pr_view.strides[1]) )) = NPY_NAN; - /* "pytesmo/metrics/_fast_pairwise.pyx":478 + /* "pytesmo/metrics/_fast_pairwise.pyx":479 * if num_obs == 0 or num_obs < min_periods: * pr_view[i, 0] = NAN * pr_view[i, 1] = NAN # <<<<<<<<<<<<<< @@ -38682,7 +39148,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_21 = 1; *((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_pr_view.data + __pyx_t_22 * __pyx_v_pr_view.strides[0]) ) + __pyx_t_21 * __pyx_v_pr_view.strides[1]) )) = NPY_NAN; - /* "pytesmo/metrics/_fast_pairwise.pyx":479 + /* "pytesmo/metrics/_fast_pairwise.pyx":480 * pr_view[i, 0] = NAN * pr_view[i, 1] = NAN * rmsd_view[i] = NAN # <<<<<<<<<<<<<< @@ -38692,7 +39158,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_21 = __pyx_v_i; *((float *) ( /* dim=0 */ (__pyx_v_rmsd_view.data + __pyx_t_21 * __pyx_v_rmsd_view.strides[0]) )) = NPY_NAN; - /* "pytesmo/metrics/_fast_pairwise.pyx":476 + /* "pytesmo/metrics/_fast_pairwise.pyx":477 * # check if we have enough observations * num_obs = upper - lower + 1 * if num_obs == 0 or num_obs < min_periods: # <<<<<<<<<<<<<< @@ -38702,7 +39168,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ goto __pyx_L21; } - /* "pytesmo/metrics/_fast_pairwise.pyx":483 + /* "pytesmo/metrics/_fast_pairwise.pyx":484 * # to get var and cov we would need to divide by n, but since * # we're only interested in the ratio that's not necessary * pr_view[i, 0], pr_view[i, 1] = _pearsonr_from_moments( # <<<<<<<<<<<<<< @@ -38711,14 +39177,14 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ /*else*/ { - /* "pytesmo/metrics/_fast_pairwise.pyx":484 + /* "pytesmo/metrics/_fast_pairwise.pyx":485 * # we're only interested in the ratio that's not necessary * pr_view[i, 0], pr_view[i, 1] = _pearsonr_from_moments( * M2x, M2y, C, num_obs # <<<<<<<<<<<<<< * ) * rmsd_view[i] = sqrt(msd) */ - __pyx_t_5 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearsonr_from_moments(__pyx_v_M2x, __pyx_v_M2y, __pyx_v_C, __pyx_v_num_obs, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_5 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearsonr_from_moments(__pyx_v_M2x, __pyx_v_M2y, __pyx_v_C, __pyx_v_num_obs, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; @@ -38726,7 +39192,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 483, __pyx_L1_error) + __PYX_ERR(0, 484, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -38739,15 +39205,15 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_2); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_26 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); @@ -38755,7 +39221,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_2 = __pyx_t_26(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L24_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_26(__pyx_t_4), 2) < 0) __PYX_ERR(0, 483, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_26(__pyx_t_4), 2) < 0) __PYX_ERR(0, 484, __pyx_L1_error) __pyx_t_26 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L25_unpacking_done; @@ -38763,20 +39229,20 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_26 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 483, __pyx_L1_error) + __PYX_ERR(0, 484, __pyx_L1_error) __pyx_L25_unpacking_done:; } - /* "pytesmo/metrics/_fast_pairwise.pyx":483 + /* "pytesmo/metrics/_fast_pairwise.pyx":484 * # to get var and cov we would need to divide by n, but since * # we're only interested in the ratio that's not necessary * pr_view[i, 0], pr_view[i, 1] = _pearsonr_from_moments( # <<<<<<<<<<<<<< * M2x, M2y, C, num_obs * ) */ - __pyx_t_27 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_27 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_27 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_27 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_28 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_28 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_28 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_28 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_21 = __pyx_v_i; __pyx_t_22 = 0; @@ -38785,7 +39251,7 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_21 = 1; *((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_pr_view.data + __pyx_t_22 * __pyx_v_pr_view.strides[0]) ) + __pyx_t_21 * __pyx_v_pr_view.strides[1]) )) = __pyx_t_28; - /* "pytesmo/metrics/_fast_pairwise.pyx":486 + /* "pytesmo/metrics/_fast_pairwise.pyx":487 * M2x, M2y, C, num_obs * ) * rmsd_view[i] = sqrt(msd) # <<<<<<<<<<<<<< @@ -38798,25 +39264,25 @@ static PyObject *__pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_L21:; } - /* "pytesmo/metrics/_fast_pairwise.pyx":488 + /* "pytesmo/metrics/_fast_pairwise.pyx":489 * rmsd_view[i] = sqrt(msd) * * return pr_arr, rmsd_arr # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 488, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF((PyObject *)__pyx_v_pr_arr); __Pyx_GIVEREF((PyObject *)__pyx_v_pr_arr); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_pr_arr))) __PYX_ERR(0, 488, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_pr_arr))) __PYX_ERR(0, 489, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v_rmsd_arr); __Pyx_GIVEREF((PyObject *)__pyx_v_rmsd_arr); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_rmsd_arr))) __PYX_ERR(0, 488, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_rmsd_arr))) __PYX_ERR(0, 489, __pyx_L1_error); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":346 + /* "pytesmo/metrics/_fast_pairwise.pyx":347 * # old: 76.7 ms 1.62 ms per loop (mean std. dev. of 7 runs, 10 loops each) * # new: 117 s 836 ns per loop (mean std. dev. of 7 runs, 10000 loops each) * cpdef rolling_pr_rmsd(double [:] timestamps, # <<<<<<<<<<<<<< @@ -38908,7 +39374,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_99__pyx_fuse_0rolli (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -38916,9 +39382,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_99__pyx_fuse_0rolli (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0rolling_pr_rmsd", 1, 6, 6, 1); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0rolling_pr_rmsd", 1, 6, 6, 1); __PYX_ERR(0, 347, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -38926,9 +39392,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_99__pyx_fuse_0rolli (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0rolling_pr_rmsd", 1, 6, 6, 2); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0rolling_pr_rmsd", 1, 6, 6, 2); __PYX_ERR(0, 347, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -38936,9 +39402,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_99__pyx_fuse_0rolli (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0rolling_pr_rmsd", 1, 6, 6, 3); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0rolling_pr_rmsd", 1, 6, 6, 3); __PYX_ERR(0, 347, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -38946,9 +39412,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_99__pyx_fuse_0rolli (void)__Pyx_Arg_NewRef_VARARGS(values[4]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0rolling_pr_rmsd", 1, 6, 6, 4); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0rolling_pr_rmsd", 1, 6, 6, 4); __PYX_ERR(0, 347, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: @@ -38956,14 +39422,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_99__pyx_fuse_0rolli (void)__Pyx_Arg_NewRef_VARARGS(values[5]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0rolling_pr_rmsd", 1, 6, 6, 5); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0rolling_pr_rmsd", 1, 6, 6, 5); __PYX_ERR(0, 347, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0rolling_pr_rmsd") < 0)) __PYX_ERR(0, 346, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0rolling_pr_rmsd") < 0)) __PYX_ERR(0, 347, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 6)) { goto __pyx_L5_argtuple_error; @@ -38975,16 +39441,16 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_99__pyx_fuse_0rolli values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5); } - __pyx_v_timestamps = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_timestamps.memview)) __PYX_ERR(0, 346, __pyx_L3_error) - __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 347, __pyx_L3_error) - __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 348, __pyx_L3_error) - __pyx_v_window_size = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_window_size == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 349, __pyx_L3_error) - __pyx_v_center = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_center == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 350, __pyx_L3_error) - __pyx_v_min_periods = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_min_periods == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 351, __pyx_L3_error) + __pyx_v_timestamps = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_timestamps.memview)) __PYX_ERR(0, 347, __pyx_L3_error) + __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 348, __pyx_L3_error) + __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 349, __pyx_L3_error) + __pyx_v_window_size = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_window_size == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 350, __pyx_L3_error) + __pyx_v_center = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_center == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 351, __pyx_L3_error) + __pyx_v_min_periods = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_min_periods == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 352, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0rolling_pr_rmsd", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0rolling_pr_rmsd", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 347, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -39026,10 +39492,10 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_98__pyx_fuse_0rolli int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_0rolling_pr_rmsd", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_timestamps.memview)) { __Pyx_RaiseUnboundLocalError("timestamps"); __PYX_ERR(0, 346, __pyx_L1_error) } - if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 346, __pyx_L1_error) } - if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 346, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_pr_rmsd(__pyx_v_timestamps, __pyx_v_x, __pyx_v_y, __pyx_v_window_size, __pyx_v_center, __pyx_v_min_periods, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely(!__pyx_v_timestamps.memview)) { __Pyx_RaiseUnboundLocalError("timestamps"); __PYX_ERR(0, 347, __pyx_L1_error) } + if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 347, __pyx_L1_error) } + if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 347, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_0__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_pr_rmsd(__pyx_v_timestamps, __pyx_v_x, __pyx_v_y, __pyx_v_window_size, __pyx_v_center, __pyx_v_min_periods, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -39117,7 +39583,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_pybuffernd_rmsd_arr.data = NULL; __pyx_pybuffernd_rmsd_arr.rcbuffer = &__pyx_pybuffer_rmsd_arr; - /* "pytesmo/metrics/_fast_pairwise.pyx":385 + /* "pytesmo/metrics/_fast_pairwise.pyx":386 * cdef floating [:] rmsd_view * * n_ts = len(timestamps) # <<<<<<<<<<<<<< @@ -39127,48 +39593,48 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_timestamps); __pyx_v_n_ts = __pyx_t_1; - /* "pytesmo/metrics/_fast_pairwise.pyx":391 + /* "pytesmo/metrics/_fast_pairwise.pyx":392 * rmsd_arr = np.empty(n_ts, dtype=np.float32) * elif floating is double: * pr_arr = np.empty((n_ts, 2), dtype=np.float64) # <<<<<<<<<<<<<< * rmsd_arr = np.empty(n_ts, dtype=np.float64) * else: */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 391, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_n_ts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 391, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_n_ts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 391, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 391, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_2)) __PYX_ERR(0, 391, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_2)) __PYX_ERR(0, 392, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 391, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 391, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 392, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 391, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 391, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 391, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 391, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 391, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 391, __pyx_L1_error) + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 392, __pyx_L1_error) __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; @@ -39185,46 +39651,46 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_pr_arr.diminfo[0].strides = __pyx_pybuffernd_pr_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pr_arr.diminfo[0].shape = __pyx_pybuffernd_pr_arr.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_pr_arr.diminfo[1].strides = __pyx_pybuffernd_pr_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_pr_arr.diminfo[1].shape = __pyx_pybuffernd_pr_arr.rcbuffer->pybuffer.shape[1]; - if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 391, __pyx_L1_error) + if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 392, __pyx_L1_error) } __pyx_t_7 = 0; __pyx_v_pr_arr = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":392 + /* "pytesmo/metrics/_fast_pairwise.pyx":393 * elif floating is double: * pr_arr = np.empty((n_ts, 2), dtype=np.float64) * rmsd_arr = np.empty(n_ts, dtype=np.float64) # <<<<<<<<<<<<<< * else: * raise ValueError("Unkown floating type") */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 392, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 392, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_n_ts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 392, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_n_ts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6)) __PYX_ERR(0, 392, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6)) __PYX_ERR(0, 393, __pyx_L1_error); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 392, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 392, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 392, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 392, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 393, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 392, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 392, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 393, __pyx_L1_error) __pyx_t_12 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; @@ -39241,37 +39707,37 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_rmsd_arr.diminfo[0].strides = __pyx_pybuffernd_rmsd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rmsd_arr.diminfo[0].shape = __pyx_pybuffernd_rmsd_arr.rcbuffer->pybuffer.shape[0]; - if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 392, __pyx_L1_error) + if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 393, __pyx_L1_error) } __pyx_t_12 = 0; __pyx_v_rmsd_arr = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":396 + /* "pytesmo/metrics/_fast_pairwise.pyx":397 * raise ValueError("Unkown floating type") * # work on memoryviews instead of on arrays directly * pr_view = pr_arr # <<<<<<<<<<<<<< * rmsd_view = rmsd_arr * */ - __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(((PyObject *)__pyx_v_pr_arr), PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 396, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(((PyObject *)__pyx_v_pr_arr), PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 397, __pyx_L1_error) __pyx_v_pr_view = __pyx_t_13; __pyx_t_13.memview = NULL; __pyx_t_13.data = NULL; - /* "pytesmo/metrics/_fast_pairwise.pyx":397 + /* "pytesmo/metrics/_fast_pairwise.pyx":398 * # work on memoryviews instead of on arrays directly * pr_view = pr_arr * rmsd_view = rmsd_arr # <<<<<<<<<<<<<< * * mx = my = msd = M2x = M2y = C = 0 */ - __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_rmsd_arr), PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 397, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(((PyObject *)__pyx_v_rmsd_arr), PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 398, __pyx_L1_error) __pyx_v_rmsd_view = __pyx_t_14; __pyx_t_14.memview = NULL; __pyx_t_14.data = NULL; - /* "pytesmo/metrics/_fast_pairwise.pyx":399 + /* "pytesmo/metrics/_fast_pairwise.pyx":400 * rmsd_view = rmsd_arr * * mx = my = msd = M2x = M2y = C = 0 # <<<<<<<<<<<<<< @@ -39285,7 +39751,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_v_M2y = 0.0; __pyx_v_C = 0.0; - /* "pytesmo/metrics/_fast_pairwise.pyx":400 + /* "pytesmo/metrics/_fast_pairwise.pyx":401 * * mx = my = msd = M2x = M2y = C = 0 * lower = 0 # <<<<<<<<<<<<<< @@ -39294,7 +39760,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_lower = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":401 + /* "pytesmo/metrics/_fast_pairwise.pyx":402 * mx = my = msd = M2x = M2y = C = 0 * lower = 0 * upper = -1 # <<<<<<<<<<<<<< @@ -39303,7 +39769,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_upper = -1; - /* "pytesmo/metrics/_fast_pairwise.pyx":402 + /* "pytesmo/metrics/_fast_pairwise.pyx":403 * lower = 0 * upper = -1 * rolling_nobs = 0 # <<<<<<<<<<<<<< @@ -39312,7 +39778,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_rolling_nobs = 0.0; - /* "pytesmo/metrics/_fast_pairwise.pyx":403 + /* "pytesmo/metrics/_fast_pairwise.pyx":404 * upper = -1 * rolling_nobs = 0 * for i in range(n_ts): # <<<<<<<<<<<<<< @@ -39324,7 +39790,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_i = __pyx_t_16; - /* "pytesmo/metrics/_fast_pairwise.pyx":404 + /* "pytesmo/metrics/_fast_pairwise.pyx":405 * rolling_nobs = 0 * for i in range(n_ts): * lold = lower # <<<<<<<<<<<<<< @@ -39333,7 +39799,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_lold = __pyx_v_lower; - /* "pytesmo/metrics/_fast_pairwise.pyx":405 + /* "pytesmo/metrics/_fast_pairwise.pyx":406 * for i in range(n_ts): * lold = lower * uold = upper # <<<<<<<<<<<<<< @@ -39342,7 +39808,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_uold = __pyx_v_upper; - /* "pytesmo/metrics/_fast_pairwise.pyx":409 + /* "pytesmo/metrics/_fast_pairwise.pyx":410 * * # find interval * if center: # <<<<<<<<<<<<<< @@ -39352,7 +39818,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_17 = (__pyx_v_center != 0); if (__pyx_t_17) { - /* "pytesmo/metrics/_fast_pairwise.pyx":411 + /* "pytesmo/metrics/_fast_pairwise.pyx":412 * if center: * # find new start * for j in range(lower, n_ts): # <<<<<<<<<<<<<< @@ -39364,7 +39830,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ for (__pyx_t_20 = __pyx_v_lower; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; - /* "pytesmo/metrics/_fast_pairwise.pyx":412 + /* "pytesmo/metrics/_fast_pairwise.pyx":413 * # find new start * for j in range(lower, n_ts): * lower = j # <<<<<<<<<<<<<< @@ -39373,7 +39839,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_lower = __pyx_v_j; - /* "pytesmo/metrics/_fast_pairwise.pyx":413 + /* "pytesmo/metrics/_fast_pairwise.pyx":414 * for j in range(lower, n_ts): * lower = j * if timestamps[j] >= timestamps[i] - window_size: # <<<<<<<<<<<<<< @@ -39385,7 +39851,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_17 = ((*((double *) ( /* dim=0 */ (__pyx_v_timestamps.data + __pyx_t_21 * __pyx_v_timestamps.strides[0]) ))) >= ((*((double *) ( /* dim=0 */ (__pyx_v_timestamps.data + __pyx_t_22 * __pyx_v_timestamps.strides[0]) ))) - __pyx_v_window_size)); if (__pyx_t_17) { - /* "pytesmo/metrics/_fast_pairwise.pyx":414 + /* "pytesmo/metrics/_fast_pairwise.pyx":415 * lower = j * if timestamps[j] >= timestamps[i] - window_size: * break # <<<<<<<<<<<<<< @@ -39394,7 +39860,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ goto __pyx_L7_break; - /* "pytesmo/metrics/_fast_pairwise.pyx":413 + /* "pytesmo/metrics/_fast_pairwise.pyx":414 * for j in range(lower, n_ts): * lower = j * if timestamps[j] >= timestamps[i] - window_size: # <<<<<<<<<<<<<< @@ -39405,7 +39871,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ } __pyx_L7_break:; - /* "pytesmo/metrics/_fast_pairwise.pyx":421 + /* "pytesmo/metrics/_fast_pairwise.pyx":422 * * # if we're not at the end yet * if timestamps[n_ts - 1] > timestamps[i] + window_size: # <<<<<<<<<<<<<< @@ -39417,7 +39883,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_17 = ((*((double *) ( /* dim=0 */ (__pyx_v_timestamps.data + __pyx_t_22 * __pyx_v_timestamps.strides[0]) ))) > ((*((double *) ( /* dim=0 */ (__pyx_v_timestamps.data + __pyx_t_21 * __pyx_v_timestamps.strides[0]) ))) + __pyx_v_window_size)); if (__pyx_t_17) { - /* "pytesmo/metrics/_fast_pairwise.pyx":422 + /* "pytesmo/metrics/_fast_pairwise.pyx":423 * # if we're not at the end yet * if timestamps[n_ts - 1] > timestamps[i] + window_size: * if i == 0: # <<<<<<<<<<<<<< @@ -39427,7 +39893,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_17 = (__pyx_v_i == 0); if (__pyx_t_17) { - /* "pytesmo/metrics/_fast_pairwise.pyx":426 + /* "pytesmo/metrics/_fast_pairwise.pyx":427 * # correctly, but in the following upper must be at least 1, * # so we don't access an invalid index * upper = 1 # <<<<<<<<<<<<<< @@ -39436,7 +39902,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_upper = 1; - /* "pytesmo/metrics/_fast_pairwise.pyx":422 + /* "pytesmo/metrics/_fast_pairwise.pyx":423 * # if we're not at the end yet * if timestamps[n_ts - 1] > timestamps[i] + window_size: * if i == 0: # <<<<<<<<<<<<<< @@ -39445,7 +39911,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ } - /* "pytesmo/metrics/_fast_pairwise.pyx":427 + /* "pytesmo/metrics/_fast_pairwise.pyx":428 * # so we don't access an invalid index * upper = 1 * for j in range(upper, n_ts): # <<<<<<<<<<<<<< @@ -39457,7 +39923,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ for (__pyx_t_20 = __pyx_v_upper; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; - /* "pytesmo/metrics/_fast_pairwise.pyx":430 + /* "pytesmo/metrics/_fast_pairwise.pyx":431 * # j - 1 because we want the index that is still inside the * # window * upper = j - 1 # <<<<<<<<<<<<<< @@ -39466,7 +39932,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_upper = (__pyx_v_j - 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":431 + /* "pytesmo/metrics/_fast_pairwise.pyx":432 * # window * upper = j - 1 * if timestamps[j] > timestamps[i] + window_size: # <<<<<<<<<<<<<< @@ -39478,7 +39944,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_17 = ((*((double *) ( /* dim=0 */ (__pyx_v_timestamps.data + __pyx_t_21 * __pyx_v_timestamps.strides[0]) ))) > ((*((double *) ( /* dim=0 */ (__pyx_v_timestamps.data + __pyx_t_22 * __pyx_v_timestamps.strides[0]) ))) + __pyx_v_window_size)); if (__pyx_t_17) { - /* "pytesmo/metrics/_fast_pairwise.pyx":432 + /* "pytesmo/metrics/_fast_pairwise.pyx":433 * upper = j - 1 * if timestamps[j] > timestamps[i] + window_size: * break # <<<<<<<<<<<<<< @@ -39487,7 +39953,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ goto __pyx_L12_break; - /* "pytesmo/metrics/_fast_pairwise.pyx":431 + /* "pytesmo/metrics/_fast_pairwise.pyx":432 * # window * upper = j - 1 * if timestamps[j] > timestamps[i] + window_size: # <<<<<<<<<<<<<< @@ -39498,7 +39964,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ } __pyx_L12_break:; - /* "pytesmo/metrics/_fast_pairwise.pyx":421 + /* "pytesmo/metrics/_fast_pairwise.pyx":422 * * # if we're not at the end yet * if timestamps[n_ts - 1] > timestamps[i] + window_size: # <<<<<<<<<<<<<< @@ -39508,7 +39974,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ goto __pyx_L9; } - /* "pytesmo/metrics/_fast_pairwise.pyx":434 + /* "pytesmo/metrics/_fast_pairwise.pyx":435 * break * else: * upper = n_ts - 1 # <<<<<<<<<<<<<< @@ -39520,7 +39986,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ } __pyx_L9:; - /* "pytesmo/metrics/_fast_pairwise.pyx":409 + /* "pytesmo/metrics/_fast_pairwise.pyx":410 * * # find interval * if center: # <<<<<<<<<<<<<< @@ -39530,7 +39996,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ goto __pyx_L5; } - /* "pytesmo/metrics/_fast_pairwise.pyx":437 + /* "pytesmo/metrics/_fast_pairwise.pyx":438 * * else: * for j in range(lower, n_ts): # <<<<<<<<<<<<<< @@ -39543,7 +40009,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ for (__pyx_t_20 = __pyx_v_lower; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; - /* "pytesmo/metrics/_fast_pairwise.pyx":438 + /* "pytesmo/metrics/_fast_pairwise.pyx":439 * else: * for j in range(lower, n_ts): * lower = j # <<<<<<<<<<<<<< @@ -39552,7 +40018,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_lower = __pyx_v_j; - /* "pytesmo/metrics/_fast_pairwise.pyx":439 + /* "pytesmo/metrics/_fast_pairwise.pyx":440 * for j in range(lower, n_ts): * lower = j * if timestamps[j] > timestamps[i] - window_size: # <<<<<<<<<<<<<< @@ -39564,7 +40030,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_17 = ((*((double *) ( /* dim=0 */ (__pyx_v_timestamps.data + __pyx_t_22 * __pyx_v_timestamps.strides[0]) ))) > ((*((double *) ( /* dim=0 */ (__pyx_v_timestamps.data + __pyx_t_21 * __pyx_v_timestamps.strides[0]) ))) - __pyx_v_window_size)); if (__pyx_t_17) { - /* "pytesmo/metrics/_fast_pairwise.pyx":440 + /* "pytesmo/metrics/_fast_pairwise.pyx":441 * lower = j * if timestamps[j] > timestamps[i] - window_size: * break # <<<<<<<<<<<<<< @@ -39573,7 +40039,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ goto __pyx_L15_break; - /* "pytesmo/metrics/_fast_pairwise.pyx":439 + /* "pytesmo/metrics/_fast_pairwise.pyx":440 * for j in range(lower, n_ts): * lower = j * if timestamps[j] > timestamps[i] - window_size: # <<<<<<<<<<<<<< @@ -39584,7 +40050,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ } __pyx_L15_break:; - /* "pytesmo/metrics/_fast_pairwise.pyx":441 + /* "pytesmo/metrics/_fast_pairwise.pyx":442 * if timestamps[j] > timestamps[i] - window_size: * break * upper = i # <<<<<<<<<<<<<< @@ -39595,7 +40061,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ } __pyx_L5:; - /* "pytesmo/metrics/_fast_pairwise.pyx":449 + /* "pytesmo/metrics/_fast_pairwise.pyx":450 * * # first, add the new terms with Welford's algorithm * for j in range(uold+1, upper+1): # <<<<<<<<<<<<<< @@ -39607,7 +40073,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ for (__pyx_t_18 = (__pyx_v_uold + 1); __pyx_t_18 < __pyx_t_24; __pyx_t_18+=1) { __pyx_v_j = __pyx_t_18; - /* "pytesmo/metrics/_fast_pairwise.pyx":450 + /* "pytesmo/metrics/_fast_pairwise.pyx":451 * # first, add the new terms with Welford's algorithm * for j in range(uold+1, upper+1): * mxold = mx # <<<<<<<<<<<<<< @@ -39616,7 +40082,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_mxold = __pyx_v_mx; - /* "pytesmo/metrics/_fast_pairwise.pyx":451 + /* "pytesmo/metrics/_fast_pairwise.pyx":452 * for j in range(uold+1, upper+1): * mxold = mx * myold = my # <<<<<<<<<<<<<< @@ -39625,7 +40091,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_myold = __pyx_v_my; - /* "pytesmo/metrics/_fast_pairwise.pyx":452 + /* "pytesmo/metrics/_fast_pairwise.pyx":453 * mxold = mx * myold = my * rolling_nobs += 1 # <<<<<<<<<<<<<< @@ -39634,7 +40100,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_rolling_nobs = (__pyx_v_rolling_nobs + 1.0); - /* "pytesmo/metrics/_fast_pairwise.pyx":453 + /* "pytesmo/metrics/_fast_pairwise.pyx":454 * myold = my * rolling_nobs += 1 * mx += (x[j] - mx) / rolling_nobs # <<<<<<<<<<<<<< @@ -39644,7 +40110,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_21 = __pyx_v_j; __pyx_v_mx = (__pyx_v_mx + (((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_21 * __pyx_v_x.strides[0]) ))) - __pyx_v_mx) / __pyx_v_rolling_nobs)); - /* "pytesmo/metrics/_fast_pairwise.pyx":454 + /* "pytesmo/metrics/_fast_pairwise.pyx":455 * rolling_nobs += 1 * mx += (x[j] - mx) / rolling_nobs * my += (y[j] - my) / rolling_nobs # <<<<<<<<<<<<<< @@ -39654,7 +40120,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_21 = __pyx_v_j; __pyx_v_my = (__pyx_v_my + (((*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_21 * __pyx_v_y.strides[0]) ))) - __pyx_v_my) / __pyx_v_rolling_nobs)); - /* "pytesmo/metrics/_fast_pairwise.pyx":455 + /* "pytesmo/metrics/_fast_pairwise.pyx":456 * mx += (x[j] - mx) / rolling_nobs * my += (y[j] - my) / rolling_nobs * msd += ((x[j] - y[j])**2 - msd) / rolling_nobs # <<<<<<<<<<<<<< @@ -39665,7 +40131,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_22 = __pyx_v_j; __pyx_v_msd = (__pyx_v_msd + ((pow(((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_21 * __pyx_v_x.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_22 * __pyx_v_y.strides[0]) )))), 2.0) - __pyx_v_msd) / __pyx_v_rolling_nobs)); - /* "pytesmo/metrics/_fast_pairwise.pyx":456 + /* "pytesmo/metrics/_fast_pairwise.pyx":457 * my += (y[j] - my) / rolling_nobs * msd += ((x[j] - y[j])**2 - msd) / rolling_nobs * M2x += (x[j] - mx) * (x[j] - mxold) # <<<<<<<<<<<<<< @@ -39676,7 +40142,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_21 = __pyx_v_j; __pyx_v_M2x = (__pyx_v_M2x + (((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_22 * __pyx_v_x.strides[0]) ))) - __pyx_v_mx) * ((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_21 * __pyx_v_x.strides[0]) ))) - __pyx_v_mxold))); - /* "pytesmo/metrics/_fast_pairwise.pyx":457 + /* "pytesmo/metrics/_fast_pairwise.pyx":458 * msd += ((x[j] - y[j])**2 - msd) / rolling_nobs * M2x += (x[j] - mx) * (x[j] - mxold) * M2y += (y[j] - my) * (y[j] - myold) # <<<<<<<<<<<<<< @@ -39687,7 +40153,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_22 = __pyx_v_j; __pyx_v_M2y = (__pyx_v_M2y + (((*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_21 * __pyx_v_y.strides[0]) ))) - __pyx_v_my) * ((*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_22 * __pyx_v_y.strides[0]) ))) - __pyx_v_myold))); - /* "pytesmo/metrics/_fast_pairwise.pyx":458 + /* "pytesmo/metrics/_fast_pairwise.pyx":459 * M2x += (x[j] - mx) * (x[j] - mxold) * M2y += (y[j] - my) * (y[j] - myold) * C += (x[j] - mx) * (y[j] - myold) # <<<<<<<<<<<<<< @@ -39699,7 +40165,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_v_C = (__pyx_v_C + (((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_22 * __pyx_v_x.strides[0]) ))) - __pyx_v_mx) * ((*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_21 * __pyx_v_y.strides[0]) ))) - __pyx_v_myold))); } - /* "pytesmo/metrics/_fast_pairwise.pyx":463 + /* "pytesmo/metrics/_fast_pairwise.pyx":464 * # the old values here correspond to the m_n values in the formula, * # that's why the order is different here * for j in range(lold, lower): # <<<<<<<<<<<<<< @@ -39711,7 +40177,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ for (__pyx_t_20 = __pyx_v_lold; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; - /* "pytesmo/metrics/_fast_pairwise.pyx":464 + /* "pytesmo/metrics/_fast_pairwise.pyx":465 * # that's why the order is different here * for j in range(lold, lower): * mxold = mx # <<<<<<<<<<<<<< @@ -39720,7 +40186,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_mxold = __pyx_v_mx; - /* "pytesmo/metrics/_fast_pairwise.pyx":465 + /* "pytesmo/metrics/_fast_pairwise.pyx":466 * for j in range(lold, lower): * mxold = mx * myold = my # <<<<<<<<<<<<<< @@ -39729,7 +40195,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_myold = __pyx_v_my; - /* "pytesmo/metrics/_fast_pairwise.pyx":466 + /* "pytesmo/metrics/_fast_pairwise.pyx":467 * mxold = mx * myold = my * rolling_nobs -= 1 # <<<<<<<<<<<<<< @@ -39738,7 +40204,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_rolling_nobs = (__pyx_v_rolling_nobs - 1.0); - /* "pytesmo/metrics/_fast_pairwise.pyx":467 + /* "pytesmo/metrics/_fast_pairwise.pyx":468 * myold = my * rolling_nobs -= 1 * mx -= (x[j] - mx) / rolling_nobs # <<<<<<<<<<<<<< @@ -39748,7 +40214,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_21 = __pyx_v_j; __pyx_v_mx = (__pyx_v_mx - (((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_21 * __pyx_v_x.strides[0]) ))) - __pyx_v_mx) / __pyx_v_rolling_nobs)); - /* "pytesmo/metrics/_fast_pairwise.pyx":468 + /* "pytesmo/metrics/_fast_pairwise.pyx":469 * rolling_nobs -= 1 * mx -= (x[j] - mx) / rolling_nobs * my -= (y[j] - my) / rolling_nobs # <<<<<<<<<<<<<< @@ -39758,7 +40224,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_21 = __pyx_v_j; __pyx_v_my = (__pyx_v_my - (((*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_21 * __pyx_v_y.strides[0]) ))) - __pyx_v_my) / __pyx_v_rolling_nobs)); - /* "pytesmo/metrics/_fast_pairwise.pyx":469 + /* "pytesmo/metrics/_fast_pairwise.pyx":470 * mx -= (x[j] - mx) / rolling_nobs * my -= (y[j] - my) / rolling_nobs * msd -= ((x[j] - y[j])**2 - msd) / rolling_nobs # <<<<<<<<<<<<<< @@ -39769,7 +40235,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_22 = __pyx_v_j; __pyx_v_msd = (__pyx_v_msd - ((pow(((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_21 * __pyx_v_x.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_22 * __pyx_v_y.strides[0]) )))), 2.0) - __pyx_v_msd) / __pyx_v_rolling_nobs)); - /* "pytesmo/metrics/_fast_pairwise.pyx":470 + /* "pytesmo/metrics/_fast_pairwise.pyx":471 * my -= (y[j] - my) / rolling_nobs * msd -= ((x[j] - y[j])**2 - msd) / rolling_nobs * M2x -= (x[j] - mxold) * (x[j] - mx) # <<<<<<<<<<<<<< @@ -39780,7 +40246,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_21 = __pyx_v_j; __pyx_v_M2x = (__pyx_v_M2x - (((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_22 * __pyx_v_x.strides[0]) ))) - __pyx_v_mxold) * ((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_21 * __pyx_v_x.strides[0]) ))) - __pyx_v_mx))); - /* "pytesmo/metrics/_fast_pairwise.pyx":471 + /* "pytesmo/metrics/_fast_pairwise.pyx":472 * msd -= ((x[j] - y[j])**2 - msd) / rolling_nobs * M2x -= (x[j] - mxold) * (x[j] - mx) * M2y -= (y[j] - myold) * (y[j] - my) # <<<<<<<<<<<<<< @@ -39791,7 +40257,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_22 = __pyx_v_j; __pyx_v_M2y = (__pyx_v_M2y - (((*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_21 * __pyx_v_y.strides[0]) ))) - __pyx_v_myold) * ((*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_22 * __pyx_v_y.strides[0]) ))) - __pyx_v_my))); - /* "pytesmo/metrics/_fast_pairwise.pyx":472 + /* "pytesmo/metrics/_fast_pairwise.pyx":473 * M2x -= (x[j] - mxold) * (x[j] - mx) * M2y -= (y[j] - myold) * (y[j] - my) * C -= (x[j] - mxold) * (y[j] - my) # <<<<<<<<<<<<<< @@ -39803,7 +40269,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_v_C = (__pyx_v_C - (((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_22 * __pyx_v_x.strides[0]) ))) - __pyx_v_mxold) * ((*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_21 * __pyx_v_y.strides[0]) ))) - __pyx_v_my))); } - /* "pytesmo/metrics/_fast_pairwise.pyx":475 + /* "pytesmo/metrics/_fast_pairwise.pyx":476 * * # check if we have enough observations * num_obs = upper - lower + 1 # <<<<<<<<<<<<<< @@ -39812,7 +40278,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ __pyx_v_num_obs = ((__pyx_v_upper - __pyx_v_lower) + 1); - /* "pytesmo/metrics/_fast_pairwise.pyx":476 + /* "pytesmo/metrics/_fast_pairwise.pyx":477 * # check if we have enough observations * num_obs = upper - lower + 1 * if num_obs == 0 or num_obs < min_periods: # <<<<<<<<<<<<<< @@ -39830,7 +40296,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_L22_bool_binop_done:; if (__pyx_t_17) { - /* "pytesmo/metrics/_fast_pairwise.pyx":477 + /* "pytesmo/metrics/_fast_pairwise.pyx":478 * num_obs = upper - lower + 1 * if num_obs == 0 or num_obs < min_periods: * pr_view[i, 0] = NAN # <<<<<<<<<<<<<< @@ -39841,7 +40307,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_22 = 0; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_pr_view.data + __pyx_t_21 * __pyx_v_pr_view.strides[0]) ) + __pyx_t_22 * __pyx_v_pr_view.strides[1]) )) = NPY_NAN; - /* "pytesmo/metrics/_fast_pairwise.pyx":478 + /* "pytesmo/metrics/_fast_pairwise.pyx":479 * if num_obs == 0 or num_obs < min_periods: * pr_view[i, 0] = NAN * pr_view[i, 1] = NAN # <<<<<<<<<<<<<< @@ -39852,7 +40318,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_21 = 1; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_pr_view.data + __pyx_t_22 * __pyx_v_pr_view.strides[0]) ) + __pyx_t_21 * __pyx_v_pr_view.strides[1]) )) = NPY_NAN; - /* "pytesmo/metrics/_fast_pairwise.pyx":479 + /* "pytesmo/metrics/_fast_pairwise.pyx":480 * pr_view[i, 0] = NAN * pr_view[i, 1] = NAN * rmsd_view[i] = NAN # <<<<<<<<<<<<<< @@ -39862,7 +40328,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_21 = __pyx_v_i; *((double *) ( /* dim=0 */ (__pyx_v_rmsd_view.data + __pyx_t_21 * __pyx_v_rmsd_view.strides[0]) )) = NPY_NAN; - /* "pytesmo/metrics/_fast_pairwise.pyx":476 + /* "pytesmo/metrics/_fast_pairwise.pyx":477 * # check if we have enough observations * num_obs = upper - lower + 1 * if num_obs == 0 or num_obs < min_periods: # <<<<<<<<<<<<<< @@ -39872,7 +40338,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ goto __pyx_L21; } - /* "pytesmo/metrics/_fast_pairwise.pyx":483 + /* "pytesmo/metrics/_fast_pairwise.pyx":484 * # to get var and cov we would need to divide by n, but since * # we're only interested in the ratio that's not necessary * pr_view[i, 0], pr_view[i, 1] = _pearsonr_from_moments( # <<<<<<<<<<<<<< @@ -39881,14 +40347,14 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ */ /*else*/ { - /* "pytesmo/metrics/_fast_pairwise.pyx":484 + /* "pytesmo/metrics/_fast_pairwise.pyx":485 * # we're only interested in the ratio that's not necessary * pr_view[i, 0], pr_view[i, 1] = _pearsonr_from_moments( * M2x, M2y, C, num_obs # <<<<<<<<<<<<<< * ) * rmsd_view[i] = sqrt(msd) */ - __pyx_t_5 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearsonr_from_moments(__pyx_v_M2x, __pyx_v_M2y, __pyx_v_C, __pyx_v_num_obs, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_5 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise__pearsonr_from_moments(__pyx_v_M2x, __pyx_v_M2y, __pyx_v_C, __pyx_v_num_obs, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; @@ -39896,7 +40362,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 483, __pyx_L1_error) + __PYX_ERR(0, 484, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -39909,15 +40375,15 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_2); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_26 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); @@ -39925,7 +40391,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_2 = __pyx_t_26(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L24_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_26(__pyx_t_4), 2) < 0) __PYX_ERR(0, 483, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_26(__pyx_t_4), 2) < 0) __PYX_ERR(0, 484, __pyx_L1_error) __pyx_t_26 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L25_unpacking_done; @@ -39933,20 +40399,20 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_26 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 483, __pyx_L1_error) + __PYX_ERR(0, 484, __pyx_L1_error) __pyx_L25_unpacking_done:; } - /* "pytesmo/metrics/_fast_pairwise.pyx":483 + /* "pytesmo/metrics/_fast_pairwise.pyx":484 * # to get var and cov we would need to divide by n, but since * # we're only interested in the ratio that's not necessary * pr_view[i, 0], pr_view[i, 1] = _pearsonr_from_moments( # <<<<<<<<<<<<<< * M2x, M2y, C, num_obs * ) */ - __pyx_t_27 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_27 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_27 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_27 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_28 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_28 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_28 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_28 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_21 = __pyx_v_i; __pyx_t_22 = 0; @@ -39955,7 +40421,7 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_t_21 = 1; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_pr_view.data + __pyx_t_22 * __pyx_v_pr_view.strides[0]) ) + __pyx_t_21 * __pyx_v_pr_view.strides[1]) )) = __pyx_t_28; - /* "pytesmo/metrics/_fast_pairwise.pyx":486 + /* "pytesmo/metrics/_fast_pairwise.pyx":487 * M2x, M2y, C, num_obs * ) * rmsd_view[i] = sqrt(msd) # <<<<<<<<<<<<<< @@ -39968,25 +40434,25 @@ static PyObject *__pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_ __pyx_L21:; } - /* "pytesmo/metrics/_fast_pairwise.pyx":488 + /* "pytesmo/metrics/_fast_pairwise.pyx":489 * rmsd_view[i] = sqrt(msd) * * return pr_arr, rmsd_arr # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 488, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF((PyObject *)__pyx_v_pr_arr); __Pyx_GIVEREF((PyObject *)__pyx_v_pr_arr); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_pr_arr))) __PYX_ERR(0, 488, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_pr_arr))) __PYX_ERR(0, 489, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v_rmsd_arr); __Pyx_GIVEREF((PyObject *)__pyx_v_rmsd_arr); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_rmsd_arr))) __PYX_ERR(0, 488, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_rmsd_arr))) __PYX_ERR(0, 489, __pyx_L1_error); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "pytesmo/metrics/_fast_pairwise.pyx":346 + /* "pytesmo/metrics/_fast_pairwise.pyx":347 * # old: 76.7 ms 1.62 ms per loop (mean std. dev. of 7 runs, 10 loops each) * # new: 117 s 836 ns per loop (mean std. dev. of 7 runs, 10000 loops each) * cpdef rolling_pr_rmsd(double [:] timestamps, # <<<<<<<<<<<<<< @@ -40078,7 +40544,7 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_101__pyx_fuse_1roll (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -40086,9 +40552,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_101__pyx_fuse_1roll (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1rolling_pr_rmsd", 1, 6, 6, 1); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1rolling_pr_rmsd", 1, 6, 6, 1); __PYX_ERR(0, 347, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -40096,9 +40562,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_101__pyx_fuse_1roll (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1rolling_pr_rmsd", 1, 6, 6, 2); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1rolling_pr_rmsd", 1, 6, 6, 2); __PYX_ERR(0, 347, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -40106,9 +40572,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_101__pyx_fuse_1roll (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1rolling_pr_rmsd", 1, 6, 6, 3); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1rolling_pr_rmsd", 1, 6, 6, 3); __PYX_ERR(0, 347, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -40116,9 +40582,9 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_101__pyx_fuse_1roll (void)__Pyx_Arg_NewRef_VARARGS(values[4]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1rolling_pr_rmsd", 1, 6, 6, 4); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1rolling_pr_rmsd", 1, 6, 6, 4); __PYX_ERR(0, 347, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: @@ -40126,14 +40592,14 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_101__pyx_fuse_1roll (void)__Pyx_Arg_NewRef_VARARGS(values[5]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1rolling_pr_rmsd", 1, 6, 6, 5); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1rolling_pr_rmsd", 1, 6, 6, 5); __PYX_ERR(0, 347, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1rolling_pr_rmsd") < 0)) __PYX_ERR(0, 346, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1rolling_pr_rmsd") < 0)) __PYX_ERR(0, 347, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 6)) { goto __pyx_L5_argtuple_error; @@ -40145,16 +40611,16 @@ static PyObject *__pyx_pw_7pytesmo_7metrics_14_fast_pairwise_101__pyx_fuse_1roll values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4); values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5); } - __pyx_v_timestamps = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_timestamps.memview)) __PYX_ERR(0, 346, __pyx_L3_error) - __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 347, __pyx_L3_error) - __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 348, __pyx_L3_error) - __pyx_v_window_size = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_window_size == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 349, __pyx_L3_error) - __pyx_v_center = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_center == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 350, __pyx_L3_error) - __pyx_v_min_periods = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_min_periods == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 351, __pyx_L3_error) + __pyx_v_timestamps = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_timestamps.memview)) __PYX_ERR(0, 347, __pyx_L3_error) + __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 348, __pyx_L3_error) + __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 349, __pyx_L3_error) + __pyx_v_window_size = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_window_size == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 350, __pyx_L3_error) + __pyx_v_center = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_center == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 351, __pyx_L3_error) + __pyx_v_min_periods = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_min_periods == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 352, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1rolling_pr_rmsd", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1rolling_pr_rmsd", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 347, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -40196,10 +40662,10 @@ static PyObject *__pyx_pf_7pytesmo_7metrics_14_fast_pairwise_100__pyx_fuse_1roll int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_fuse_1rolling_pr_rmsd", 1); __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_timestamps.memview)) { __Pyx_RaiseUnboundLocalError("timestamps"); __PYX_ERR(0, 346, __pyx_L1_error) } - if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 346, __pyx_L1_error) } - if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 346, __pyx_L1_error) } - __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_pr_rmsd(__pyx_v_timestamps, __pyx_v_x, __pyx_v_y, __pyx_v_window_size, __pyx_v_center, __pyx_v_min_periods, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely(!__pyx_v_timestamps.memview)) { __Pyx_RaiseUnboundLocalError("timestamps"); __PYX_ERR(0, 347, __pyx_L1_error) } + if (unlikely(!__pyx_v_x.memview)) { __Pyx_RaiseUnboundLocalError("x"); __PYX_ERR(0, 347, __pyx_L1_error) } + if (unlikely(!__pyx_v_y.memview)) { __Pyx_RaiseUnboundLocalError("y"); __PYX_ERR(0, 347, __pyx_L1_error) } + __pyx_t_1 = __pyx_fuse_1__pyx_f_7pytesmo_7metrics_14_fast_pairwise_rolling_pr_rmsd(__pyx_v_timestamps, __pyx_v_x, __pyx_v_y, __pyx_v_window_size, __pyx_v_center, __pyx_v_min_periods, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -40473,6 +40939,9 @@ static PyTypeObject __pyx_type___pyx_array = { #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif @@ -40643,6 +41112,9 @@ static PyTypeObject __pyx_type___pyx_MemviewEnum = { #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif @@ -40986,6 +41458,9 @@ static PyTypeObject __pyx_type___pyx_memoryview = { #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif @@ -41156,6 +41631,9 @@ static PyTypeObject __pyx_type___pyx_memoryviewslice = { #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif @@ -41299,8 +41777,8 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, - {&__pyx_kp_u_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 1, 0, 0}, - {&__pyx_kp_u_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 1, 0, 0}, + {&__pyx_kp_u_numpy__core_multiarray_failed_to, __pyx_k_numpy__core_multiarray_failed_to, sizeof(__pyx_k_numpy__core_multiarray_failed_to), 0, 1, 0, 0}, + {&__pyx_kp_u_numpy__core_umath_failed_to_impo, __pyx_k_numpy__core_umath_failed_to_impo, sizeof(__pyx_k_numpy__core_umath_failed_to_impo), 0, 1, 0, 0}, {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1}, {&__pyx_n_s_pearsonr_from_moments, __pyx_k_pearsonr_from_moments, sizeof(__pyx_k_pearsonr_from_moments), 0, 0, 1, 1}, @@ -41387,9 +41865,9 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { } /* #### Code section: cached_builtins ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 11, __pyx_L1_error) - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 11, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 34, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 12, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 12, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 35, __pyx_L1_error) __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_n_s_import); if (!__pyx_builtin___import__) __PYX_ERR(1, 100, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 156, __pyx_L1_error) __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 159, __pyx_L1_error) @@ -41397,7 +41875,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 408, __pyx_L1_error) __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 618, __pyx_L1_error) __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 914, __pyx_L1_error) - __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 984, __pyx_L1_error) + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1025, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -41444,39 +41922,39 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":984 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025 * __pyx_import_array() * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< + * raise ImportError("numpy._core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ - __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 984, __pyx_L1_error) + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_numpy__core_multiarray_failed_to); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":990 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031 * _import_umath() * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ - __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 990, __pyx_L1_error) + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_numpy__core_umath_failed_to_impo); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 1031, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); - /* "pytesmo/metrics/_fast_pairwise.pyx":11 + /* "pytesmo/metrics/_fast_pairwise.pyx":12 * * * cpdef _moments_welford(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< * """ * Calculates means, variances, and covariance of the given input array using */ - __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_No_matching_signature_found); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_No_matching_signature_found); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); - __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_Function_call_with_ambiguous_arg); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_Function_call_with_ambiguous_arg); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); @@ -41581,160 +42059,160 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GIVEREF(__pyx_tuple__24); __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(1, 1, __pyx_L1_error) - /* "pytesmo/metrics/_fast_pairwise.pyx":11 + /* "pytesmo/metrics/_fast_pairwise.pyx":12 * * * cpdef _moments_welford(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< * """ * Calculates means, variances, and covariance of the given input array using */ - __pyx_tuple__26 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_y); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_tuple__26 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_y); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); - __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_moments_welford, 11, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 11, __pyx_L1_error) - __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_moments_welford, 11, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 11, __pyx_L1_error) - __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1_moments_welford, 11, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_moments_welford, 12, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 12, __pyx_L1_error) + __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_moments_welford, 12, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 12, __pyx_L1_error) + __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1_moments_welford, 12, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 12, __pyx_L1_error) - /* "pytesmo/metrics/_fast_pairwise.pyx":48 + /* "pytesmo/metrics/_fast_pairwise.pyx":49 * * * cpdef bias(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< * """ * Difference of the mean values. */ - __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0bias, 48, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 48, __pyx_L1_error) - __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0bias, 48, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 48, __pyx_L1_error) - __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1bias, 48, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0bias, 49, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 49, __pyx_L1_error) + __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0bias, 49, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 49, __pyx_L1_error) + __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1bias, 49, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 49, __pyx_L1_error) - /* "pytesmo/metrics/_fast_pairwise.pyx":73 + /* "pytesmo/metrics/_fast_pairwise.pyx":74 * * * cpdef RSS(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< * """ * Residual sum of squares. */ - __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0RSS, 73, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 73, __pyx_L1_error) - __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0RSS, 73, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 73, __pyx_L1_error) - __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1RSS, 73, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0RSS, 74, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0RSS, 74, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1RSS, 74, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 74, __pyx_L1_error) - /* "pytesmo/metrics/_fast_pairwise.pyx":97 + /* "pytesmo/metrics/_fast_pairwise.pyx":98 * * * cpdef mse_corr(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< * r""" * Correlation component of MSE. */ - __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0mse_corr, 97, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 97, __pyx_L1_error) - __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0mse_corr, 97, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 97, __pyx_L1_error) - __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1mse_corr, 97, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0mse_corr, 98, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0mse_corr, 98, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1mse_corr, 98, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 98, __pyx_L1_error) - /* "pytesmo/metrics/_fast_pairwise.pyx":132 + /* "pytesmo/metrics/_fast_pairwise.pyx":133 * * * cpdef _mse_corr_from_moments( # <<<<<<<<<<<<<< * floating mx, floating my, floating vx, floating vy, floating cov * ): */ - __pyx_tuple__39 = PyTuple_Pack(5, __pyx_n_s_mx, __pyx_n_s_my, __pyx_n_s_vx, __pyx_n_s_vy, __pyx_n_s_cov); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_tuple__39 = PyTuple_Pack(5, __pyx_n_s_mx, __pyx_n_s_my, __pyx_n_s_vx, __pyx_n_s_vy, __pyx_n_s_cov); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__39); __Pyx_GIVEREF(__pyx_tuple__39); - __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_mse_corr_from_momen, 132, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 132, __pyx_L1_error) - __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_mse_corr_from_momen, 132, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 132, __pyx_L1_error) - __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1_mse_corr_from_momen, 132, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_mse_corr_from_momen, 133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_mse_corr_from_momen, 133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1_mse_corr_from_momen, 133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 133, __pyx_L1_error) - /* "pytesmo/metrics/_fast_pairwise.pyx":139 + /* "pytesmo/metrics/_fast_pairwise.pyx":140 * * * cpdef mse_var(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< * r""" * Variance component of MSE. */ - __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0mse_var, 139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 139, __pyx_L1_error) - __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0mse_var, 139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 139, __pyx_L1_error) - __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1mse_var, 139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0mse_var, 140, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0mse_var, 140, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1mse_var, 140, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 140, __pyx_L1_error) - /* "pytesmo/metrics/_fast_pairwise.pyx":174 + /* "pytesmo/metrics/_fast_pairwise.pyx":175 * * * cpdef _mse_var_from_moments( # <<<<<<<<<<<<<< * floating mx, floating my, floating vx, floating vy, floating cov * ): */ - __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_mse_var_from_moment, 174, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 174, __pyx_L1_error) - __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_mse_var_from_moment, 174, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 174, __pyx_L1_error) - __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1_mse_var_from_moment, 174, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_mse_var_from_moment, 175, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_mse_var_from_moment, 175, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1_mse_var_from_moment, 175, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 175, __pyx_L1_error) - /* "pytesmo/metrics/_fast_pairwise.pyx":180 + /* "pytesmo/metrics/_fast_pairwise.pyx":181 * * * cpdef mse_bias(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< * r""" * Bias component of MSE. */ - __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0mse_bias, 180, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 180, __pyx_L1_error) - __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0mse_bias, 180, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 180, __pyx_L1_error) - __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1mse_bias, 180, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0mse_bias, 181, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0mse_bias, 181, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1mse_bias, 181, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 181, __pyx_L1_error) - /* "pytesmo/metrics/_fast_pairwise.pyx":212 + /* "pytesmo/metrics/_fast_pairwise.pyx":213 * * * cpdef _mse_bias_from_moments( # <<<<<<<<<<<<<< * floating mx, floating my, floating vx, floating vy, floating cov * ): */ - __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_mse_bias_from_momen, 212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 212, __pyx_L1_error) - __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_mse_bias_from_momen, 212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 212, __pyx_L1_error) - __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1_mse_bias_from_momen, 212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_mse_bias_from_momen, 213, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_mse_bias_from_momen, 213, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1_mse_bias_from_momen, 213, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 213, __pyx_L1_error) - /* "pytesmo/metrics/_fast_pairwise.pyx":224 + /* "pytesmo/metrics/_fast_pairwise.pyx":225 * # 48.3 s 8.69 s per loop (mean std. dev. of 7 runs, 10000 loops each) * # -> 32 times faster! * cpdef mse_decomposition(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< * r""" * Mean square deviation/mean square error. */ - __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0mse_decomposition, 224, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 224, __pyx_L1_error) - __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0mse_decomposition, 224, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 224, __pyx_L1_error) - __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1mse_decomposition, 224, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0mse_decomposition, 225, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0mse_decomposition, 225, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1mse_decomposition, 225, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 225, __pyx_L1_error) - /* "pytesmo/metrics/_fast_pairwise.pyx":276 + /* "pytesmo/metrics/_fast_pairwise.pyx":277 * * * cpdef _ubrmsd(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< * r""" * Unbiased root-mean-square deviation (uRMSD). */ - __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_ubrmsd, 276, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 276, __pyx_L1_error) - __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_ubrmsd, 276, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 276, __pyx_L1_error) - __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1_ubrmsd, 276, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_ubrmsd, 277, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_ubrmsd, 277, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1_ubrmsd, 277, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 277, __pyx_L1_error) - /* "pytesmo/metrics/_fast_pairwise.pyx":322 + /* "pytesmo/metrics/_fast_pairwise.pyx":323 * * * cpdef _pearsonr_from_moments(floating varx, floating vary, floating cov, int n): # <<<<<<<<<<<<<< * cdef floating R, p_R, t_squared, df, z * */ - __pyx_tuple__61 = PyTuple_Pack(4, __pyx_n_s_varx, __pyx_n_s_vary, __pyx_n_s_cov, __pyx_n_s_n); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_tuple__61 = PyTuple_Pack(4, __pyx_n_s_varx, __pyx_n_s_vary, __pyx_n_s_cov, __pyx_n_s_n); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__61); __Pyx_GIVEREF(__pyx_tuple__61); - __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_pearsonr_from_momen, 322, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 322, __pyx_L1_error) - __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_pearsonr_from_momen, 322, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 322, __pyx_L1_error) - __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1_pearsonr_from_momen, 322, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_pearsonr_from_momen, 323, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0_pearsonr_from_momen, 323, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1_pearsonr_from_momen, 323, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 323, __pyx_L1_error) - /* "pytesmo/metrics/_fast_pairwise.pyx":346 + /* "pytesmo/metrics/_fast_pairwise.pyx":347 * # old: 76.7 ms 1.62 ms per loop (mean std. dev. of 7 runs, 10 loops each) * # new: 117 s 836 ns per loop (mean std. dev. of 7 runs, 10000 loops each) * cpdef rolling_pr_rmsd(double [:] timestamps, # <<<<<<<<<<<<<< * floating [:] x, * floating [:] y, */ - __pyx_tuple__65 = PyTuple_Pack(6, __pyx_n_s_timestamps, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_window_size, __pyx_n_s_center, __pyx_n_s_min_periods); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_tuple__65 = PyTuple_Pack(6, __pyx_n_s_timestamps, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_window_size, __pyx_n_s_center, __pyx_n_s_min_periods); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__65); __Pyx_GIVEREF(__pyx_tuple__65); - __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0rolling_pr_rmsd, 346, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 346, __pyx_L1_error) - __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0rolling_pr_rmsd, 346, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 346, __pyx_L1_error) - __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1rolling_pr_rmsd, 346, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0rolling_pr_rmsd, 347, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 347, __pyx_L1_error) + __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_0rolling_pr_rmsd, 347, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 347, __pyx_L1_error) + __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_metrics__fast_pairwi, __pyx_n_s_pyx_fuse_1rolling_pr_rmsd, 347, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -41771,25 +42249,6 @@ static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { /* AssertionsEnabled.init */ if (likely(__Pyx_init_assertions_enabled() == 0)); else -if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) - - /* NumpyImportArray.init */ - /* - * Cython has automatically inserted a call to _import_array since - * you didn't include one when you cimported numpy. To disable this - * add the line - * numpy._import_array - */ -#ifdef NPY_FEATURE_VERSION -#ifndef NO_IMPORT_ARRAY -if (unlikely(_import_array() == -1)) { - PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import " - "(auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; " - "use 'numpy._import_array' to disable if you are certain you don't need it)."); -} -#endif -#endif - if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) return 0; @@ -42002,33 +42461,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(2, 202, __pyx_L1_error) + __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 202, __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(2, 225, __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(2, 229, __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(2, 238, __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(2, 809, __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(2, 811, __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(2, 813, __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(2, 815, __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(2, 817, __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(2, 819, __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(2, 821, __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(2, 823, __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(2, 825, __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(2, 827, __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(2, 866, __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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 929, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; @@ -42223,6 +42682,7 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__fast_pairwise(PyObject *__pyx_pyi int __pyx_t_6; PyObject *__pyx_t_7 = NULL; static PyThread_type_lock __pyx_t_8[8]; + int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -42855,65 +43315,74 @@ if (!__Pyx_RefNanny) { * # cython: boundscheck=False, wraparound=False, cdivision=True, nonecheck=False * import numpy as np # <<<<<<<<<<<<<< * cimport numpy as cnp - * from numpy.math cimport NAN + * cnp.import_array() */ __pyx_t_7 = __Pyx_ImportDottedModule(__pyx_n_s_numpy, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_7) < 0) __PYX_ERR(0, 2, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":8 + /* "pytesmo/metrics/_fast_pairwise.pyx":4 + * import numpy as np + * cimport numpy as cnp + * cnp.import_array() # <<<<<<<<<<<<<< + * from numpy.math cimport NAN + * cimport cython + */ + __pyx_t_9 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 4, __pyx_L1_error) + + /* "pytesmo/metrics/_fast_pairwise.pyx":9 * from cython cimport floating * from libc.math cimport sqrt, fabs * from scipy.special.cython_special import betainc # <<<<<<<<<<<<<< * * */ - __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 8, __pyx_L1_error) + __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_n_s_betainc); __Pyx_GIVEREF(__pyx_n_s_betainc); - if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_betainc)) __PYX_ERR(0, 8, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_scipy_special_cython_special, __pyx_t_7, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_betainc)) __PYX_ERR(0, 9, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_scipy_special_cython_special, __pyx_t_7, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_betainc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 8, __pyx_L1_error) + __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_betainc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_betainc, __pyx_t_7) < 0) __PYX_ERR(0, 8, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_betainc, __pyx_t_7) < 0) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":11 + /* "pytesmo/metrics/_fast_pairwise.pyx":12 * * * cpdef _moments_welford(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< * """ * Calculates means, variances, and covariance of the given input array using */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_27__pyx_fuse_0_moments_welford, 0, __pyx_n_s_pyx_fuse_0_moments_welford, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_27__pyx_fuse_0_moments_welford, 0, __pyx_n_s_pyx_fuse_0_moments_welford, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_moments_welford, __pyx_t_4) < 0) __PYX_ERR(0, 11, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_moments_welford, __pyx_t_4) < 0) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_29__pyx_fuse_1_moments_welford, 0, __pyx_n_s_pyx_fuse_1_moments_welford, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_29__pyx_fuse_1_moments_welford, 0, __pyx_n_s_pyx_fuse_1_moments_welford, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_moments_welford, __pyx_t_4) < 0) __PYX_ERR(0, 11, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_moments_welford, __pyx_t_4) < 0) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_27__pyx_fuse_0_moments_welford, 0, __pyx_n_s_pyx_fuse_0_moments_welford, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_27__pyx_fuse_0_moments_welford, 0, __pyx_n_s_pyx_fuse_0_moments_welford, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 11, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_29__pyx_fuse_1_moments_welford, 0, __pyx_n_s_pyx_fuse_1_moments_welford, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_29__pyx_fuse_1_moments_welford, 0, __pyx_n_s_pyx_fuse_1_moments_welford, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_7) < 0) __PYX_ERR(0, 11, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_7) < 0) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_1_moments_welford, 0, __pyx_n_s_moments_welford, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_1_moments_welford, 0, __pyx_n_s_moments_welford, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 11, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 12, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_7)->__pyx_arg__fused_sigindex = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); @@ -42922,40 +43391,40 @@ if (!__Pyx_RefNanny) { ((__pyx_FusedFunctionObject *) __pyx_t_7)->__signatures__ = __pyx_t_4; __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_moments_welford, __pyx_t_7) < 0) __PYX_ERR(0, 11, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_moments_welford, __pyx_t_7) < 0) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":48 + /* "pytesmo/metrics/_fast_pairwise.pyx":49 * * * cpdef bias(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< * """ * Difference of the mean values. */ - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_33__pyx_fuse_0bias, 0, __pyx_n_s_pyx_fuse_0bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_33__pyx_fuse_0bias, 0, __pyx_n_s_pyx_fuse_0bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_bias, __pyx_t_7) < 0) __PYX_ERR(0, 48, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_bias, __pyx_t_7) < 0) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_35__pyx_fuse_1bias, 0, __pyx_n_s_pyx_fuse_1bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_35__pyx_fuse_1bias, 0, __pyx_n_s_pyx_fuse_1bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_bias, __pyx_t_7) < 0) __PYX_ERR(0, 48, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_bias, __pyx_t_7) < 0) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_33__pyx_fuse_0bias, 0, __pyx_n_s_pyx_fuse_0bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_33__pyx_fuse_0bias, 0, __pyx_n_s_pyx_fuse_0bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_float, __pyx_t_4) < 0) __PYX_ERR(0, 48, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_float, __pyx_t_4) < 0) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_35__pyx_fuse_1bias, 0, __pyx_n_s_pyx_fuse_1bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_35__pyx_fuse_1bias, 0, __pyx_n_s_pyx_fuse_1bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_double, __pyx_t_4) < 0) __PYX_ERR(0, 48, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_double, __pyx_t_4) < 0) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_3bias, 0, __pyx_n_s_bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_3bias, 0, __pyx_n_s_bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults1), 1)) __PYX_ERR(0, 48, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 48, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults1), 1)) __PYX_ERR(0, 49, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_4)->__pyx_arg__fused_sigindex = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); @@ -42964,40 +43433,40 @@ if (!__Pyx_RefNanny) { ((__pyx_FusedFunctionObject *) __pyx_t_4)->__signatures__ = __pyx_t_7; __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_bias, __pyx_t_4) < 0) __PYX_ERR(0, 48, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_bias, __pyx_t_4) < 0) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":73 + /* "pytesmo/metrics/_fast_pairwise.pyx":74 * * * cpdef RSS(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< * """ * Residual sum of squares. */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_39__pyx_fuse_0RSS, 0, __pyx_n_s_pyx_fuse_0RSS, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_39__pyx_fuse_0RSS, 0, __pyx_n_s_pyx_fuse_0RSS, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_RSS, __pyx_t_4) < 0) __PYX_ERR(0, 73, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_RSS, __pyx_t_4) < 0) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_41__pyx_fuse_1RSS, 0, __pyx_n_s_pyx_fuse_1RSS, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_41__pyx_fuse_1RSS, 0, __pyx_n_s_pyx_fuse_1RSS, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_RSS, __pyx_t_4) < 0) __PYX_ERR(0, 73, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_RSS, __pyx_t_4) < 0) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_39__pyx_fuse_0RSS, 0, __pyx_n_s_pyx_fuse_0RSS, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_39__pyx_fuse_0RSS, 0, __pyx_n_s_pyx_fuse_0RSS, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 73, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_41__pyx_fuse_1RSS, 0, __pyx_n_s_pyx_fuse_1RSS, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_41__pyx_fuse_1RSS, 0, __pyx_n_s_pyx_fuse_1RSS, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_7) < 0) __PYX_ERR(0, 73, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_7) < 0) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_5RSS, 0, __pyx_n_s_RSS, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_5RSS, 0, __pyx_n_s_RSS, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults2), 1)) __PYX_ERR(0, 73, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 73, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults2), 1)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_t_7)->__pyx_arg__fused_sigindex = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); @@ -43006,40 +43475,40 @@ if (!__Pyx_RefNanny) { ((__pyx_FusedFunctionObject *) __pyx_t_7)->__signatures__ = __pyx_t_4; __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_RSS, __pyx_t_7) < 0) __PYX_ERR(0, 73, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_RSS, __pyx_t_7) < 0) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":97 + /* "pytesmo/metrics/_fast_pairwise.pyx":98 * * * cpdef mse_corr(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< * r""" * Correlation component of MSE. */ - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_45__pyx_fuse_0mse_corr, 0, __pyx_n_s_pyx_fuse_0mse_corr, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_45__pyx_fuse_0mse_corr, 0, __pyx_n_s_pyx_fuse_0mse_corr, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_corr, __pyx_t_7) < 0) __PYX_ERR(0, 97, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_corr, __pyx_t_7) < 0) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_47__pyx_fuse_1mse_corr, 0, __pyx_n_s_pyx_fuse_1mse_corr, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_47__pyx_fuse_1mse_corr, 0, __pyx_n_s_pyx_fuse_1mse_corr, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_corr, __pyx_t_7) < 0) __PYX_ERR(0, 97, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_corr, __pyx_t_7) < 0) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_45__pyx_fuse_0mse_corr, 0, __pyx_n_s_pyx_fuse_0mse_corr, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_45__pyx_fuse_0mse_corr, 0, __pyx_n_s_pyx_fuse_0mse_corr, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_float, __pyx_t_4) < 0) __PYX_ERR(0, 97, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_float, __pyx_t_4) < 0) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_47__pyx_fuse_1mse_corr, 0, __pyx_n_s_pyx_fuse_1mse_corr, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_47__pyx_fuse_1mse_corr, 0, __pyx_n_s_pyx_fuse_1mse_corr, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_double, __pyx_t_4) < 0) __PYX_ERR(0, 97, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_double, __pyx_t_4) < 0) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_7mse_corr, 0, __pyx_n_s_mse_corr, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_7mse_corr, 0, __pyx_n_s_mse_corr, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults3), 1)) __PYX_ERR(0, 97, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 97, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults3), 1)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_t_4)->__pyx_arg__fused_sigindex = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); @@ -43048,40 +43517,40 @@ if (!__Pyx_RefNanny) { ((__pyx_FusedFunctionObject *) __pyx_t_4)->__signatures__ = __pyx_t_7; __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_corr, __pyx_t_4) < 0) __PYX_ERR(0, 97, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_corr, __pyx_t_4) < 0) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":132 + /* "pytesmo/metrics/_fast_pairwise.pyx":133 * * * cpdef _mse_corr_from_moments( # <<<<<<<<<<<<<< * floating mx, floating my, floating vx, floating vy, floating cov * ): */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_51__pyx_fuse_0_mse_corr_from_moments, 0, __pyx_n_s_pyx_fuse_0_mse_corr_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_51__pyx_fuse_0_mse_corr_from_moments, 0, __pyx_n_s_pyx_fuse_0_mse_corr_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_corr_from_moments, __pyx_t_4) < 0) __PYX_ERR(0, 132, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_corr_from_moments, __pyx_t_4) < 0) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_53__pyx_fuse_1_mse_corr_from_moments, 0, __pyx_n_s_pyx_fuse_1_mse_corr_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_53__pyx_fuse_1_mse_corr_from_moments, 0, __pyx_n_s_pyx_fuse_1_mse_corr_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_corr_from_moments, __pyx_t_4) < 0) __PYX_ERR(0, 132, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_corr_from_moments, __pyx_t_4) < 0) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_51__pyx_fuse_0_mse_corr_from_moments, 0, __pyx_n_s_pyx_fuse_0_mse_corr_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_51__pyx_fuse_0_mse_corr_from_moments, 0, __pyx_n_s_pyx_fuse_0_mse_corr_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 132, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_53__pyx_fuse_1_mse_corr_from_moments, 0, __pyx_n_s_pyx_fuse_1_mse_corr_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_53__pyx_fuse_1_mse_corr_from_moments, 0, __pyx_n_s_pyx_fuse_1_mse_corr_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_7) < 0) __PYX_ERR(0, 132, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_7) < 0) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_9_mse_corr_from_moments, 0, __pyx_n_s_mse_corr_from_moments, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_9_mse_corr_from_moments, 0, __pyx_n_s_mse_corr_from_moments, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults4), 1)) __PYX_ERR(0, 132, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 132, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults4), 1)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_t_7)->__pyx_arg__fused_sigindex = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); @@ -43090,40 +43559,40 @@ if (!__Pyx_RefNanny) { ((__pyx_FusedFunctionObject *) __pyx_t_7)->__signatures__ = __pyx_t_4; __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_corr_from_moments, __pyx_t_7) < 0) __PYX_ERR(0, 132, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_corr_from_moments, __pyx_t_7) < 0) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":139 + /* "pytesmo/metrics/_fast_pairwise.pyx":140 * * * cpdef mse_var(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< * r""" * Variance component of MSE. */ - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_57__pyx_fuse_0mse_var, 0, __pyx_n_s_pyx_fuse_0mse_var, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_57__pyx_fuse_0mse_var, 0, __pyx_n_s_pyx_fuse_0mse_var, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_var, __pyx_t_7) < 0) __PYX_ERR(0, 139, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_var, __pyx_t_7) < 0) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_59__pyx_fuse_1mse_var, 0, __pyx_n_s_pyx_fuse_1mse_var, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_59__pyx_fuse_1mse_var, 0, __pyx_n_s_pyx_fuse_1mse_var, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_var, __pyx_t_7) < 0) __PYX_ERR(0, 139, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_var, __pyx_t_7) < 0) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_57__pyx_fuse_0mse_var, 0, __pyx_n_s_pyx_fuse_0mse_var, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_57__pyx_fuse_0mse_var, 0, __pyx_n_s_pyx_fuse_0mse_var, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_float, __pyx_t_4) < 0) __PYX_ERR(0, 139, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_float, __pyx_t_4) < 0) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_59__pyx_fuse_1mse_var, 0, __pyx_n_s_pyx_fuse_1mse_var, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_59__pyx_fuse_1mse_var, 0, __pyx_n_s_pyx_fuse_1mse_var, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_double, __pyx_t_4) < 0) __PYX_ERR(0, 139, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_double, __pyx_t_4) < 0) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_11mse_var, 0, __pyx_n_s_mse_var, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_11mse_var, 0, __pyx_n_s_mse_var, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults5), 1)) __PYX_ERR(0, 139, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults5), 1)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_t_4)->__pyx_arg__fused_sigindex = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); @@ -43132,40 +43601,40 @@ if (!__Pyx_RefNanny) { ((__pyx_FusedFunctionObject *) __pyx_t_4)->__signatures__ = __pyx_t_7; __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_var, __pyx_t_4) < 0) __PYX_ERR(0, 139, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_var, __pyx_t_4) < 0) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":174 + /* "pytesmo/metrics/_fast_pairwise.pyx":175 * * * cpdef _mse_var_from_moments( # <<<<<<<<<<<<<< * floating mx, floating my, floating vx, floating vy, floating cov * ): */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_63__pyx_fuse_0_mse_var_from_moments, 0, __pyx_n_s_pyx_fuse_0_mse_var_from_moment, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_63__pyx_fuse_0_mse_var_from_moments, 0, __pyx_n_s_pyx_fuse_0_mse_var_from_moment, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_var_from_moments, __pyx_t_4) < 0) __PYX_ERR(0, 174, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_var_from_moments, __pyx_t_4) < 0) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_65__pyx_fuse_1_mse_var_from_moments, 0, __pyx_n_s_pyx_fuse_1_mse_var_from_moment, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_65__pyx_fuse_1_mse_var_from_moments, 0, __pyx_n_s_pyx_fuse_1_mse_var_from_moment, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_var_from_moments, __pyx_t_4) < 0) __PYX_ERR(0, 174, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_var_from_moments, __pyx_t_4) < 0) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_63__pyx_fuse_0_mse_var_from_moments, 0, __pyx_n_s_pyx_fuse_0_mse_var_from_moment, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_63__pyx_fuse_0_mse_var_from_moments, 0, __pyx_n_s_pyx_fuse_0_mse_var_from_moment, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 174, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_65__pyx_fuse_1_mse_var_from_moments, 0, __pyx_n_s_pyx_fuse_1_mse_var_from_moment, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_65__pyx_fuse_1_mse_var_from_moments, 0, __pyx_n_s_pyx_fuse_1_mse_var_from_moment, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_7) < 0) __PYX_ERR(0, 174, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_7) < 0) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_13_mse_var_from_moments, 0, __pyx_n_s_mse_var_from_moments, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_13_mse_var_from_moments, 0, __pyx_n_s_mse_var_from_moments, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults6), 1)) __PYX_ERR(0, 174, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 174, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults6), 1)) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_Defaults(__pyx_defaults6, __pyx_t_7)->__pyx_arg__fused_sigindex = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); @@ -43174,40 +43643,40 @@ if (!__Pyx_RefNanny) { ((__pyx_FusedFunctionObject *) __pyx_t_7)->__signatures__ = __pyx_t_4; __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_var_from_moments, __pyx_t_7) < 0) __PYX_ERR(0, 174, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_var_from_moments, __pyx_t_7) < 0) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":180 + /* "pytesmo/metrics/_fast_pairwise.pyx":181 * * * cpdef mse_bias(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< * r""" * Bias component of MSE. */ - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_69__pyx_fuse_0mse_bias, 0, __pyx_n_s_pyx_fuse_0mse_bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_69__pyx_fuse_0mse_bias, 0, __pyx_n_s_pyx_fuse_0mse_bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_bias, __pyx_t_7) < 0) __PYX_ERR(0, 180, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_bias, __pyx_t_7) < 0) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_71__pyx_fuse_1mse_bias, 0, __pyx_n_s_pyx_fuse_1mse_bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_71__pyx_fuse_1mse_bias, 0, __pyx_n_s_pyx_fuse_1mse_bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_bias, __pyx_t_7) < 0) __PYX_ERR(0, 180, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_bias, __pyx_t_7) < 0) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_69__pyx_fuse_0mse_bias, 0, __pyx_n_s_pyx_fuse_0mse_bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_69__pyx_fuse_0mse_bias, 0, __pyx_n_s_pyx_fuse_0mse_bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_float, __pyx_t_4) < 0) __PYX_ERR(0, 180, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_float, __pyx_t_4) < 0) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_71__pyx_fuse_1mse_bias, 0, __pyx_n_s_pyx_fuse_1mse_bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_71__pyx_fuse_1mse_bias, 0, __pyx_n_s_pyx_fuse_1mse_bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_double, __pyx_t_4) < 0) __PYX_ERR(0, 180, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_double, __pyx_t_4) < 0) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_15mse_bias, 0, __pyx_n_s_mse_bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_15mse_bias, 0, __pyx_n_s_mse_bias, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults7), 1)) __PYX_ERR(0, 180, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 180, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults7), 1)) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_Defaults(__pyx_defaults7, __pyx_t_4)->__pyx_arg__fused_sigindex = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); @@ -43216,40 +43685,40 @@ if (!__Pyx_RefNanny) { ((__pyx_FusedFunctionObject *) __pyx_t_4)->__signatures__ = __pyx_t_7; __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_bias, __pyx_t_4) < 0) __PYX_ERR(0, 180, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_bias, __pyx_t_4) < 0) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":212 + /* "pytesmo/metrics/_fast_pairwise.pyx":213 * * * cpdef _mse_bias_from_moments( # <<<<<<<<<<<<<< * floating mx, floating my, floating vx, floating vy, floating cov * ): */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_75__pyx_fuse_0_mse_bias_from_moments, 0, __pyx_n_s_pyx_fuse_0_mse_bias_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_75__pyx_fuse_0_mse_bias_from_moments, 0, __pyx_n_s_pyx_fuse_0_mse_bias_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_bias_from_moments, __pyx_t_4) < 0) __PYX_ERR(0, 212, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_bias_from_moments, __pyx_t_4) < 0) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_77__pyx_fuse_1_mse_bias_from_moments, 0, __pyx_n_s_pyx_fuse_1_mse_bias_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_77__pyx_fuse_1_mse_bias_from_moments, 0, __pyx_n_s_pyx_fuse_1_mse_bias_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_bias_from_moments, __pyx_t_4) < 0) __PYX_ERR(0, 212, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_bias_from_moments, __pyx_t_4) < 0) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_75__pyx_fuse_0_mse_bias_from_moments, 0, __pyx_n_s_pyx_fuse_0_mse_bias_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_75__pyx_fuse_0_mse_bias_from_moments, 0, __pyx_n_s_pyx_fuse_0_mse_bias_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 212, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_77__pyx_fuse_1_mse_bias_from_moments, 0, __pyx_n_s_pyx_fuse_1_mse_bias_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_77__pyx_fuse_1_mse_bias_from_moments, 0, __pyx_n_s_pyx_fuse_1_mse_bias_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_7) < 0) __PYX_ERR(0, 212, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_7) < 0) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_17_mse_bias_from_moments, 0, __pyx_n_s_mse_bias_from_moments, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_17_mse_bias_from_moments, 0, __pyx_n_s_mse_bias_from_moments, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults8), 1)) __PYX_ERR(0, 212, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 212, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults8), 1)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_t_7)->__pyx_arg__fused_sigindex = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); @@ -43258,40 +43727,40 @@ if (!__Pyx_RefNanny) { ((__pyx_FusedFunctionObject *) __pyx_t_7)->__signatures__ = __pyx_t_4; __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_bias_from_moments, __pyx_t_7) < 0) __PYX_ERR(0, 212, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_bias_from_moments, __pyx_t_7) < 0) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":224 + /* "pytesmo/metrics/_fast_pairwise.pyx":225 * # 48.3 s 8.69 s per loop (mean std. dev. of 7 runs, 10000 loops each) * # -> 32 times faster! * cpdef mse_decomposition(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< * r""" * Mean square deviation/mean square error. */ - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_81__pyx_fuse_0mse_decomposition, 0, __pyx_n_s_pyx_fuse_0mse_decomposition, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_81__pyx_fuse_0mse_decomposition, 0, __pyx_n_s_pyx_fuse_0mse_decomposition, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_decomposition, __pyx_t_7) < 0) __PYX_ERR(0, 224, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_decomposition, __pyx_t_7) < 0) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_83__pyx_fuse_1mse_decomposition, 0, __pyx_n_s_pyx_fuse_1mse_decomposition, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_83__pyx_fuse_1mse_decomposition, 0, __pyx_n_s_pyx_fuse_1mse_decomposition, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_decomposition, __pyx_t_7) < 0) __PYX_ERR(0, 224, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_decomposition, __pyx_t_7) < 0) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_81__pyx_fuse_0mse_decomposition, 0, __pyx_n_s_pyx_fuse_0mse_decomposition, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_81__pyx_fuse_0mse_decomposition, 0, __pyx_n_s_pyx_fuse_0mse_decomposition, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_float, __pyx_t_4) < 0) __PYX_ERR(0, 224, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_float, __pyx_t_4) < 0) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_83__pyx_fuse_1mse_decomposition, 0, __pyx_n_s_pyx_fuse_1mse_decomposition, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_83__pyx_fuse_1mse_decomposition, 0, __pyx_n_s_pyx_fuse_1mse_decomposition, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_double, __pyx_t_4) < 0) __PYX_ERR(0, 224, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_double, __pyx_t_4) < 0) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_19mse_decomposition, 0, __pyx_n_s_mse_decomposition, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_19mse_decomposition, 0, __pyx_n_s_mse_decomposition, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults9), 1)) __PYX_ERR(0, 224, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 224, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults9), 1)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_Defaults(__pyx_defaults9, __pyx_t_4)->__pyx_arg__fused_sigindex = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); @@ -43300,40 +43769,40 @@ if (!__Pyx_RefNanny) { ((__pyx_FusedFunctionObject *) __pyx_t_4)->__signatures__ = __pyx_t_7; __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_decomposition, __pyx_t_4) < 0) __PYX_ERR(0, 224, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mse_decomposition, __pyx_t_4) < 0) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":276 + /* "pytesmo/metrics/_fast_pairwise.pyx":277 * * * cpdef _ubrmsd(floating [:] x, floating [:] y): # <<<<<<<<<<<<<< * r""" * Unbiased root-mean-square deviation (uRMSD). */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_87__pyx_fuse_0_ubrmsd, 0, __pyx_n_s_pyx_fuse_0_ubrmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_87__pyx_fuse_0_ubrmsd, 0, __pyx_n_s_pyx_fuse_0_ubrmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ubrmsd, __pyx_t_4) < 0) __PYX_ERR(0, 276, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ubrmsd, __pyx_t_4) < 0) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_89__pyx_fuse_1_ubrmsd, 0, __pyx_n_s_pyx_fuse_1_ubrmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_89__pyx_fuse_1_ubrmsd, 0, __pyx_n_s_pyx_fuse_1_ubrmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ubrmsd, __pyx_t_4) < 0) __PYX_ERR(0, 276, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ubrmsd, __pyx_t_4) < 0) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_87__pyx_fuse_0_ubrmsd, 0, __pyx_n_s_pyx_fuse_0_ubrmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_87__pyx_fuse_0_ubrmsd, 0, __pyx_n_s_pyx_fuse_0_ubrmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 276, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_89__pyx_fuse_1_ubrmsd, 0, __pyx_n_s_pyx_fuse_1_ubrmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_89__pyx_fuse_1_ubrmsd, 0, __pyx_n_s_pyx_fuse_1_ubrmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_7) < 0) __PYX_ERR(0, 276, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_7) < 0) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_21_ubrmsd, 0, __pyx_n_s_ubrmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_21_ubrmsd, 0, __pyx_n_s_ubrmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults10), 1)) __PYX_ERR(0, 276, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 276, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults10), 1)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_Defaults(__pyx_defaults10, __pyx_t_7)->__pyx_arg__fused_sigindex = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); @@ -43342,40 +43811,40 @@ if (!__Pyx_RefNanny) { ((__pyx_FusedFunctionObject *) __pyx_t_7)->__signatures__ = __pyx_t_4; __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ubrmsd, __pyx_t_7) < 0) __PYX_ERR(0, 276, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ubrmsd, __pyx_t_7) < 0) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":322 + /* "pytesmo/metrics/_fast_pairwise.pyx":323 * * * cpdef _pearsonr_from_moments(floating varx, floating vary, floating cov, int n): # <<<<<<<<<<<<<< * cdef floating R, p_R, t_squared, df, z * */ - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_93__pyx_fuse_0_pearsonr_from_moments, 0, __pyx_n_s_pyx_fuse_0_pearsonr_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_93__pyx_fuse_0_pearsonr_from_moments, 0, __pyx_n_s_pyx_fuse_0_pearsonr_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pearsonr_from_moments, __pyx_t_7) < 0) __PYX_ERR(0, 322, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pearsonr_from_moments, __pyx_t_7) < 0) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_95__pyx_fuse_1_pearsonr_from_moments, 0, __pyx_n_s_pyx_fuse_1_pearsonr_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_95__pyx_fuse_1_pearsonr_from_moments, 0, __pyx_n_s_pyx_fuse_1_pearsonr_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pearsonr_from_moments, __pyx_t_7) < 0) __PYX_ERR(0, 322, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pearsonr_from_moments, __pyx_t_7) < 0) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_93__pyx_fuse_0_pearsonr_from_moments, 0, __pyx_n_s_pyx_fuse_0_pearsonr_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_93__pyx_fuse_0_pearsonr_from_moments, 0, __pyx_n_s_pyx_fuse_0_pearsonr_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_float, __pyx_t_4) < 0) __PYX_ERR(0, 322, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_float, __pyx_t_4) < 0) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_95__pyx_fuse_1_pearsonr_from_moments, 0, __pyx_n_s_pyx_fuse_1_pearsonr_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_95__pyx_fuse_1_pearsonr_from_moments, 0, __pyx_n_s_pyx_fuse_1_pearsonr_from_momen, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_double, __pyx_t_4) < 0) __PYX_ERR(0, 322, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_double, __pyx_t_4) < 0) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_23_pearsonr_from_moments, 0, __pyx_n_s_pearsonr_from_moments, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_23_pearsonr_from_moments, 0, __pyx_n_s_pearsonr_from_moments, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults11), 1)) __PYX_ERR(0, 322, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 322, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults11), 1)) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_t_4)->__pyx_arg__fused_sigindex = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); @@ -43384,40 +43853,40 @@ if (!__Pyx_RefNanny) { ((__pyx_FusedFunctionObject *) __pyx_t_4)->__signatures__ = __pyx_t_7; __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pearsonr_from_moments, __pyx_t_4) < 0) __PYX_ERR(0, 322, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pearsonr_from_moments, __pyx_t_4) < 0) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pytesmo/metrics/_fast_pairwise.pyx":346 + /* "pytesmo/metrics/_fast_pairwise.pyx":347 * # old: 76.7 ms 1.62 ms per loop (mean std. dev. of 7 runs, 10 loops each) * # new: 117 s 836 ns per loop (mean std. dev. of 7 runs, 10000 loops each) * cpdef rolling_pr_rmsd(double [:] timestamps, # <<<<<<<<<<<<<< * floating [:] x, * floating [:] y, */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_99__pyx_fuse_0rolling_pr_rmsd, 0, __pyx_n_s_pyx_fuse_0rolling_pr_rmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_99__pyx_fuse_0rolling_pr_rmsd, 0, __pyx_n_s_pyx_fuse_0rolling_pr_rmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_rolling_pr_rmsd, __pyx_t_4) < 0) __PYX_ERR(0, 346, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_rolling_pr_rmsd, __pyx_t_4) < 0) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_101__pyx_fuse_1rolling_pr_rmsd, 0, __pyx_n_s_pyx_fuse_1rolling_pr_rmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_101__pyx_fuse_1rolling_pr_rmsd, 0, __pyx_n_s_pyx_fuse_1rolling_pr_rmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_rolling_pr_rmsd, __pyx_t_4) < 0) __PYX_ERR(0, 346, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_rolling_pr_rmsd, __pyx_t_4) < 0) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_99__pyx_fuse_0rolling_pr_rmsd, 0, __pyx_n_s_pyx_fuse_0rolling_pr_rmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_99__pyx_fuse_0rolling_pr_rmsd, 0, __pyx_n_s_pyx_fuse_0rolling_pr_rmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 346, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_101__pyx_fuse_1rolling_pr_rmsd, 0, __pyx_n_s_pyx_fuse_1rolling_pr_rmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_101__pyx_fuse_1rolling_pr_rmsd, 0, __pyx_n_s_pyx_fuse_1rolling_pr_rmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_7) < 0) __PYX_ERR(0, 346, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_7) < 0) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_25rolling_pr_rmsd, 0, __pyx_n_s_rolling_pr_rmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_7metrics_14_fast_pairwise_25rolling_pr_rmsd, 0, __pyx_n_s_rolling_pr_rmsd, NULL, __pyx_n_s_pytesmo_metrics__fast_pairwise, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults12), 1)) __PYX_ERR(0, 346, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 346, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults12), 1)) __PYX_ERR(0, 347, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_Defaults(__pyx_defaults12, __pyx_t_7)->__pyx_arg__fused_sigindex = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); @@ -43426,7 +43895,7 @@ if (!__Pyx_RefNanny) { ((__pyx_FusedFunctionObject *) __pyx_t_7)->__signatures__ = __pyx_t_4; __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_rolling_pr_rmsd, __pyx_t_7) < 0) __PYX_ERR(0, 346, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_rolling_pr_rmsd, __pyx_t_7) < 0) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pytesmo/metrics/_fast_pairwise.pyx":1 @@ -45906,7 +46375,6 @@ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { } /* HasAttr */ -#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; if (unlikely(!__Pyx_PyBaseString_Check(n))) { @@ -45923,7 +46391,6 @@ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { return 1; } } -#endif /* DictGetItem */ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY @@ -47671,10 +48138,10 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { #endif /* 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]; @@ -47728,7 +48195,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. " @@ -47736,7 +48203,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", @@ -48871,6 +49338,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 @@ -49261,6 +49731,9 @@ static PyTypeObject __pyx_FusedFunctionType_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 @@ -50425,6 +50898,160 @@ static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *o #endif #endif +/* Declarations */ + #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) { + return ::std::complex< long double >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) { + return x + y*(__pyx_t_long_double_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) { + __pyx_t_long_double_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +/* Arithmetic */ + #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) +#else + static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + __pyx_t_long_double_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + __pyx_t_long_double_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + __pyx_t_long_double_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + if (b.imag == 0) { + return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabsl(b.real) >= fabsl(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + long double r = b.imag / b.real; + long double s = (long double)(1.0) / (b.real + b.imag * r); + return __pyx_t_long_double_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + long double r = b.real / b.imag; + long double s = (long double)(1.0) / (b.imag + b.real * r); + return __pyx_t_long_double_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + if (b.imag == 0) { + return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + long double denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_long_double_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex a) { + __pyx_t_long_double_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex a) { + __pyx_t_long_double_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrtl(z.real*z.real + z.imag*z.imag); + #else + return hypotl(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + __pyx_t_long_double_complex z; + long double r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + long double denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + return __Pyx_c_prod_long__double(a, a); + case 3: + z = __Pyx_c_prod_long__double(a, a); + return __Pyx_c_prod_long__double(z, a); + case 4: + z = __Pyx_c_prod_long__double(a, a); + return __Pyx_c_prod_long__double(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if ((b.imag == 0) && (a.real >= 0)) { + z.real = powl(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2l(0.0, -1.0); + } + } else { + r = __Pyx_c_abs_long__double(a); + theta = atan2l(a.imag, a.real); + } + lnr = logl(r); + z_r = expl(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cosl(z_theta); + z.imag = z_r * sinl(z_theta); + return z; + } + #endif +#endif + /* MemviewSliceCopyTemplate */ static __Pyx_memviewslice __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, @@ -50649,245 +51276,239 @@ static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice, } 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; + } + 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; } - } 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) { + 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: @@ -50931,12 +51552,19 @@ static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice, } } { - 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"); @@ -50995,12 +51623,19 @@ static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice, } } { - 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"); @@ -51076,245 +51711,239 @@ static CYTHON_INLINE PyObject* __Pyx_ImportNumPyArrayTypeIfAvailable(void) { } 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; + } + 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; } - } 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) { + 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: @@ -51349,245 +51978,239 @@ static CYTHON_INLINE PyObject* __Pyx_ImportNumPyArrayTypeIfAvailable(void) { } return (char) val; } - } else + } #endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { + if (unlikely(!PyLong_Check(x))) { + char val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (char) -1; + val = __Pyx_PyInt_As_char(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(char, __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(char) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) { - return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); - } + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(char, __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(char) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) { + return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); } - break; - case 3: - if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) { - return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); - } + } + break; + case 3: + if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) { + return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); } - break; - case 4: - if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, 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(char) >= 4 * PyLong_SHIFT)) { - return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); - } + } + break; + case 4: + if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, 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(char) >= 4 * PyLong_SHIFT)) { + return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)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 (char) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (char) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } #endif - if ((sizeof(char) <= sizeof(unsigned long))) { - __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x)) + if ((sizeof(char) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG - } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif - } - } else { + } + } else { #if CYTHON_USE_PYLONG_INTERNALS - if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(char, __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(char) - 1 > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { - return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); - } + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(char, __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(char) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { + return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } - break; - case 2: - if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { - return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); - } + } + break; + case 2: + if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { + return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } - break; - case -3: - if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { - return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); - } + } + break; + case -3: + if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { + return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } - break; - case 3: - if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { - return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); - } + } + break; + case 3: + if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { + return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } - break; - case -4: - if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT)) { - return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); - } + } + break; + case -4: + if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT)) { + return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } - break; - case 4: - if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT)) { - return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); - } + } + break; + case 4: + if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT)) { + return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } - break; - } + } + break; } + } #endif - if ((sizeof(char) <= sizeof(long))) { - __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x)) + if ((sizeof(char) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG - } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x)) + } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif - } + } + } + { + char 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 (char) -1; + assert(PyLong_CheckExact(v)); } { - char 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 (char) -1; - } -#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(x) == 0) - return (char) 0; - is_negative = Py_SIZE(x) < 0; -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (char) -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 (char) -1; - } else { - stepval = __Pyx_NewRef(v); - } - val = (char) 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(char) * 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 |= ((char) 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(char) * 8) - bits - (is_unsigned ? 0 : 1); - if (unlikely(idigit >= (1L << remaining_bits))) - goto raise_overflow; - val |= ((char) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - unpacking_done: - #endif - if (!is_unsigned) { - if (unlikely(val & (((char) 1) << (sizeof(char) * 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 (char) -1; } - return (char) -1; + is_negative = result == 1; + } + 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 (char) -1; + } else { + stepval = v; + } + v = NULL; + val = (char) 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(char) * 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 |= ((char) 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(char) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((char) idigit) << bits; } - } else { - char val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (char) -1; - val = __Pyx_PyInt_As_char(tmp); - Py_DECREF(tmp); + if (!is_unsigned) { + if (unlikely(val & (((char) 1) << (sizeof(char) * 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 (char) -1; return val; } raise_overflow: diff --git a/src/pytesmo/metrics/_fast_pairwise.pyx b/src/pytesmo/metrics/_fast_pairwise.pyx index 60990b2..32b7a6e 100644 --- a/src/pytesmo/metrics/_fast_pairwise.pyx +++ b/src/pytesmo/metrics/_fast_pairwise.pyx @@ -1,6 +1,7 @@ # cython: boundscheck=False, wraparound=False, cdivision=True, nonecheck=False import numpy as np cimport numpy as cnp +cnp.import_array() from numpy.math cimport NAN cimport cython from cython cimport floating diff --git a/src/pytesmo/time_series/filters.c b/src/pytesmo/time_series/filters.c index 919b216..5b9534f 100644 --- a/src/pytesmo/time_series/filters.c +++ b/src/pytesmo/time_series/filters.c @@ -1,4 +1,4 @@ -/* Generated by Cython 3.0.10 */ +/* Generated by Cython 3.0.11 */ /* BEGIN: Cython Metadata { @@ -10,14 +10,14 @@ ] ], "depends": [ - "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h", - "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/core/include/numpy/arrayscalars.h", - "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h", - "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h", - "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/core/include/numpy/ufuncobject.h" + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayobject.h", + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayscalars.h", + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarrayobject.h", + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarraytypes.h", + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include/numpy/ufuncobject.h" ], "include_dirs": [ - "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/core/include" + "/home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/_core/include" ], "name": "pytesmo.time_series.filters", "sources": [ @@ -52,10 +52,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 @@ -1679,7 +1679,7 @@ typedef struct { /* #### Code section: numeric_typedefs ### */ -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":730 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< @@ -1688,7 +1688,7 @@ typedef struct { */ typedef npy_int8 __pyx_t_5numpy_int8_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":731 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":770 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< @@ -1697,7 +1697,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; */ typedef npy_int16 __pyx_t_5numpy_int16_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":732 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< @@ -1706,7 +1706,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; */ typedef npy_int32 __pyx_t_5numpy_int32_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":733 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< @@ -1715,7 +1715,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; */ typedef npy_int64 __pyx_t_5numpy_int64_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":737 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":776 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< @@ -1724,7 +1724,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":738 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":777 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< @@ -1733,7 +1733,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":739 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< @@ -1742,7 +1742,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":740 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< @@ -1751,7 +1751,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":744 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":783 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< @@ -1760,7 +1760,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; */ typedef npy_float32 __pyx_t_5numpy_float32_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":745 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":784 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< @@ -1769,43 +1769,25 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; */ typedef npy_float64 __pyx_t_5numpy_float64_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":754 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< - * ctypedef npy_longlong longlong_t +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":791 + * ctypedef double complex complex128_t * - */ -typedef npy_long __pyx_t_5numpy_int_t; - -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":755 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< - * - * ctypedef npy_ulong uint_t - */ -typedef npy_longlong __pyx_t_5numpy_longlong_t; - -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":757 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ -typedef npy_ulong __pyx_t_5numpy_uint_t; +typedef npy_longlong __pyx_t_5numpy_longlong_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":758 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":792 * - * ctypedef npy_ulong uint_t + * ctypedef npy_longlong longlong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< * * ctypedef npy_intp intp_t */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":760 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":794 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< @@ -1814,7 +1796,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; */ typedef npy_intp __pyx_t_5numpy_intp_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":761 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":795 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< @@ -1823,7 +1805,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; */ typedef npy_uintp __pyx_t_5numpy_uintp_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":763 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":797 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< @@ -1832,7 +1814,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; */ typedef npy_double __pyx_t_5numpy_float_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":764 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":798 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< @@ -1841,12 +1823,12 @@ typedef npy_double __pyx_t_5numpy_float_t; */ typedef npy_double __pyx_t_5numpy_double_t; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":765 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< * - * ctypedef npy_cfloat cfloat_t + * ctypedef float complex cfloat_t */ typedef npy_longdouble __pyx_t_5numpy_longdouble_t; /* #### Code section: complex_type_declarations ### */ @@ -1874,6 +1856,18 @@ static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(floa #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); +/* Declarations.proto */ +#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #ifdef __cplusplus + typedef ::std::complex< long double > __pyx_t_long_double_complex; + #else + typedef long double _Complex __pyx_t_long_double_complex; + #endif +#else + typedef struct { long double real, imag; } __pyx_t_long_double_complex; +#endif +static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double, long double); + /* #### Code section: type_declarations ### */ /*--- Type declarations ---*/ @@ -1882,41 +1876,23 @@ struct __pyx_MemviewEnum_obj; struct __pyx_memoryview_obj; struct __pyx_memoryviewslice_obj; -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":767 - * ctypedef npy_longdouble longdouble_t +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1095 * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t - */ -typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":768 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< - * ctypedef npy_clongdouble clongdouble_t - * - */ -typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":769 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< + * # 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 * - * ctypedef npy_cdouble complex_t */ -typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; +typedef int (*__pyx_t_5numpy_NpyIter_IterNextFunc)(NpyIter *); -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":771 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< * - * cdef inline object PyArray_MultiIterNew1(a): + * cdef extern from "numpy/arrayobject.h": */ -typedef npy_cdouble __pyx_t_5numpy_complex_t; +typedef void (*__pyx_t_5numpy_NpyIter_GetMultiIndexFunc)(NpyIter *, npy_intp *); struct __pyx_defaults; typedef struct __pyx_defaults __pyx_defaults; struct __pyx_defaults1; @@ -2636,11 +2612,7 @@ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* s static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /* HasAttr.proto */ -#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 -#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) -#else static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); -#endif /* PyDictContains.proto */ static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { @@ -2877,22 +2849,22 @@ static int __Pyx_setup_reduce(PyObject* type_obj); #endif /* 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 /* FetchSharedCythonModule.proto */ @@ -3230,6 +3202,44 @@ static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *o #endif #endif +/* Arithmetic.proto */ +#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #define __Pyx_c_eq_long__double(a, b) ((a)==(b)) + #define __Pyx_c_sum_long__double(a, b) ((a)+(b)) + #define __Pyx_c_diff_long__double(a, b) ((a)-(b)) + #define __Pyx_c_prod_long__double(a, b) ((a)*(b)) + #define __Pyx_c_quot_long__double(a, b) ((a)/(b)) + #define __Pyx_c_neg_long__double(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero_long__double(z) ((z)==(long double)0) + #define __Pyx_c_conj_long__double(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs_long__double(z) (::std::abs(z)) + #define __Pyx_c_pow_long__double(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero_long__double(z) ((z)==0) + #define __Pyx_c_conj_long__double(z) (conjl(z)) + #if 1 + #define __Pyx_c_abs_long__double(z) (cabsl(z)) + #define __Pyx_c_pow_long__double(a, b) (cpowl(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex); + #if 1 + static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + #endif +#endif + /* MemviewSliceCopyTemplate.proto */ static __Pyx_memviewslice __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, @@ -3320,6 +3330,18 @@ static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/ static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/ static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self); /* proto*/ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self); /* proto*/ @@ -3345,6 +3367,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p /* Module declarations from "numpy" */ /* Module declarations from "numpy" */ +static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/ /* Module declarations from "libc.math" */ @@ -3566,7 +3589,6 @@ static const char __pyx_k_pytesmo_time_series_filters[] = "pytesmo.time_series.f static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data."; static const char __pyx_k_strided_and_direct_or_indirect[] = ""; static const char __pyx_k_Created_on_Oct_16_2013_Fast_cyt[] = "\nCreated on Oct 16, 2013\n\nFast cython functions for calculating various filters\n\n@author: Christoph Paulik christoph.paulik@geo.tuwien.ac.at\n"; -static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; static const char __pyx_k_src_pytesmo_time_series_filters[] = "src/pytesmo/time_series/filters.pyx"; static const char __pyx_k_All_dimensions_preceding_dimensi[] = "All dimensions preceding dimension %d must be indexed and not sliced"; static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides"; @@ -3584,7 +3606,8 @@ static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object"; static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension "; static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; -static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; +static const char __pyx_k_numpy__core_multiarray_failed_to[] = "numpy._core.multiarray failed to import"; +static const char __pyx_k_numpy__core_umath_failed_to_impo[] = "numpy._core.umath failed to import"; static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides."; /* #### Code section: decls ### */ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */ @@ -3840,8 +3863,8 @@ typedef struct { PyObject *__pyx_n_s_nobs; PyObject *__pyx_n_s_np; PyObject *__pyx_n_s_numpy; - PyObject *__pyx_kp_u_numpy_core_multiarray_failed_to; - PyObject *__pyx_kp_u_numpy_core_umath_failed_to_impor; + PyObject *__pyx_kp_u_numpy__core_multiarray_failed_to; + PyObject *__pyx_kp_u_numpy__core_umath_failed_to_impo; PyObject *__pyx_n_s_obj; PyObject *__pyx_n_s_pack; PyObject *__pyx_n_s_pickle; @@ -4109,8 +4132,8 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_nobs); Py_CLEAR(clear_module_state->__pyx_n_s_np); Py_CLEAR(clear_module_state->__pyx_n_s_numpy); - Py_CLEAR(clear_module_state->__pyx_kp_u_numpy_core_multiarray_failed_to); - Py_CLEAR(clear_module_state->__pyx_kp_u_numpy_core_umath_failed_to_impor); + Py_CLEAR(clear_module_state->__pyx_kp_u_numpy__core_multiarray_failed_to); + Py_CLEAR(clear_module_state->__pyx_kp_u_numpy__core_umath_failed_to_impo); Py_CLEAR(clear_module_state->__pyx_n_s_obj); Py_CLEAR(clear_module_state->__pyx_n_s_pack); Py_CLEAR(clear_module_state->__pyx_n_s_pickle); @@ -4356,8 +4379,8 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_nobs); Py_VISIT(traverse_module_state->__pyx_n_s_np); Py_VISIT(traverse_module_state->__pyx_n_s_numpy); - Py_VISIT(traverse_module_state->__pyx_kp_u_numpy_core_multiarray_failed_to); - Py_VISIT(traverse_module_state->__pyx_kp_u_numpy_core_umath_failed_to_impor); + Py_VISIT(traverse_module_state->__pyx_kp_u_numpy__core_multiarray_failed_to); + Py_VISIT(traverse_module_state->__pyx_kp_u_numpy__core_umath_failed_to_impo); Py_VISIT(traverse_module_state->__pyx_n_s_obj); Py_VISIT(traverse_module_state->__pyx_n_s_pack); Py_VISIT(traverse_module_state->__pyx_n_s_pickle); @@ -4639,8 +4662,8 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_nobs __pyx_mstate_global->__pyx_n_s_nobs #define __pyx_n_s_np __pyx_mstate_global->__pyx_n_s_np #define __pyx_n_s_numpy __pyx_mstate_global->__pyx_n_s_numpy -#define __pyx_kp_u_numpy_core_multiarray_failed_to __pyx_mstate_global->__pyx_kp_u_numpy_core_multiarray_failed_to -#define __pyx_kp_u_numpy_core_umath_failed_to_impor __pyx_mstate_global->__pyx_kp_u_numpy_core_umath_failed_to_impor +#define __pyx_kp_u_numpy__core_multiarray_failed_to __pyx_mstate_global->__pyx_kp_u_numpy__core_multiarray_failed_to +#define __pyx_kp_u_numpy__core_umath_failed_to_impo __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo #define __pyx_n_s_obj __pyx_mstate_global->__pyx_n_s_obj #define __pyx_n_s_pack __pyx_mstate_global->__pyx_n_s_pack #define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle @@ -4909,10 +4932,11 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + unsigned int __pyx_t_7; char *__pyx_t_8; - Py_ssize_t __pyx_t_9; - Py_UCS4 __pyx_t_10; + int __pyx_t_9; + Py_ssize_t __pyx_t_10; + Py_UCS4 __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -5138,7 +5162,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ * if dim <= 0: * raise ValueError, f"Invalid shape in axis {idx}: {dim}." */ - __pyx_t_7 = 0; + __pyx_t_9 = 0; __pyx_t_4 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0; for (;;) { @@ -5155,11 +5179,11 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif - __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 159, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_dim = __pyx_t_9; - __pyx_v_idx = __pyx_t_7; - __pyx_t_7 = (__pyx_t_7 + 1); + __pyx_v_dim = __pyx_t_10; + __pyx_v_idx = __pyx_t_9; + __pyx_t_9 = (__pyx_t_9 + 1); /* "View.MemoryView":160 * @@ -5180,33 +5204,33 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ */ __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = 0; - __pyx_t_10 = 127; + __pyx_t_10 = 0; + __pyx_t_11 = 127; __Pyx_INCREF(__pyx_kp_u_Invalid_shape_in_axis); - __pyx_t_9 += 22; + __pyx_t_10 += 22; __Pyx_GIVEREF(__pyx_kp_u_Invalid_shape_in_axis); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Invalid_shape_in_axis); __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_idx, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_kp_u_); - __pyx_t_9 += 2; + __pyx_t_10 += 2; __Pyx_GIVEREF(__pyx_kp_u_); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_); __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_kp_u__2); - __pyx_t_9 += 1; + __pyx_t_10 += 1; __Pyx_GIVEREF(__pyx_kp_u__2); PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__2); - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0); @@ -5390,7 +5414,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ * * @cname('getbuffer') */ - __pyx_t_7 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(1, 180, __pyx_L1_error) + __pyx_t_9 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 180, __pyx_L1_error) /* "View.MemoryView":179 * self.dtype_is_object = format == b'O' @@ -8545,7 +8569,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit * * if have_slices: # <<<<<<<<<<<<<< * obj = self.is_slice(value) - * if obj: + * if obj is not None: */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 426, __pyx_L1_error) if (__pyx_t_4) { @@ -8554,7 +8578,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit * * if have_slices: * obj = self.is_slice(value) # <<<<<<<<<<<<<< - * if obj: + * if obj is not None: * self.setitem_slice_assignment(self[index], obj) */ __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 427, __pyx_L1_error) @@ -8565,16 +8589,16 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit /* "View.MemoryView":428 * if have_slices: * obj = self.is_slice(value) - * if obj: # <<<<<<<<<<<<<< + * if obj is not None: # <<<<<<<<<<<<<< * self.setitem_slice_assignment(self[index], obj) * else: */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 428, __pyx_L1_error) + __pyx_t_4 = (__pyx_v_obj != Py_None); if (__pyx_t_4) { /* "View.MemoryView":429 * obj = self.is_slice(value) - * if obj: + * if obj is not None: * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<< * else: * self.setitem_slice_assign_scalar(self[index], value) @@ -8589,7 +8613,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit /* "View.MemoryView":428 * if have_slices: * obj = self.is_slice(value) - * if obj: # <<<<<<<<<<<<<< + * if obj is not None: # <<<<<<<<<<<<<< * self.setitem_slice_assignment(self[index], obj) * else: */ @@ -8619,7 +8643,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit * * if have_slices: # <<<<<<<<<<<<<< * obj = self.is_slice(value) - * if obj: + * if obj is not None: */ goto __pyx_L4; } @@ -9327,9 +9351,10 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; + unsigned int __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; + int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -9484,11 +9509,11 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 498, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_7); + __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_6); __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; - if (__pyx_t_8) { + if (__pyx_t_11) { __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 498, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_6); @@ -9573,7 +9598,7 @@ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryvie PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; + unsigned int __pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; @@ -18047,7 +18072,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSE int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; + unsigned int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -18229,7 +18254,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; + unsigned int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -18349,10 +18374,434 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":245 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286 + * + * @property + * cdef inline npy_intp itemsize(self) noexcept nogil: # <<<<<<<<<<<<<< + * return PyDataType_ELSIZE(self) + * + */ + +static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self) { + npy_intp __pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":287 + * @property + * cdef inline npy_intp itemsize(self) noexcept nogil: + * return PyDataType_ELSIZE(self) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyDataType_ELSIZE(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286 + * + * @property + * cdef inline npy_intp itemsize(self) noexcept nogil: # <<<<<<<<<<<<<< + * return PyDataType_ELSIZE(self) + * + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290 + * + * @property + * cdef inline npy_intp alignment(self) noexcept nogil: # <<<<<<<<<<<<<< + * return PyDataType_ALIGNMENT(self) + * + */ + +static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self) { + npy_intp __pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":291 + * @property + * cdef inline npy_intp alignment(self) noexcept nogil: + * return PyDataType_ALIGNMENT(self) # <<<<<<<<<<<<<< + * + * # Use fields/names with care as they may be NULL. You must check + */ + __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290 + * + * @property + * cdef inline npy_intp alignment(self) noexcept nogil: # <<<<<<<<<<<<<< + * return PyDataType_ALIGNMENT(self) + * + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296 + * # for this using PyDataType_HASFIELDS. + * @property + * cdef inline object fields(self): # <<<<<<<<<<<<<< + * return PyDataType_FIELDS(self) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("fields", 1); + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":297 + * @property + * cdef inline object fields(self): + * return PyDataType_FIELDS(self) # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296 + * # for this using PyDataType_HASFIELDS. + * @property + * cdef inline object fields(self): # <<<<<<<<<<<<<< + * return PyDataType_FIELDS(self) + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300 + * + * @property + * cdef inline tuple names(self): # <<<<<<<<<<<<<< + * return PyDataType_NAMES(self) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("names", 1); + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":301 + * @property + * cdef inline tuple names(self): + * return PyDataType_NAMES(self) # <<<<<<<<<<<<<< + * + * # Use PyDataType_HASSUBARRAY to test whether this field is + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDataType_NAMES(__pyx_v_self); + __Pyx_INCREF(((PyObject*)__pyx_t_1)); + __pyx_r = ((PyObject*)__pyx_t_1); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300 + * + * @property + * cdef inline tuple names(self): # <<<<<<<<<<<<<< + * return PyDataType_NAMES(self) + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< + * return PyDataType_SUBARRAY(self) + * + */ + +static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self) { + PyArray_ArrayDescr *__pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":308 + * @property + * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil: + * return PyDataType_SUBARRAY(self) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyDataType_SUBARRAY(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< + * return PyDataType_SUBARRAY(self) + * + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311 + * + * @property + * cdef inline npy_uint64 flags(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The data types flags.""" + * return PyDataType_FLAGS(self) + */ + +static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self) { + npy_uint64 __pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = PyDataType_FLAGS(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311 + * + * @property + * cdef inline npy_uint64 flags(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The data types flags.""" + * return PyDataType_FLAGS(self) + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323 + * + * @property + * 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) + */ + +static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self) { + int __pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323 + * + * @property + * 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) + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328 + * + * @property + * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The total broadcasted size.""" + * return PyArray_MultiIter_SIZE(self) + */ + +static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self) { + npy_intp __pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328 + * + * @property + * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The total broadcasted size.""" + * return PyArray_MultiIter_SIZE(self) + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333 + * + * @property + * cdef inline npy_intp index(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The current (1-d) index into the broadcasted result.""" + * return PyArray_MultiIter_INDEX(self) + */ + +static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self) { + npy_intp __pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333 + * + * @property + * cdef inline npy_intp index(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The current (1-d) index into the broadcasted result.""" + * return PyArray_MultiIter_INDEX(self) + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338 + * + * @property + * cdef inline int nd(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The number of dimensions in the broadcasted result.""" + * return PyArray_MultiIter_NDIM(self) + */ + +static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self) { + int __pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338 + * + * @property + * cdef inline int nd(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The number of dimensions in the broadcasted result.""" + * return PyArray_MultiIter_NDIM(self) + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343 + * + * @property + * cdef inline npy_intp* dimensions(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The shape of the broadcasted result.""" + * return PyArray_MultiIter_DIMS(self) + */ + +static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self) { + npy_intp *__pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343 + * + * @property + * cdef inline npy_intp* dimensions(self) noexcept nogil: # <<<<<<<<<<<<<< + * """The shape of the broadcasted result.""" + * return PyArray_MultiIter_DIMS(self) + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348 + * + * @property + * cdef inline void** iters(self) noexcept nogil: # <<<<<<<<<<<<<< + * """An array of iterator objects that holds the iterators for the arrays to be broadcast together. + * On return, the iterators are adjusted for broadcasting.""" + */ + +static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self) { + void **__pyx_r; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348 + * + * @property + * cdef inline void** iters(self) noexcept nogil: # <<<<<<<<<<<<<< + * """An array of iterator objects that holds the iterators for the arrays to be broadcast together. + * On return, the iterators are adjusted for broadcasting.""" + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366 * * @property - * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<< + * cdef inline PyObject* base(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns a borrowed reference to the object owning the data/memory. * """ */ @@ -18360,7 +18809,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) { PyObject *__pyx_r; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":248 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< @@ -18370,10 +18819,10 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject __pyx_r = PyArray_BASE(__pyx_v_self); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":245 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366 * * @property - * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<< + * cdef inline PyObject* base(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns a borrowed reference to the object owning the data/memory. * """ */ @@ -18383,7 +18832,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":251 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -18397,7 +18846,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray PyArray_Descr *__pyx_t_1; __Pyx_RefNannySetupContext("descr", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":254 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< @@ -18410,7 +18859,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray __pyx_r = ((PyArray_Descr *)__pyx_t_1); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":251 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -18425,10 +18874,10 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":257 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378 * * @property - * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<< + * cdef inline int ndim(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns the number of dimensions in the array. * """ */ @@ -18436,7 +18885,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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":260 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":381 * """Returns the number of dimensions in the array. * """ * return PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -18446,10 +18895,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx __pyx_r = PyArray_NDIM(__pyx_v_self); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":257 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378 * * @property - * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<< + * cdef inline int ndim(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns the number of dimensions in the array. * """ */ @@ -18459,10 +18908,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":263 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384 * * @property - * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_intp *shape(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns a pointer to the dimensions/shape of the array. * The number of elements matches the number of dimensions of the array (ndim). */ @@ -18470,7 +18919,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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":268 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":389 * Can return NULL for 0-dimensional arrays. * """ * return PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -18480,10 +18929,10 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec __pyx_r = PyArray_DIMS(__pyx_v_self); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":263 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384 * * @property - * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_intp *shape(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns a pointer to the dimensions/shape of the array. * The number of elements matches the number of dimensions of the array (ndim). */ @@ -18493,10 +18942,10 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":271 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392 * * @property - * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_intp *strides(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns a pointer to the strides of the array. * The number of elements matches the number of dimensions of the array (ndim). */ @@ -18504,7 +18953,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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":275 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< @@ -18514,10 +18963,10 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO __pyx_r = PyArray_STRIDES(__pyx_v_self); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":271 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392 * * @property - * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_intp *strides(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns a pointer to the strides of the array. * The number of elements matches the number of dimensions of the array (ndim). */ @@ -18527,10 +18976,10 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":278 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399 * * @property - * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns the total size (in number of elements) of the array. * """ */ @@ -18538,7 +18987,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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":281 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< @@ -18548,10 +18997,10 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * __pyx_r = PyArray_SIZE(__pyx_v_self); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":278 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399 * * @property - * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< * """Returns the total size (in number of elements) of the array. * """ */ @@ -18561,10 +19010,10 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":284 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405 * * @property - * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<< + * cdef inline char* data(self) noexcept nogil: # <<<<<<<<<<<<<< * """The pointer to the data buffer as a char*. * This is provided for legacy reasons to avoid direct struct field access. */ @@ -18572,20 +19021,20 @@ 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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":290 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":411 * of `PyArray_DATA()` instead, which returns a 'void*'. * """ * return PyArray_BYTES(self) # <<<<<<<<<<<<<< * - * ctypedef unsigned char npy_bool + * */ __pyx_r = PyArray_BYTES(__pyx_v_self); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":284 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405 * * @property - * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<< + * cdef inline char* data(self) noexcept nogil: # <<<<<<<<<<<<<< * """The pointer to the data buffer as a char*. * This is provided for legacy reasons to avoid direct struct field access. */ @@ -18595,8 +19044,8 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":773 - * ctypedef npy_cdouble complex_t +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806 + * ctypedef long double complex clongdouble_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(1, a) @@ -18612,7 +19061,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":774 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":807 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< @@ -18620,14 +19069,14 @@ 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(2, 774, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":773 - * ctypedef npy_cdouble complex_t + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806 + * ctypedef long double complex clongdouble_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(1, a) @@ -18645,7 +19094,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":776 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -18662,7 +19111,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":777 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":810 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< @@ -18670,13 +19119,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(2, 777, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":776 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -18695,7 +19144,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":779 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -18712,7 +19161,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":780 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< @@ -18720,13 +19169,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(2, 780, __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(2, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":779 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -18745,7 +19194,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":782 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -18762,7 +19211,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":783 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< @@ -18770,13 +19219,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(2, 783, __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(2, 816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":782 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -18795,7 +19244,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":785 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -18812,7 +19261,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":786 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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) # <<<<<<<<<<<<<< @@ -18820,13 +19269,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(2, 786, __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(2, 819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":785 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -18845,7 +19294,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":788 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -18857,9 +19306,10 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; + PyObject *__pyx_t_2; __Pyx_RefNannySetupContext("PyDataType_SHAPE", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":789 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -18869,7 +19319,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d); if (__pyx_t_1) { - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":790 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< @@ -18877,11 +19327,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ * return () */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); - __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); + __pyx_t_2 = __pyx_f_5numpy_5dtype_8subarray_subarray(__pyx_v_d)->shape; + __Pyx_INCREF(((PyObject*)__pyx_t_2)); + __pyx_r = ((PyObject*)__pyx_t_2); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":789 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -18890,7 +19341,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ */ } - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":792 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":825 * return d.subarray.shape * else: * return () # <<<<<<<<<<<<<< @@ -18904,7 +19355,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ goto __pyx_L0; } - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":788 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< @@ -18919,10 +19370,10 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":968 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< + * 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) */ @@ -18933,28 +19384,28 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":969 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1010 * - * cdef inline void set_array_base(ndarray arr, object base): + * 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) * */ Py_INCREF(__pyx_v_base); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":970 - * cdef inline void set_array_base(ndarray arr, object base): + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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(2, 970, __pyx_L1_error) + __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 1011, __pyx_L1_error) - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":968 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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): # <<<<<<<<<<<<<< + * 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) */ @@ -18966,7 +19417,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a __pyx_L0:; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":972 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -18981,7 +19432,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":973 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1014 * * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< @@ -18990,7 +19441,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ __pyx_v_base = PyArray_BASE(__pyx_v_arr); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":974 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< @@ -19000,7 +19451,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_t_1 = (__pyx_v_base == NULL); if (__pyx_t_1) { - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":975 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1016 * base = PyArray_BASE(arr) * if base is NULL: * return None # <<<<<<<<<<<<<< @@ -19011,7 +19462,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":974 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< @@ -19020,7 +19471,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ } - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":976 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1017 * if base is NULL: * return None * return base # <<<<<<<<<<<<<< @@ -19032,7 +19483,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = ((PyObject *)__pyx_v_base); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":972 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -19047,7 +19498,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":980 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< @@ -19071,7 +19522,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_array", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19087,16 +19538,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":982 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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") + * raise ImportError("numpy._core.multiarray failed to import") */ - __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 982, __pyx_L3_error) + __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1023, __pyx_L3_error) - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19110,37 +19561,37 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":983 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1024 * try: * __pyx_import_array() * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") + * raise ImportError("numpy._core.multiarray failed to import") * */ __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(2, 983, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1024, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":984 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025 * __pyx_import_array() * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< + * 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__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 984, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 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(2, 984, __pyx_L5_except_error) + __PYX_ERR(2, 1025, __pyx_L5_except_error) } goto __pyx_L5_except_error; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19156,7 +19607,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __pyx_L8_try_end:; } - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":980 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< @@ -19179,8 +19630,8 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":986 - * raise ImportError("numpy.core.multiarray failed to import") +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< * try: @@ -19203,7 +19654,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_umath", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -19219,16 +19670,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":988 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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") + * raise ImportError("numpy._core.umath failed to import") */ - __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 988, __pyx_L3_error) + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1029, __pyx_L3_error) - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -19242,37 +19693,37 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":989 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1030 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") + * raise ImportError("numpy._core.umath failed to import") * */ __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(2, 989, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1030, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":990 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031 * _import_umath() * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * 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__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 990, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 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(2, 990, __pyx_L5_except_error) + __PYX_ERR(2, 1031, __pyx_L5_except_error) } goto __pyx_L5_except_error; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -19288,8 +19739,8 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __pyx_L8_try_end:; } - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":986 - * raise ImportError("numpy.core.multiarray failed to import") + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< * try: @@ -19311,8 +19762,8 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":992 - * raise ImportError("numpy.core.umath failed to import") +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< * try: @@ -19335,7 +19786,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_ufunc", 1); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -19351,16 +19802,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":994 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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") + * raise ImportError("numpy._core.umath failed to import") */ - __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 994, __pyx_L3_error) + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1035, __pyx_L3_error) - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -19374,37 +19825,37 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":995 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1036 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") + * raise ImportError("numpy._core.umath failed to import") * */ __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(2, 995, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1036, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":996 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1037 * _import_umath() * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<< * * */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 996, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 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(2, 996, __pyx_L5_except_error) + __PYX_ERR(2, 1037, __pyx_L5_except_error) } goto __pyx_L5_except_error; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -19420,8 +19871,8 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __pyx_L8_try_end:; } - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":992 - * raise ImportError("numpy.core.umath failed to import") + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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: # <<<<<<<<<<<<<< * try: @@ -19443,10 +19894,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":999 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040 * * - * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< + * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<< * """ * Cython equivalent of `isinstance(obj, np.timedelta64)` */ @@ -19454,7 +19905,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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1011 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1052 * bool * """ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< @@ -19464,10 +19915,10 @@ 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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":999 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040 * * - * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< + * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<< * """ * Cython equivalent of `isinstance(obj, np.timedelta64)` */ @@ -19477,10 +19928,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1014 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055 * * - * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< + * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<< * """ * Cython equivalent of `isinstance(obj, np.datetime64)` */ @@ -19488,7 +19939,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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1026 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1067 * bool * """ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< @@ -19498,10 +19949,10 @@ 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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1014 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055 * * - * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< + * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<< * """ * Cython equivalent of `isinstance(obj, np.datetime64)` */ @@ -19511,10 +19962,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1029 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070 * * - * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< * """ * returns the int64 value underlying scalar numpy datetime64 object */ @@ -19522,7 +19973,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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1036 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1077 * also needed. That can be found using `get_datetime64_unit`. * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -19532,10 +19983,10 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1029 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070 * * - * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< * """ * returns the int64 value underlying scalar numpy datetime64 object */ @@ -19545,10 +19996,10 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1039 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080 * * - * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< * """ * returns the int64 value underlying scalar numpy timedelta64 object */ @@ -19556,7 +20007,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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1043 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1084 * returns the int64 value underlying scalar numpy timedelta64 object * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -19566,10 +20017,10 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1039 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080 * * - * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< + * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< * """ * returns the int64 value underlying scalar numpy timedelta64 object */ @@ -19579,10 +20030,10 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject return __pyx_r; } -/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1046 +/* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087 * * - * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<< * """ * returns the unit part of the dtype for a numpy datetime64 object. */ @@ -19590,18 +20041,20 @@ 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; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1050 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/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 # <<<<<<<<<<<<<< + * + * */ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); goto __pyx_L0; - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1046 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087 * * - * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<< * """ * returns the unit part of the dtype for a numpy datetime64 object. */ @@ -19611,7 +20064,7 @@ static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObjec return __pyx_r; } -/* "pytesmo/time_series/filters.pyx":46 +/* "pytesmo/time_series/filters.pyx":47 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -19671,7 +20124,7 @@ static PyObject *__pyx_pw_7pytesmo_11time_series_7filters_1exp_filter(PyObject * (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -19679,9 +20132,9 @@ static PyObject *__pyx_pw_7pytesmo_11time_series_7filters_1exp_filter(PyObject * (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 46, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 47, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -19689,9 +20142,9 @@ static PyObject *__pyx_pw_7pytesmo_11time_series_7filters_1exp_filter(PyObject * (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 46, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 47, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -19699,21 +20152,21 @@ static PyObject *__pyx_pw_7pytesmo_11time_series_7filters_1exp_filter(PyObject * (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 46, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 47, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 46, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 47, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -19735,7 +20188,7 @@ static PyObject *__pyx_pw_7pytesmo_11time_series_7filters_1exp_filter(PyObject * } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 46, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 47, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -19806,18 +20259,19 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; - Py_ssize_t __pyx_t_18; - int __pyx_t_19; + unsigned int __pyx_t_18; + Py_ssize_t __pyx_t_19; + int __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("exp_filter", 0); __Pyx_INCREF(__pyx_v_kwargs); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 46, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 47, __pyx_L1_error); __pyx_v_dest_sig = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_v_kwargs != Py_None); @@ -19826,7 +20280,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 47, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_3); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; @@ -19834,21 +20288,21 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None); } - __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_v_itemsize = -1L; if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 46, __pyx_L1_error) + __PYX_ERR(0, 47, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 47, __pyx_L1_error) __pyx_t_2 = (0 < __pyx_t_5); if (__pyx_t_2) { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 46, __pyx_L1_error) + __PYX_ERR(0, 47, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0); __Pyx_INCREF(__pyx_t_1); @@ -19864,17 +20318,17 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 46, __pyx_L1_error) + __PYX_ERR(0, 47, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_in_data, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_in_data, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 47, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L7_bool_binop_done:; if (likely(__pyx_t_2)) { if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 46, __pyx_L1_error) + __PYX_ERR(0, 47, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_in_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_in_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_arg = __pyx_t_1; __pyx_t_1 = 0; @@ -19883,31 +20337,31 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS /*else*/ { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 46, __pyx_L1_error) + __PYX_ERR(0, 47, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 46, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 47, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 46, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 47, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_s); __Pyx_GIVEREF(__pyx_n_s_s); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 46, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 47, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 46, __pyx_L1_error) + __PYX_ERR(0, 47, __pyx_L1_error) } __pyx_L6:; while (1) { @@ -19915,7 +20369,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS if (__pyx_t_2) { __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -19923,13 +20377,13 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS } __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_base = __pyx_t_6; __pyx_t_6 = 0; __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -19950,14 +20404,14 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS __pyx_v_itemsize = -1L; __pyx_t_2 = (__pyx_v_dtype != Py_None); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_itemsize = __pyx_t_5; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_kind = __pyx_t_7; __pyx_v_dtype_signed = (__pyx_v_kind == 0x69); @@ -19972,15 +20426,15 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS __pyx_t_2 = __pyx_t_4; goto __pyx_L16_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L16_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 47, __pyx_L1_error) goto __pyx_L10_break; } __pyx_t_4 = ((sizeof(double)) == __pyx_v_itemsize); @@ -19989,15 +20443,15 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS __pyx_t_2 = __pyx_t_4; goto __pyx_L19_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L19_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 47, __pyx_L1_error) goto __pyx_L10_break; } break; @@ -20011,7 +20465,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS } __pyx_t_2 = (__pyx_v_arg == Py_None); if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 47, __pyx_L1_error) goto __pyx_L10_break; } { @@ -20022,7 +20476,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L22_error) + __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_as_memoryview = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; @@ -20033,7 +20487,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS goto __pyx_L33_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(float))); if (!__pyx_t_4) { } else { @@ -20047,7 +20501,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS goto __pyx_L31_bool_binop_done; } __pyx_L32_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L31_bool_binop_done:; @@ -20057,7 +20511,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 46, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 47, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -20069,7 +20523,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS goto __pyx_L39_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(double))); if (!__pyx_t_4) { } else { @@ -20083,7 +20537,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS goto __pyx_L37_bool_binop_done; } __pyx_L38_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L37_bool_binop_done:; @@ -20093,7 +20547,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 46, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 47, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -20111,7 +20565,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS __pyx_t_11 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_ValueError, __pyx_builtin_TypeError); if (__pyx_t_11) { __Pyx_AddTraceback("pytesmo.time_series.filters.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 46, __pyx_L24_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 47, __pyx_L24_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_13); @@ -20140,19 +20594,19 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L29_try_end:; } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 47, __pyx_L1_error) goto __pyx_L10_break; } __pyx_L10_break:; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 47, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_2); if (__pyx_t_4) { __pyx_t_5 = 0; if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 46, __pyx_L1_error) + __PYX_ERR(0, 47, __pyx_L1_error) } - __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = __pyx_t_1; @@ -20160,7 +20614,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS while (1) { __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_13, __pyx_t_14, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_11); if (unlikely(__pyx_t_15 == 0)) break; - if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 46, __pyx_L1_error) + if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1); __pyx_t_1 = 0; @@ -20168,10 +20622,10 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16); @@ -20180,23 +20634,23 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_kp_s__11}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_16); @@ -20205,34 +20659,34 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s__12}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_18 = PyList_GET_SIZE(__pyx_t_16); - if (unlikely(__pyx_t_18 < 1)) { - __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_18); __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_19 = PyList_GET_SIZE(__pyx_t_16); + if (unlikely(__pyx_t_19 < 1)) { + __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_19); __PYX_ERR(0, 47, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_19-1); ((PyVarObject*)__pyx_t_16)->ob_size--; #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_19-1); #endif __Pyx_GOTREF(__pyx_t_6); #if !CYTHON_COMPILING_IN_CPYTHON - __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_18-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_19-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = __pyx_t_17; __pyx_t_17 = NULL; @@ -20244,36 +20698,36 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 47, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 47, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 46, __pyx_L1_error) + __PYX_ERR(0, 47, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 47, __pyx_L1_error) if (__pyx_t_4) { - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 46, __pyx_L1_error) + __PYX_ERR(0, 47, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -20282,9 +20736,9 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS /*else*/ { if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 46, __pyx_L1_error) + __PYX_ERR(0, 47, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = __pyx_t_6; __Pyx_INCREF(__pyx_t_16); @@ -20297,21 +20751,21 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 46, __pyx_L1_error) + __PYX_ERR(0, 47, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 47, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } - __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v__fused_sigindex); __Pyx_GIVEREF(__pyx_v__fused_sigindex); - if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 46, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 47, __pyx_L1_error); __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_13); @@ -20320,23 +20774,23 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 47, __pyx_L1_error) #endif if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 47, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; @@ -20348,25 +20802,25 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 47, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 47, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 46, __pyx_L1_error) + __PYX_ERR(0, 47, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -20376,85 +20830,85 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 47, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 47, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 46, __pyx_L1_error) + __PYX_ERR(0, 47, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L53; } /*else*/ { - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sigindex_matches); __Pyx_GIVEREF(__pyx_v_sigindex_matches); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 46, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 47, __pyx_L1_error); __Pyx_INCREF(__pyx_v_sigindex_candidates); __Pyx_GIVEREF(__pyx_v_sigindex_candidates); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 46, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 47, __pyx_L1_error); __pyx_t_16 = __pyx_t_1; __Pyx_INCREF(__pyx_t_16); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_5 >= 2) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 47, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; if (unlikely(__pyx_v_search_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 46, __pyx_L1_error) + __PYX_ERR(0, 47, __pyx_L1_error) } __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 47, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 47, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 46, __pyx_L1_error) + __PYX_ERR(0, 47, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__pyx_v_type_match != Py_None); if (__pyx_t_4) { - __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 47, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -20491,28 +20945,28 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_exp_filter(CYTHON_UNUS __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0); __pyx_t_4 = (!__pyx_t_2); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 46, __pyx_L1_error) + __PYX_ERR(0, 47, __pyx_L1_error) } - __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 47, __pyx_L1_error) __pyx_t_4 = (__pyx_t_14 > 1); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 46, __pyx_L1_error) + __PYX_ERR(0, 47, __pyx_L1_error) } /*else*/ { __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 46, __pyx_L1_error) + __PYX_ERR(0, 47, __pyx_L1_error) } - __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_r = __pyx_t_13; __pyx_t_13 = 0; @@ -20601,7 +21055,7 @@ static PyObject *__pyx_fuse_0__pyx_pw_7pytesmo_11time_series_7filters_5exp_filte (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -20609,28 +21063,28 @@ static PyObject *__pyx_fuse_0__pyx_pw_7pytesmo_11time_series_7filters_5exp_filte (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("exp_filter", 0, 2, 4, 1); __PYX_ERR(0, 46, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("exp_filter", 0, 2, 4, 1); __PYX_ERR(0, 47, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ctime); if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nan); if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "exp_filter") < 0)) __PYX_ERR(0, 46, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "exp_filter") < 0)) __PYX_ERR(0, 47, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -20644,22 +21098,22 @@ static PyObject *__pyx_fuse_0__pyx_pw_7pytesmo_11time_series_7filters_5exp_filte default: goto __pyx_L5_argtuple_error; } } - __pyx_v_in_data = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_in_data.memview)) __PYX_ERR(0, 49, __pyx_L3_error) - __pyx_v_in_jd = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_in_jd.memview)) __PYX_ERR(0, 50, __pyx_L3_error) + __pyx_v_in_data = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_in_data.memview)) __PYX_ERR(0, 50, __pyx_L3_error) + __pyx_v_in_jd = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_in_jd.memview)) __PYX_ERR(0, 51, __pyx_L3_error) if (values[2]) { - __pyx_v_ctime = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_ctime == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 51, __pyx_L3_error) + __pyx_v_ctime = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_ctime == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 52, __pyx_L3_error) } else { __pyx_v_ctime = ((int)((int)((int)10))); } if (values[3]) { - __pyx_v_nan = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_nan == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 52, __pyx_L3_error) + __pyx_v_nan = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_nan == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 53, __pyx_L3_error) } else { __pyx_v_nan = ((double)((double)((double)-999999.0))); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("exp_filter", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 46, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("exp_filter", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 47, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -20710,17 +21164,16 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_4exp_filter(CYTHON_UNU PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; + unsigned int __pyx_t_6; PyArrayObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; - unsigned int __pyx_t_9; - int __pyx_t_10; - size_t __pyx_t_11; - int __pyx_t_12; - size_t __pyx_t_13; + int __pyx_t_9; + size_t __pyx_t_10; + int __pyx_t_11; + size_t __pyx_t_12; + Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; - Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -20730,20 +21183,20 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_4exp_filter(CYTHON_UNU __pyx_pybuffernd_filtered.data = NULL; __pyx_pybuffernd_filtered.rcbuffer = &__pyx_pybuffer_filtered; - /* "pytesmo/time_series/filters.pyx":69 + /* "pytesmo/time_series/filters.pyx":70 * nan values to exclude from calculation * """ - * cdef np.ndarray[floating, ndim = 1] filtered = np.empty(len(in_data)) # <<<<<<<<<<<<<< + * cdef cnp.ndarray[floating, ndim = 1] filtered = np.empty(len(in_data)) # <<<<<<<<<<<<<< * cdef double tdiff * cdef float ef */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_MemoryView_Len(__pyx_v_in_data); - __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -20764,17 +21217,17 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_4exp_filter(CYTHON_UNU __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 69, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 70, __pyx_L1_error) __pyx_t_7 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_filtered.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_filtered = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 69, __pyx_L1_error) + __PYX_ERR(0, 70, __pyx_L1_error) } else {__pyx_pybuffernd_filtered.diminfo[0].strides = __pyx_pybuffernd_filtered.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_filtered.diminfo[0].shape = __pyx_pybuffernd_filtered.rcbuffer->pybuffer.shape[0]; } } @@ -20782,7 +21235,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_4exp_filter(CYTHON_UNU __pyx_v_filtered = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "pytesmo/time_series/filters.pyx":72 + /* "pytesmo/time_series/filters.pyx":73 * cdef double tdiff * cdef float ef * cdef float gain = 1 # <<<<<<<<<<<<<< @@ -20791,7 +21244,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_4exp_filter(CYTHON_UNU */ __pyx_v_gain = 1.0; - /* "pytesmo/time_series/filters.pyx":77 + /* "pytesmo/time_series/filters.pyx":78 * cdef double last_filtered_var * cdef unsigned int i * cdef int found_index = -1 # <<<<<<<<<<<<<< @@ -20800,18 +21253,18 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_4exp_filter(CYTHON_UNU */ __pyx_v_found_index = -1; - /* "pytesmo/time_series/filters.pyx":79 + /* "pytesmo/time_series/filters.pyx":80 * cdef int found_index = -1 * * filtered.fill(np.nan) # <<<<<<<<<<<<<< * * # find the first non nan value in the time series */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_filtered), __pyx_n_s_fill); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_filtered), __pyx_n_s_fill); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -20833,13 +21286,13 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_4exp_filter(CYTHON_UNU __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pytesmo/time_series/filters.pyx":83 + /* "pytesmo/time_series/filters.pyx":84 * # find the first non nan value in the time series * * for i in range(in_jd.shape[0]): # <<<<<<<<<<<<<< @@ -20848,71 +21301,71 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_4exp_filter(CYTHON_UNU */ __pyx_t_4 = (__pyx_v_in_jd.shape[0]); __pyx_t_8 = __pyx_t_4; - for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { - __pyx_v_i = __pyx_t_9; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_8; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; - /* "pytesmo/time_series/filters.pyx":85 + /* "pytesmo/time_series/filters.pyx":86 * for i in range(in_jd.shape[0]): * * is_nan = (in_data[i] == nan) or isnan(in_data[i]) # <<<<<<<<<<<<<< * if not is_nan: * last_jd_var = in_jd[i] */ - __pyx_t_11 = __pyx_v_i; - __pyx_t_12 = ((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_11 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); - if (!__pyx_t_12) { + __pyx_t_10 = __pyx_v_i; + __pyx_t_11 = ((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_10 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); + if (!__pyx_t_11) { } else { - __pyx_t_10 = __pyx_t_12; + __pyx_t_9 = __pyx_t_11; goto __pyx_L5_bool_binop_done; } - __pyx_t_11 = __pyx_v_i; - __pyx_t_12 = isnan((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_11 * __pyx_v_in_data.strides[0]) )))); - __pyx_t_10 = __pyx_t_12; + __pyx_t_10 = __pyx_v_i; + __pyx_t_11 = isnan((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_10 * __pyx_v_in_data.strides[0]) )))); + __pyx_t_9 = __pyx_t_11; __pyx_L5_bool_binop_done:; - __pyx_v_is_nan = __pyx_t_10; + __pyx_v_is_nan = __pyx_t_9; - /* "pytesmo/time_series/filters.pyx":86 + /* "pytesmo/time_series/filters.pyx":87 * * is_nan = (in_data[i] == nan) or isnan(in_data[i]) * if not is_nan: # <<<<<<<<<<<<<< * last_jd_var = in_jd[i] * last_filtered_var = in_data[i] */ - __pyx_t_10 = (!__pyx_v_is_nan); - if (__pyx_t_10) { + __pyx_t_9 = (!__pyx_v_is_nan); + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":87 + /* "pytesmo/time_series/filters.pyx":88 * is_nan = (in_data[i] == nan) or isnan(in_data[i]) * if not is_nan: * last_jd_var = in_jd[i] # <<<<<<<<<<<<<< * last_filtered_var = in_data[i] * # set the first filtered value to the first found non nan value */ - __pyx_t_11 = __pyx_v_i; - __pyx_v_last_jd_var = (*((float *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_11 * __pyx_v_in_jd.strides[0]) ))); + __pyx_t_10 = __pyx_v_i; + __pyx_v_last_jd_var = (*((float *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_10 * __pyx_v_in_jd.strides[0]) ))); - /* "pytesmo/time_series/filters.pyx":88 + /* "pytesmo/time_series/filters.pyx":89 * if not is_nan: * last_jd_var = in_jd[i] * last_filtered_var = in_data[i] # <<<<<<<<<<<<<< * # set the first filtered value to the first found non nan value * filtered[i] = in_data[i] */ - __pyx_t_11 = __pyx_v_i; - __pyx_v_last_filtered_var = (*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_11 * __pyx_v_in_data.strides[0]) ))); + __pyx_t_10 = __pyx_v_i; + __pyx_v_last_filtered_var = (*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_10 * __pyx_v_in_data.strides[0]) ))); - /* "pytesmo/time_series/filters.pyx":90 + /* "pytesmo/time_series/filters.pyx":91 * last_filtered_var = in_data[i] * # set the first filtered value to the first found non nan value * filtered[i] = in_data[i] # <<<<<<<<<<<<<< * found_index = i * break */ - __pyx_t_11 = __pyx_v_i; - __pyx_t_13 = __pyx_v_i; - *__Pyx_BufPtrStrided1d(float *, __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_filtered.diminfo[0].strides) = (*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_11 * __pyx_v_in_data.strides[0]) ))); + __pyx_t_10 = __pyx_v_i; + __pyx_t_12 = __pyx_v_i; + *__Pyx_BufPtrStrided1d(float *, __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_filtered.diminfo[0].strides) = (*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_10 * __pyx_v_in_data.strides[0]) ))); - /* "pytesmo/time_series/filters.pyx":91 + /* "pytesmo/time_series/filters.pyx":92 * # set the first filtered value to the first found non nan value * filtered[i] = in_data[i] * found_index = i # <<<<<<<<<<<<<< @@ -20921,7 +21374,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_4exp_filter(CYTHON_UNU */ __pyx_v_found_index = __pyx_v_i; - /* "pytesmo/time_series/filters.pyx":92 + /* "pytesmo/time_series/filters.pyx":93 * filtered[i] = in_data[i] * found_index = i * break # <<<<<<<<<<<<<< @@ -20930,7 +21383,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_4exp_filter(CYTHON_UNU */ goto __pyx_L4_break; - /* "pytesmo/time_series/filters.pyx":86 + /* "pytesmo/time_series/filters.pyx":87 * * is_nan = (in_data[i] == nan) or isnan(in_data[i]) * if not is_nan: # <<<<<<<<<<<<<< @@ -20941,17 +21394,17 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_4exp_filter(CYTHON_UNU } __pyx_L4_break:; - /* "pytesmo/time_series/filters.pyx":94 + /* "pytesmo/time_series/filters.pyx":95 * break * * if found_index > -1: # <<<<<<<<<<<<<< * * for index in range(found_index + 1, in_jd.shape[0]): */ - __pyx_t_10 = (__pyx_v_found_index > -1L); - if (__pyx_t_10) { + __pyx_t_9 = (__pyx_v_found_index > -1L); + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":96 + /* "pytesmo/time_series/filters.pyx":97 * if found_index > -1: * * for index in range(found_index + 1, in_jd.shape[0]): # <<<<<<<<<<<<<< @@ -20960,50 +21413,50 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_4exp_filter(CYTHON_UNU */ __pyx_t_4 = (__pyx_v_in_jd.shape[0]); __pyx_t_8 = __pyx_t_4; - for (__pyx_t_14 = (__pyx_v_found_index + 1); __pyx_t_14 < __pyx_t_8; __pyx_t_14+=1) { - __pyx_v_index = __pyx_t_14; + for (__pyx_t_13 = (__pyx_v_found_index + 1); __pyx_t_13 < __pyx_t_8; __pyx_t_13+=1) { + __pyx_v_index = __pyx_t_13; - /* "pytesmo/time_series/filters.pyx":97 + /* "pytesmo/time_series/filters.pyx":98 * * for index in range(found_index + 1, in_jd.shape[0]): * is_nan = (in_data[index] == nan) or isnan(in_data[index]) # <<<<<<<<<<<<<< * if not is_nan: * tdiff = in_jd[index] - last_jd_var */ - __pyx_t_15 = __pyx_v_index; - __pyx_t_12 = ((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_15 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); - if (!__pyx_t_12) { + __pyx_t_14 = __pyx_v_index; + __pyx_t_11 = ((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_14 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); + if (!__pyx_t_11) { } else { - __pyx_t_10 = __pyx_t_12; + __pyx_t_9 = __pyx_t_11; goto __pyx_L11_bool_binop_done; } - __pyx_t_15 = __pyx_v_index; - __pyx_t_12 = isnan((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_15 * __pyx_v_in_data.strides[0]) )))); - __pyx_t_10 = __pyx_t_12; + __pyx_t_14 = __pyx_v_index; + __pyx_t_11 = isnan((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_14 * __pyx_v_in_data.strides[0]) )))); + __pyx_t_9 = __pyx_t_11; __pyx_L11_bool_binop_done:; - __pyx_v_is_nan = __pyx_t_10; + __pyx_v_is_nan = __pyx_t_9; - /* "pytesmo/time_series/filters.pyx":98 + /* "pytesmo/time_series/filters.pyx":99 * for index in range(found_index + 1, in_jd.shape[0]): * is_nan = (in_data[index] == nan) or isnan(in_data[index]) * if not is_nan: # <<<<<<<<<<<<<< * tdiff = in_jd[index] - last_jd_var * ef = exp(-tdiff / ctime) */ - __pyx_t_10 = (!__pyx_v_is_nan); - if (__pyx_t_10) { + __pyx_t_9 = (!__pyx_v_is_nan); + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":99 + /* "pytesmo/time_series/filters.pyx":100 * is_nan = (in_data[index] == nan) or isnan(in_data[index]) * if not is_nan: * tdiff = in_jd[index] - last_jd_var # <<<<<<<<<<<<<< * ef = exp(-tdiff / ctime) * gain = gain / (gain + ef) */ - __pyx_t_15 = __pyx_v_index; - __pyx_v_tdiff = ((*((float *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_15 * __pyx_v_in_jd.strides[0]) ))) - __pyx_v_last_jd_var); + __pyx_t_14 = __pyx_v_index; + __pyx_v_tdiff = ((*((float *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_14 * __pyx_v_in_jd.strides[0]) ))) - __pyx_v_last_jd_var); - /* "pytesmo/time_series/filters.pyx":100 + /* "pytesmo/time_series/filters.pyx":101 * if not is_nan: * tdiff = in_jd[index] - last_jd_var * ef = exp(-tdiff / ctime) # <<<<<<<<<<<<<< @@ -21012,7 +21465,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_4exp_filter(CYTHON_UNU */ __pyx_v_ef = exp(((-__pyx_v_tdiff) / ((double)__pyx_v_ctime))); - /* "pytesmo/time_series/filters.pyx":101 + /* "pytesmo/time_series/filters.pyx":102 * tdiff = in_jd[index] - last_jd_var * ef = exp(-tdiff / ctime) * gain = gain / (gain + ef) # <<<<<<<<<<<<<< @@ -21021,46 +21474,46 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_4exp_filter(CYTHON_UNU */ __pyx_v_gain = (__pyx_v_gain / (__pyx_v_gain + __pyx_v_ef)); - /* "pytesmo/time_series/filters.pyx":104 + /* "pytesmo/time_series/filters.pyx":105 * filtered[index] = ( * last_filtered_var * + gain * (in_data[index] - last_filtered_var) # <<<<<<<<<<<<<< * ) * last_jd_var = in_jd[index] */ - __pyx_t_15 = __pyx_v_index; + __pyx_t_14 = __pyx_v_index; - /* "pytesmo/time_series/filters.pyx":102 + /* "pytesmo/time_series/filters.pyx":103 * ef = exp(-tdiff / ctime) * gain = gain / (gain + ef) * filtered[index] = ( # <<<<<<<<<<<<<< * last_filtered_var * + gain * (in_data[index] - last_filtered_var) */ - __pyx_t_16 = __pyx_v_index; - *__Pyx_BufPtrStrided1d(float *, __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_filtered.diminfo[0].strides) = (__pyx_v_last_filtered_var + (__pyx_v_gain * ((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_15 * __pyx_v_in_data.strides[0]) ))) - __pyx_v_last_filtered_var))); + __pyx_t_15 = __pyx_v_index; + *__Pyx_BufPtrStrided1d(float *, __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_filtered.diminfo[0].strides) = (__pyx_v_last_filtered_var + (__pyx_v_gain * ((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_14 * __pyx_v_in_data.strides[0]) ))) - __pyx_v_last_filtered_var))); - /* "pytesmo/time_series/filters.pyx":106 + /* "pytesmo/time_series/filters.pyx":107 * + gain * (in_data[index] - last_filtered_var) * ) * last_jd_var = in_jd[index] # <<<<<<<<<<<<<< * last_filtered_var = filtered[index] * */ - __pyx_t_15 = __pyx_v_index; - __pyx_v_last_jd_var = (*((float *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_15 * __pyx_v_in_jd.strides[0]) ))); + __pyx_t_14 = __pyx_v_index; + __pyx_v_last_jd_var = (*((float *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_14 * __pyx_v_in_jd.strides[0]) ))); - /* "pytesmo/time_series/filters.pyx":107 + /* "pytesmo/time_series/filters.pyx":108 * ) * last_jd_var = in_jd[index] * last_filtered_var = filtered[index] # <<<<<<<<<<<<<< * * return filtered */ - __pyx_t_15 = __pyx_v_index; - __pyx_v_last_filtered_var = (*__Pyx_BufPtrStrided1d(float *, __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_filtered.diminfo[0].strides)); + __pyx_t_14 = __pyx_v_index; + __pyx_v_last_filtered_var = (*__Pyx_BufPtrStrided1d(float *, __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_filtered.diminfo[0].strides)); - /* "pytesmo/time_series/filters.pyx":98 + /* "pytesmo/time_series/filters.pyx":99 * for index in range(found_index + 1, in_jd.shape[0]): * is_nan = (in_data[index] == nan) or isnan(in_data[index]) * if not is_nan: # <<<<<<<<<<<<<< @@ -21070,7 +21523,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_4exp_filter(CYTHON_UNU } } - /* "pytesmo/time_series/filters.pyx":94 + /* "pytesmo/time_series/filters.pyx":95 * break * * if found_index > -1: # <<<<<<<<<<<<<< @@ -21079,7 +21532,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_4exp_filter(CYTHON_UNU */ } - /* "pytesmo/time_series/filters.pyx":109 + /* "pytesmo/time_series/filters.pyx":110 * last_filtered_var = filtered[index] * * return filtered # <<<<<<<<<<<<<< @@ -21091,7 +21544,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_4exp_filter(CYTHON_UNU __pyx_r = ((PyObject *)__pyx_v_filtered); goto __pyx_L0; - /* "pytesmo/time_series/filters.pyx":46 + /* "pytesmo/time_series/filters.pyx":47 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -21169,7 +21622,7 @@ static PyObject *__pyx_fuse_1__pyx_pw_7pytesmo_11time_series_7filters_7exp_filte (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -21177,28 +21630,28 @@ static PyObject *__pyx_fuse_1__pyx_pw_7pytesmo_11time_series_7filters_7exp_filte (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("exp_filter", 0, 2, 4, 1); __PYX_ERR(0, 46, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("exp_filter", 0, 2, 4, 1); __PYX_ERR(0, 47, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ctime); if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nan); if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "exp_filter") < 0)) __PYX_ERR(0, 46, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "exp_filter") < 0)) __PYX_ERR(0, 47, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -21212,22 +21665,22 @@ static PyObject *__pyx_fuse_1__pyx_pw_7pytesmo_11time_series_7filters_7exp_filte default: goto __pyx_L5_argtuple_error; } } - __pyx_v_in_data = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_in_data.memview)) __PYX_ERR(0, 49, __pyx_L3_error) - __pyx_v_in_jd = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_in_jd.memview)) __PYX_ERR(0, 50, __pyx_L3_error) + __pyx_v_in_data = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_in_data.memview)) __PYX_ERR(0, 50, __pyx_L3_error) + __pyx_v_in_jd = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_in_jd.memview)) __PYX_ERR(0, 51, __pyx_L3_error) if (values[2]) { - __pyx_v_ctime = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_ctime == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 51, __pyx_L3_error) + __pyx_v_ctime = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_ctime == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 52, __pyx_L3_error) } else { __pyx_v_ctime = ((int)((int)((int)10))); } if (values[3]) { - __pyx_v_nan = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_nan == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 52, __pyx_L3_error) + __pyx_v_nan = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_nan == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 53, __pyx_L3_error) } else { __pyx_v_nan = ((double)((double)((double)-999999.0))); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("exp_filter", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 46, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("exp_filter", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 47, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -21278,17 +21731,16 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_6exp_filter(CYTHON_UNU PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; + unsigned int __pyx_t_6; PyArrayObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; - unsigned int __pyx_t_9; - int __pyx_t_10; - size_t __pyx_t_11; - int __pyx_t_12; - size_t __pyx_t_13; + int __pyx_t_9; + size_t __pyx_t_10; + int __pyx_t_11; + size_t __pyx_t_12; + Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; - Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -21298,20 +21750,20 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_6exp_filter(CYTHON_UNU __pyx_pybuffernd_filtered.data = NULL; __pyx_pybuffernd_filtered.rcbuffer = &__pyx_pybuffer_filtered; - /* "pytesmo/time_series/filters.pyx":69 + /* "pytesmo/time_series/filters.pyx":70 * nan values to exclude from calculation * """ - * cdef np.ndarray[floating, ndim = 1] filtered = np.empty(len(in_data)) # <<<<<<<<<<<<<< + * cdef cnp.ndarray[floating, ndim = 1] filtered = np.empty(len(in_data)) # <<<<<<<<<<<<<< * cdef double tdiff * cdef float ef */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_MemoryView_Len(__pyx_v_in_data); - __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -21332,17 +21784,17 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_6exp_filter(CYTHON_UNU __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 69, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 70, __pyx_L1_error) __pyx_t_7 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_filtered.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_filtered = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 69, __pyx_L1_error) + __PYX_ERR(0, 70, __pyx_L1_error) } else {__pyx_pybuffernd_filtered.diminfo[0].strides = __pyx_pybuffernd_filtered.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_filtered.diminfo[0].shape = __pyx_pybuffernd_filtered.rcbuffer->pybuffer.shape[0]; } } @@ -21350,7 +21802,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_6exp_filter(CYTHON_UNU __pyx_v_filtered = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "pytesmo/time_series/filters.pyx":72 + /* "pytesmo/time_series/filters.pyx":73 * cdef double tdiff * cdef float ef * cdef float gain = 1 # <<<<<<<<<<<<<< @@ -21359,7 +21811,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_6exp_filter(CYTHON_UNU */ __pyx_v_gain = 1.0; - /* "pytesmo/time_series/filters.pyx":77 + /* "pytesmo/time_series/filters.pyx":78 * cdef double last_filtered_var * cdef unsigned int i * cdef int found_index = -1 # <<<<<<<<<<<<<< @@ -21368,18 +21820,18 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_6exp_filter(CYTHON_UNU */ __pyx_v_found_index = -1; - /* "pytesmo/time_series/filters.pyx":79 + /* "pytesmo/time_series/filters.pyx":80 * cdef int found_index = -1 * * filtered.fill(np.nan) # <<<<<<<<<<<<<< * * # find the first non nan value in the time series */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_filtered), __pyx_n_s_fill); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_filtered), __pyx_n_s_fill); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -21401,13 +21853,13 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_6exp_filter(CYTHON_UNU __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pytesmo/time_series/filters.pyx":83 + /* "pytesmo/time_series/filters.pyx":84 * # find the first non nan value in the time series * * for i in range(in_jd.shape[0]): # <<<<<<<<<<<<<< @@ -21416,71 +21868,71 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_6exp_filter(CYTHON_UNU */ __pyx_t_4 = (__pyx_v_in_jd.shape[0]); __pyx_t_8 = __pyx_t_4; - for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { - __pyx_v_i = __pyx_t_9; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_8; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; - /* "pytesmo/time_series/filters.pyx":85 + /* "pytesmo/time_series/filters.pyx":86 * for i in range(in_jd.shape[0]): * * is_nan = (in_data[i] == nan) or isnan(in_data[i]) # <<<<<<<<<<<<<< * if not is_nan: * last_jd_var = in_jd[i] */ - __pyx_t_11 = __pyx_v_i; - __pyx_t_12 = ((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_11 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); - if (!__pyx_t_12) { + __pyx_t_10 = __pyx_v_i; + __pyx_t_11 = ((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_10 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); + if (!__pyx_t_11) { } else { - __pyx_t_10 = __pyx_t_12; + __pyx_t_9 = __pyx_t_11; goto __pyx_L5_bool_binop_done; } - __pyx_t_11 = __pyx_v_i; - __pyx_t_12 = isnan((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_11 * __pyx_v_in_data.strides[0]) )))); - __pyx_t_10 = __pyx_t_12; + __pyx_t_10 = __pyx_v_i; + __pyx_t_11 = isnan((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_10 * __pyx_v_in_data.strides[0]) )))); + __pyx_t_9 = __pyx_t_11; __pyx_L5_bool_binop_done:; - __pyx_v_is_nan = __pyx_t_10; + __pyx_v_is_nan = __pyx_t_9; - /* "pytesmo/time_series/filters.pyx":86 + /* "pytesmo/time_series/filters.pyx":87 * * is_nan = (in_data[i] == nan) or isnan(in_data[i]) * if not is_nan: # <<<<<<<<<<<<<< * last_jd_var = in_jd[i] * last_filtered_var = in_data[i] */ - __pyx_t_10 = (!__pyx_v_is_nan); - if (__pyx_t_10) { + __pyx_t_9 = (!__pyx_v_is_nan); + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":87 + /* "pytesmo/time_series/filters.pyx":88 * is_nan = (in_data[i] == nan) or isnan(in_data[i]) * if not is_nan: * last_jd_var = in_jd[i] # <<<<<<<<<<<<<< * last_filtered_var = in_data[i] * # set the first filtered value to the first found non nan value */ - __pyx_t_11 = __pyx_v_i; - __pyx_v_last_jd_var = (*((double *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_11 * __pyx_v_in_jd.strides[0]) ))); + __pyx_t_10 = __pyx_v_i; + __pyx_v_last_jd_var = (*((double *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_10 * __pyx_v_in_jd.strides[0]) ))); - /* "pytesmo/time_series/filters.pyx":88 + /* "pytesmo/time_series/filters.pyx":89 * if not is_nan: * last_jd_var = in_jd[i] * last_filtered_var = in_data[i] # <<<<<<<<<<<<<< * # set the first filtered value to the first found non nan value * filtered[i] = in_data[i] */ - __pyx_t_11 = __pyx_v_i; - __pyx_v_last_filtered_var = (*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_11 * __pyx_v_in_data.strides[0]) ))); + __pyx_t_10 = __pyx_v_i; + __pyx_v_last_filtered_var = (*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_10 * __pyx_v_in_data.strides[0]) ))); - /* "pytesmo/time_series/filters.pyx":90 + /* "pytesmo/time_series/filters.pyx":91 * last_filtered_var = in_data[i] * # set the first filtered value to the first found non nan value * filtered[i] = in_data[i] # <<<<<<<<<<<<<< * found_index = i * break */ - __pyx_t_11 = __pyx_v_i; - __pyx_t_13 = __pyx_v_i; - *__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_filtered.diminfo[0].strides) = (*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_11 * __pyx_v_in_data.strides[0]) ))); + __pyx_t_10 = __pyx_v_i; + __pyx_t_12 = __pyx_v_i; + *__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_filtered.diminfo[0].strides) = (*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_10 * __pyx_v_in_data.strides[0]) ))); - /* "pytesmo/time_series/filters.pyx":91 + /* "pytesmo/time_series/filters.pyx":92 * # set the first filtered value to the first found non nan value * filtered[i] = in_data[i] * found_index = i # <<<<<<<<<<<<<< @@ -21489,7 +21941,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_6exp_filter(CYTHON_UNU */ __pyx_v_found_index = __pyx_v_i; - /* "pytesmo/time_series/filters.pyx":92 + /* "pytesmo/time_series/filters.pyx":93 * filtered[i] = in_data[i] * found_index = i * break # <<<<<<<<<<<<<< @@ -21498,7 +21950,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_6exp_filter(CYTHON_UNU */ goto __pyx_L4_break; - /* "pytesmo/time_series/filters.pyx":86 + /* "pytesmo/time_series/filters.pyx":87 * * is_nan = (in_data[i] == nan) or isnan(in_data[i]) * if not is_nan: # <<<<<<<<<<<<<< @@ -21509,17 +21961,17 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_6exp_filter(CYTHON_UNU } __pyx_L4_break:; - /* "pytesmo/time_series/filters.pyx":94 + /* "pytesmo/time_series/filters.pyx":95 * break * * if found_index > -1: # <<<<<<<<<<<<<< * * for index in range(found_index + 1, in_jd.shape[0]): */ - __pyx_t_10 = (__pyx_v_found_index > -1L); - if (__pyx_t_10) { + __pyx_t_9 = (__pyx_v_found_index > -1L); + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":96 + /* "pytesmo/time_series/filters.pyx":97 * if found_index > -1: * * for index in range(found_index + 1, in_jd.shape[0]): # <<<<<<<<<<<<<< @@ -21528,50 +21980,50 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_6exp_filter(CYTHON_UNU */ __pyx_t_4 = (__pyx_v_in_jd.shape[0]); __pyx_t_8 = __pyx_t_4; - for (__pyx_t_14 = (__pyx_v_found_index + 1); __pyx_t_14 < __pyx_t_8; __pyx_t_14+=1) { - __pyx_v_index = __pyx_t_14; + for (__pyx_t_13 = (__pyx_v_found_index + 1); __pyx_t_13 < __pyx_t_8; __pyx_t_13+=1) { + __pyx_v_index = __pyx_t_13; - /* "pytesmo/time_series/filters.pyx":97 + /* "pytesmo/time_series/filters.pyx":98 * * for index in range(found_index + 1, in_jd.shape[0]): * is_nan = (in_data[index] == nan) or isnan(in_data[index]) # <<<<<<<<<<<<<< * if not is_nan: * tdiff = in_jd[index] - last_jd_var */ - __pyx_t_15 = __pyx_v_index; - __pyx_t_12 = ((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_15 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); - if (!__pyx_t_12) { + __pyx_t_14 = __pyx_v_index; + __pyx_t_11 = ((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_14 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); + if (!__pyx_t_11) { } else { - __pyx_t_10 = __pyx_t_12; + __pyx_t_9 = __pyx_t_11; goto __pyx_L11_bool_binop_done; } - __pyx_t_15 = __pyx_v_index; - __pyx_t_12 = isnan((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_15 * __pyx_v_in_data.strides[0]) )))); - __pyx_t_10 = __pyx_t_12; + __pyx_t_14 = __pyx_v_index; + __pyx_t_11 = isnan((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_14 * __pyx_v_in_data.strides[0]) )))); + __pyx_t_9 = __pyx_t_11; __pyx_L11_bool_binop_done:; - __pyx_v_is_nan = __pyx_t_10; + __pyx_v_is_nan = __pyx_t_9; - /* "pytesmo/time_series/filters.pyx":98 + /* "pytesmo/time_series/filters.pyx":99 * for index in range(found_index + 1, in_jd.shape[0]): * is_nan = (in_data[index] == nan) or isnan(in_data[index]) * if not is_nan: # <<<<<<<<<<<<<< * tdiff = in_jd[index] - last_jd_var * ef = exp(-tdiff / ctime) */ - __pyx_t_10 = (!__pyx_v_is_nan); - if (__pyx_t_10) { + __pyx_t_9 = (!__pyx_v_is_nan); + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":99 + /* "pytesmo/time_series/filters.pyx":100 * is_nan = (in_data[index] == nan) or isnan(in_data[index]) * if not is_nan: * tdiff = in_jd[index] - last_jd_var # <<<<<<<<<<<<<< * ef = exp(-tdiff / ctime) * gain = gain / (gain + ef) */ - __pyx_t_15 = __pyx_v_index; - __pyx_v_tdiff = ((*((double *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_15 * __pyx_v_in_jd.strides[0]) ))) - __pyx_v_last_jd_var); + __pyx_t_14 = __pyx_v_index; + __pyx_v_tdiff = ((*((double *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_14 * __pyx_v_in_jd.strides[0]) ))) - __pyx_v_last_jd_var); - /* "pytesmo/time_series/filters.pyx":100 + /* "pytesmo/time_series/filters.pyx":101 * if not is_nan: * tdiff = in_jd[index] - last_jd_var * ef = exp(-tdiff / ctime) # <<<<<<<<<<<<<< @@ -21580,7 +22032,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_6exp_filter(CYTHON_UNU */ __pyx_v_ef = exp(((-__pyx_v_tdiff) / ((double)__pyx_v_ctime))); - /* "pytesmo/time_series/filters.pyx":101 + /* "pytesmo/time_series/filters.pyx":102 * tdiff = in_jd[index] - last_jd_var * ef = exp(-tdiff / ctime) * gain = gain / (gain + ef) # <<<<<<<<<<<<<< @@ -21589,46 +22041,46 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_6exp_filter(CYTHON_UNU */ __pyx_v_gain = (__pyx_v_gain / (__pyx_v_gain + __pyx_v_ef)); - /* "pytesmo/time_series/filters.pyx":104 + /* "pytesmo/time_series/filters.pyx":105 * filtered[index] = ( * last_filtered_var * + gain * (in_data[index] - last_filtered_var) # <<<<<<<<<<<<<< * ) * last_jd_var = in_jd[index] */ - __pyx_t_15 = __pyx_v_index; + __pyx_t_14 = __pyx_v_index; - /* "pytesmo/time_series/filters.pyx":102 + /* "pytesmo/time_series/filters.pyx":103 * ef = exp(-tdiff / ctime) * gain = gain / (gain + ef) * filtered[index] = ( # <<<<<<<<<<<<<< * last_filtered_var * + gain * (in_data[index] - last_filtered_var) */ - __pyx_t_16 = __pyx_v_index; - *__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_filtered.diminfo[0].strides) = (__pyx_v_last_filtered_var + (__pyx_v_gain * ((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_15 * __pyx_v_in_data.strides[0]) ))) - __pyx_v_last_filtered_var))); + __pyx_t_15 = __pyx_v_index; + *__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_filtered.diminfo[0].strides) = (__pyx_v_last_filtered_var + (__pyx_v_gain * ((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_14 * __pyx_v_in_data.strides[0]) ))) - __pyx_v_last_filtered_var))); - /* "pytesmo/time_series/filters.pyx":106 + /* "pytesmo/time_series/filters.pyx":107 * + gain * (in_data[index] - last_filtered_var) * ) * last_jd_var = in_jd[index] # <<<<<<<<<<<<<< * last_filtered_var = filtered[index] * */ - __pyx_t_15 = __pyx_v_index; - __pyx_v_last_jd_var = (*((double *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_15 * __pyx_v_in_jd.strides[0]) ))); + __pyx_t_14 = __pyx_v_index; + __pyx_v_last_jd_var = (*((double *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_14 * __pyx_v_in_jd.strides[0]) ))); - /* "pytesmo/time_series/filters.pyx":107 + /* "pytesmo/time_series/filters.pyx":108 * ) * last_jd_var = in_jd[index] * last_filtered_var = filtered[index] # <<<<<<<<<<<<<< * * return filtered */ - __pyx_t_15 = __pyx_v_index; - __pyx_v_last_filtered_var = (*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_filtered.diminfo[0].strides)); + __pyx_t_14 = __pyx_v_index; + __pyx_v_last_filtered_var = (*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_filtered.diminfo[0].strides)); - /* "pytesmo/time_series/filters.pyx":98 + /* "pytesmo/time_series/filters.pyx":99 * for index in range(found_index + 1, in_jd.shape[0]): * is_nan = (in_data[index] == nan) or isnan(in_data[index]) * if not is_nan: # <<<<<<<<<<<<<< @@ -21638,7 +22090,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_6exp_filter(CYTHON_UNU } } - /* "pytesmo/time_series/filters.pyx":94 + /* "pytesmo/time_series/filters.pyx":95 * break * * if found_index > -1: # <<<<<<<<<<<<<< @@ -21647,7 +22099,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_6exp_filter(CYTHON_UNU */ } - /* "pytesmo/time_series/filters.pyx":109 + /* "pytesmo/time_series/filters.pyx":110 * last_filtered_var = filtered[index] * * return filtered # <<<<<<<<<<<<<< @@ -21659,7 +22111,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_6exp_filter(CYTHON_UNU __pyx_r = ((PyObject *)__pyx_v_filtered); goto __pyx_L0; - /* "pytesmo/time_series/filters.pyx":46 + /* "pytesmo/time_series/filters.pyx":47 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -21691,7 +22143,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_6exp_filter(CYTHON_UNU return __pyx_r; } -/* "pytesmo/time_series/filters.pyx":112 +/* "pytesmo/time_series/filters.pyx":113 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -21751,7 +22203,7 @@ static PyObject *__pyx_pw_7pytesmo_11time_series_7filters_3boxcar_filter(PyObjec (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -21759,9 +22211,9 @@ static PyObject *__pyx_pw_7pytesmo_11time_series_7filters_3boxcar_filter(PyObjec (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 112, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 113, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -21769,9 +22221,9 @@ static PyObject *__pyx_pw_7pytesmo_11time_series_7filters_3boxcar_filter(PyObjec (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 112, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 113, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -21779,21 +22231,21 @@ static PyObject *__pyx_pw_7pytesmo_11time_series_7filters_3boxcar_filter(PyObjec (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 112, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 113, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 112, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 113, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -21815,7 +22267,7 @@ static PyObject *__pyx_pw_7pytesmo_11time_series_7filters_3boxcar_filter(PyObjec } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 112, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 113, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -21886,18 +22338,19 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; - Py_ssize_t __pyx_t_18; - int __pyx_t_19; + unsigned int __pyx_t_18; + Py_ssize_t __pyx_t_19; + int __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("boxcar_filter", 0); __Pyx_INCREF(__pyx_v_kwargs); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 112, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 113, __pyx_L1_error); __pyx_v_dest_sig = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_v_kwargs != Py_None); @@ -21906,7 +22359,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 113, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_3); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; @@ -21914,21 +22367,21 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None); } - __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_v_itemsize = -1L; if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 113, __pyx_L1_error) __pyx_t_2 = (0 < __pyx_t_5); if (__pyx_t_2) { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0); __Pyx_INCREF(__pyx_t_1); @@ -21944,17 +22397,17 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_in_data, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_in_data, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 113, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L7_bool_binop_done:; if (likely(__pyx_t_2)) { if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_in_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_in_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_arg = __pyx_t_1; __pyx_t_1 = 0; @@ -21963,31 +22416,31 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ /*else*/ { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 112, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 113, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 112, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2)) __PYX_ERR(0, 113, __pyx_L1_error); __Pyx_INCREF(__pyx_n_s_s); __Pyx_GIVEREF(__pyx_n_s_s); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 112, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 113, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) } __pyx_L6:; while (1) { @@ -21995,7 +22448,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ if (__pyx_t_2) { __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -22003,13 +22456,13 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ } __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_base = __pyx_t_6; __pyx_t_6 = 0; __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; @@ -22030,14 +22483,14 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ __pyx_v_itemsize = -1L; __pyx_t_2 = (__pyx_v_dtype != Py_None); if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_itemsize = __pyx_t_5; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_kind = __pyx_t_7; __pyx_v_dtype_signed = (__pyx_v_kind == 0x69); @@ -22052,15 +22505,15 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ __pyx_t_2 = __pyx_t_4; goto __pyx_L16_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L16_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 113, __pyx_L1_error) goto __pyx_L10_break; } __pyx_t_4 = ((sizeof(double)) == __pyx_v_itemsize); @@ -22069,15 +22522,15 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ __pyx_t_2 = __pyx_t_4; goto __pyx_L19_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 1); __pyx_t_2 = __pyx_t_4; __pyx_L19_bool_binop_done:; if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 113, __pyx_L1_error) goto __pyx_L10_break; } break; @@ -22091,7 +22544,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ } __pyx_t_2 = (__pyx_v_arg == Py_None); if (__pyx_t_2) { - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 113, __pyx_L1_error) goto __pyx_L10_break; } { @@ -22102,7 +22555,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L22_error) + __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_arg_as_memoryview = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; @@ -22113,7 +22566,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ goto __pyx_L33_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(float))); if (!__pyx_t_4) { } else { @@ -22127,7 +22580,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ goto __pyx_L31_bool_binop_done; } __pyx_L32_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L31_bool_binop_done:; @@ -22137,7 +22590,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 112, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 113, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -22149,7 +22602,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ goto __pyx_L39_next_or; } else { } - __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L24_except_error) + __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_5 == (sizeof(double))); if (!__pyx_t_4) { } else { @@ -22163,7 +22616,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ goto __pyx_L37_bool_binop_done; } __pyx_L38_next_and:; - __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L24_except_error) + __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L24_except_error) __pyx_t_4 = (__pyx_t_11 == 1); __pyx_t_2 = __pyx_t_4; __pyx_L37_bool_binop_done:; @@ -22173,7 +22626,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ __pyx_t_2 = (__pyx_v_memslice.memview != 0); if (__pyx_t_2) { __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1); - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 112, __pyx_L24_except_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 113, __pyx_L24_except_error) goto __pyx_L27_try_break; } /*else*/ { @@ -22191,7 +22644,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ __pyx_t_11 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_ValueError, __pyx_builtin_TypeError); if (__pyx_t_11) { __Pyx_AddTraceback("pytesmo.time_series.filters.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 112, __pyx_L24_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 113, __pyx_L24_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_13); @@ -22220,19 +22673,19 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L29_try_end:; } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 113, __pyx_L1_error) goto __pyx_L10_break; } __pyx_L10_break:; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 113, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_2); if (__pyx_t_4) { __pyx_t_5 = 0; if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) } - __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = __pyx_t_1; @@ -22240,7 +22693,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ while (1) { __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_13, __pyx_t_14, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_11); if (unlikely(__pyx_t_15 == 0)) break; - if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 112, __pyx_L1_error) + if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1); __pyx_t_1 = 0; @@ -22248,10 +22701,10 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16); @@ -22260,23 +22713,23 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_kp_s__11}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; - __pyx_t_15 = 0; + __pyx_t_18 = 0; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_16))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_16); @@ -22285,34 +22738,34 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); - __pyx_t_15 = 1; + __pyx_t_18 = 1; } } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s__12}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_18 = PyList_GET_SIZE(__pyx_t_16); - if (unlikely(__pyx_t_18 < 1)) { - __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_18); __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_19 = PyList_GET_SIZE(__pyx_t_16); + if (unlikely(__pyx_t_19 < 1)) { + __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_19); __PYX_ERR(0, 113, __pyx_L1_error) } #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_19-1); ((PyVarObject*)__pyx_t_16)->ob_size--; #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_18-1); + __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_19-1); #endif __Pyx_GOTREF(__pyx_t_6); #if !CYTHON_COMPILING_IN_CPYTHON - __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_18-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_19-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = __pyx_t_17; __pyx_t_17 = NULL; @@ -22324,36 +22777,36 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 113, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 113, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 113, __pyx_L1_error) if (__pyx_t_4) { - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -22362,9 +22815,9 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ /*else*/ { if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = __pyx_t_6; __Pyx_INCREF(__pyx_t_16); @@ -22377,21 +22830,21 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_sigindex_node == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 113, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } - __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v__fused_sigindex); __Pyx_GIVEREF(__pyx_v__fused_sigindex); - if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 112, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 113, __pyx_L1_error); __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_13); @@ -22400,23 +22853,23 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 113, __pyx_L1_error) #endif if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 113, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; @@ -22428,25 +22881,25 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 113, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 113, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -22456,85 +22909,85 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 113, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 113, __pyx_L1_error) #else - __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16); __pyx_t_16 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) } - __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L53; } /*else*/ { - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sigindex_matches); __Pyx_GIVEREF(__pyx_v_sigindex_matches); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 112, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 113, __pyx_L1_error); __Pyx_INCREF(__pyx_v_sigindex_candidates); __Pyx_GIVEREF(__pyx_v_sigindex_candidates); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 112, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 113, __pyx_L1_error); __pyx_t_16 = __pyx_t_1; __Pyx_INCREF(__pyx_t_16); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_5 >= 2) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 113, __pyx_L1_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; if (unlikely(__pyx_v_search_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) } __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1); - __pyx_t_18 = 0; + __pyx_t_19 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 113, __pyx_L1_error) #endif - if (__pyx_t_18 >= __pyx_temp) break; + if (__pyx_t_19 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 113, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_sn == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__pyx_v_type_match != Py_None); if (__pyx_t_4) { - __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 113, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -22571,28 +23024,28 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_2boxcar_filter(CYTHON_ __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0); __pyx_t_4 = (!__pyx_t_2); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) } - __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 113, __pyx_L1_error) __pyx_t_4 = (__pyx_t_14 > 1); if (unlikely(__pyx_t_4)) { - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_t_13, 0, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) } /*else*/ { __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_signatures == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) } - __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_r = __pyx_t_13; __pyx_t_13 = 0; @@ -22687,7 +23140,7 @@ static PyObject *__pyx_fuse_0__pyx_pw_7pytesmo_11time_series_7filters_11boxcar_f (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -22695,42 +23148,42 @@ static PyObject *__pyx_fuse_0__pyx_pw_7pytesmo_11time_series_7filters_11boxcar_f (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("boxcar_filter", 0, 2, 6, 1); __PYX_ERR(0, 112, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("boxcar_filter", 0, 2, 6, 1); __PYX_ERR(0, 113, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_window); if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nan); if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fillna); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_min_obs); if (value) { values[5] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "boxcar_filter") < 0)) __PYX_ERR(0, 112, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "boxcar_filter") < 0)) __PYX_ERR(0, 113, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -22748,32 +23201,32 @@ static PyObject *__pyx_fuse_0__pyx_pw_7pytesmo_11time_series_7filters_11boxcar_f default: goto __pyx_L5_argtuple_error; } } - __pyx_v_in_data = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_in_data.memview)) __PYX_ERR(0, 115, __pyx_L3_error) - __pyx_v_in_jd = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_in_jd.memview)) __PYX_ERR(0, 116, __pyx_L3_error) + __pyx_v_in_data = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_in_data.memview)) __PYX_ERR(0, 116, __pyx_L3_error) + __pyx_v_in_jd = __Pyx_PyObject_to_MemoryviewSlice_ds_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_in_jd.memview)) __PYX_ERR(0, 117, __pyx_L3_error) if (values[2]) { - __pyx_v_window = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_window == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 117, __pyx_L3_error) + __pyx_v_window = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_window == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L3_error) } else { __pyx_v_window = ((float)((float)((float)1.0))); } if (values[3]) { - __pyx_v_nan = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_nan == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 117, __pyx_L3_error) + __pyx_v_nan = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_nan == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L3_error) } else { __pyx_v_nan = ((double)((double)((double)-999999.0))); } if (values[4]) { - __pyx_v_fillna = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_fillna == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L3_error) + __pyx_v_fillna = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_fillna == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error) } else { __pyx_v_fillna = ((int)((int)((int)0))); } if (values[5]) { - __pyx_v_min_obs = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_min_obs == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L3_error) + __pyx_v_min_obs = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_min_obs == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error) } else { __pyx_v_min_obs = ((int)((int)((int)1))); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("boxcar_filter", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 112, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("boxcar_filter", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 113, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -22822,17 +23275,16 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; + unsigned int __pyx_t_6; PyArrayObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; - unsigned int __pyx_t_9; - int __pyx_t_10; - size_t __pyx_t_11; - int __pyx_t_12; + int __pyx_t_9; + size_t __pyx_t_10; + int __pyx_t_11; + Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; - Py_ssize_t __pyx_t_14; - unsigned int __pyx_t_15; - size_t __pyx_t_16; + unsigned int __pyx_t_14; + size_t __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -22842,20 +23294,20 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON __pyx_pybuffernd_filtered.data = NULL; __pyx_pybuffernd_filtered.rcbuffer = &__pyx_pybuffer_filtered; - /* "pytesmo/time_series/filters.pyx":135 + /* "pytesmo/time_series/filters.pyx":136 * nan values to exclude from calculation * """ - * cdef np.ndarray[floating, ndim = 1] filtered = np.empty(len(in_data)) # <<<<<<<<<<<<<< + * cdef cnp.ndarray[floating, ndim = 1] filtered = np.empty(len(in_data)) # <<<<<<<<<<<<<< * cdef double tdiff * cdef unsigned int i */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_MemoryView_Len(__pyx_v_in_data); - __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -22876,17 +23328,17 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 135, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 136, __pyx_L1_error) __pyx_t_7 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_filtered.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_filtered = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 135, __pyx_L1_error) + __PYX_ERR(0, 136, __pyx_L1_error) } else {__pyx_pybuffernd_filtered.diminfo[0].strides = __pyx_pybuffernd_filtered.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_filtered.diminfo[0].shape = __pyx_pybuffernd_filtered.rcbuffer->pybuffer.shape[0]; } } @@ -22894,7 +23346,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON __pyx_v_filtered = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "pytesmo/time_series/filters.pyx":140 + /* "pytesmo/time_series/filters.pyx":141 * cdef unsigned int j * cdef bint is_nan * cdef double sum = 0 # <<<<<<<<<<<<<< @@ -22903,7 +23355,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON */ __pyx_v_sum = 0.0; - /* "pytesmo/time_series/filters.pyx":141 + /* "pytesmo/time_series/filters.pyx":142 * cdef bint is_nan * cdef double sum = 0 * cdef double limit = window / 2.0 # <<<<<<<<<<<<<< @@ -22912,7 +23364,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON */ __pyx_v_limit = (((double)__pyx_v_window) / 2.0); - /* "pytesmo/time_series/filters.pyx":142 + /* "pytesmo/time_series/filters.pyx":143 * cdef double sum = 0 * cdef double limit = window / 2.0 * cdef int nobs = 0 # <<<<<<<<<<<<<< @@ -22921,18 +23373,18 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON */ __pyx_v_nobs = 0; - /* "pytesmo/time_series/filters.pyx":144 + /* "pytesmo/time_series/filters.pyx":145 * cdef int nobs = 0 * * filtered.fill(np.nan) # <<<<<<<<<<<<<< * * for i in range(in_jd.shape[0]): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_filtered), __pyx_n_s_fill); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_filtered), __pyx_n_s_fill); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -22954,13 +23406,13 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pytesmo/time_series/filters.pyx":146 + /* "pytesmo/time_series/filters.pyx":147 * filtered.fill(np.nan) * * for i in range(in_jd.shape[0]): # <<<<<<<<<<<<<< @@ -22969,47 +23421,47 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON */ __pyx_t_4 = (__pyx_v_in_jd.shape[0]); __pyx_t_8 = __pyx_t_4; - for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { - __pyx_v_i = __pyx_t_9; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_8; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; - /* "pytesmo/time_series/filters.pyx":147 + /* "pytesmo/time_series/filters.pyx":148 * * for i in range(in_jd.shape[0]): * is_nan = (in_data[i] == nan) or isnan(in_data[i]) # <<<<<<<<<<<<<< * if (not is_nan) or fillna: * sum = 0 */ - __pyx_t_11 = __pyx_v_i; - __pyx_t_12 = ((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_11 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); - if (!__pyx_t_12) { + __pyx_t_10 = __pyx_v_i; + __pyx_t_11 = ((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_10 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); + if (!__pyx_t_11) { } else { - __pyx_t_10 = __pyx_t_12; + __pyx_t_9 = __pyx_t_11; goto __pyx_L5_bool_binop_done; } - __pyx_t_11 = __pyx_v_i; - __pyx_t_12 = isnan((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_11 * __pyx_v_in_data.strides[0]) )))); - __pyx_t_10 = __pyx_t_12; + __pyx_t_10 = __pyx_v_i; + __pyx_t_11 = isnan((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_10 * __pyx_v_in_data.strides[0]) )))); + __pyx_t_9 = __pyx_t_11; __pyx_L5_bool_binop_done:; - __pyx_v_is_nan = __pyx_t_10; + __pyx_v_is_nan = __pyx_t_9; - /* "pytesmo/time_series/filters.pyx":148 + /* "pytesmo/time_series/filters.pyx":149 * for i in range(in_jd.shape[0]): * is_nan = (in_data[i] == nan) or isnan(in_data[i]) * if (not is_nan) or fillna: # <<<<<<<<<<<<<< * sum = 0 * nobs = 0 */ - __pyx_t_12 = (!__pyx_v_is_nan); - if (!__pyx_t_12) { + __pyx_t_11 = (!__pyx_v_is_nan); + if (!__pyx_t_11) { } else { - __pyx_t_10 = __pyx_t_12; + __pyx_t_9 = __pyx_t_11; goto __pyx_L8_bool_binop_done; } - __pyx_t_10 = __pyx_v_fillna; + __pyx_t_9 = __pyx_v_fillna; __pyx_L8_bool_binop_done:; - if (__pyx_t_10) { + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":149 + /* "pytesmo/time_series/filters.pyx":150 * is_nan = (in_data[i] == nan) or isnan(in_data[i]) * if (not is_nan) or fillna: * sum = 0 # <<<<<<<<<<<<<< @@ -23018,7 +23470,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON */ __pyx_v_sum = 0.0; - /* "pytesmo/time_series/filters.pyx":150 + /* "pytesmo/time_series/filters.pyx":151 * if (not is_nan) or fillna: * sum = 0 * nobs = 0 # <<<<<<<<<<<<<< @@ -23027,80 +23479,80 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON */ __pyx_v_nobs = 0; - /* "pytesmo/time_series/filters.pyx":151 + /* "pytesmo/time_series/filters.pyx":152 * sum = 0 * nobs = 0 * for j in range(i, in_jd.shape[0]): # <<<<<<<<<<<<<< * is_nan = (in_data[j] == nan) or isnan(in_data[j]) * if not is_nan: */ - __pyx_t_13 = (__pyx_v_in_jd.shape[0]); - __pyx_t_14 = __pyx_t_13; - for (__pyx_t_15 = __pyx_v_i; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { - __pyx_v_j = __pyx_t_15; + __pyx_t_12 = (__pyx_v_in_jd.shape[0]); + __pyx_t_13 = __pyx_t_12; + for (__pyx_t_14 = __pyx_v_i; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { + __pyx_v_j = __pyx_t_14; - /* "pytesmo/time_series/filters.pyx":152 + /* "pytesmo/time_series/filters.pyx":153 * nobs = 0 * for j in range(i, in_jd.shape[0]): * is_nan = (in_data[j] == nan) or isnan(in_data[j]) # <<<<<<<<<<<<<< * if not is_nan: * tdiff = in_jd[j] - in_jd[i] */ - __pyx_t_11 = __pyx_v_j; - __pyx_t_12 = ((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_11 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); - if (!__pyx_t_12) { + __pyx_t_10 = __pyx_v_j; + __pyx_t_11 = ((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_10 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); + if (!__pyx_t_11) { } else { - __pyx_t_10 = __pyx_t_12; + __pyx_t_9 = __pyx_t_11; goto __pyx_L12_bool_binop_done; } - __pyx_t_11 = __pyx_v_j; - __pyx_t_12 = isnan((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_11 * __pyx_v_in_data.strides[0]) )))); - __pyx_t_10 = __pyx_t_12; + __pyx_t_10 = __pyx_v_j; + __pyx_t_11 = isnan((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_10 * __pyx_v_in_data.strides[0]) )))); + __pyx_t_9 = __pyx_t_11; __pyx_L12_bool_binop_done:; - __pyx_v_is_nan = __pyx_t_10; + __pyx_v_is_nan = __pyx_t_9; - /* "pytesmo/time_series/filters.pyx":153 + /* "pytesmo/time_series/filters.pyx":154 * for j in range(i, in_jd.shape[0]): * is_nan = (in_data[j] == nan) or isnan(in_data[j]) * if not is_nan: # <<<<<<<<<<<<<< * tdiff = in_jd[j] - in_jd[i] * if fabs(tdiff) <= limit: */ - __pyx_t_10 = (!__pyx_v_is_nan); - if (__pyx_t_10) { + __pyx_t_9 = (!__pyx_v_is_nan); + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":154 + /* "pytesmo/time_series/filters.pyx":155 * is_nan = (in_data[j] == nan) or isnan(in_data[j]) * if not is_nan: * tdiff = in_jd[j] - in_jd[i] # <<<<<<<<<<<<<< * if fabs(tdiff) <= limit: * sum = sum + in_data[j] */ - __pyx_t_11 = __pyx_v_j; - __pyx_t_16 = __pyx_v_i; - __pyx_v_tdiff = ((*((float *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_11 * __pyx_v_in_jd.strides[0]) ))) - (*((float *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_16 * __pyx_v_in_jd.strides[0]) )))); + __pyx_t_10 = __pyx_v_j; + __pyx_t_15 = __pyx_v_i; + __pyx_v_tdiff = ((*((float *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_10 * __pyx_v_in_jd.strides[0]) ))) - (*((float *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_15 * __pyx_v_in_jd.strides[0]) )))); - /* "pytesmo/time_series/filters.pyx":155 + /* "pytesmo/time_series/filters.pyx":156 * if not is_nan: * tdiff = in_jd[j] - in_jd[i] * if fabs(tdiff) <= limit: # <<<<<<<<<<<<<< * sum = sum + in_data[j] * nobs = nobs + 1 */ - __pyx_t_10 = (fabs(__pyx_v_tdiff) <= __pyx_v_limit); - if (__pyx_t_10) { + __pyx_t_9 = (fabs(__pyx_v_tdiff) <= __pyx_v_limit); + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":156 + /* "pytesmo/time_series/filters.pyx":157 * tdiff = in_jd[j] - in_jd[i] * if fabs(tdiff) <= limit: * sum = sum + in_data[j] # <<<<<<<<<<<<<< * nobs = nobs + 1 * else: */ - __pyx_t_16 = __pyx_v_j; - __pyx_v_sum = (__pyx_v_sum + (*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_16 * __pyx_v_in_data.strides[0]) )))); + __pyx_t_15 = __pyx_v_j; + __pyx_v_sum = (__pyx_v_sum + (*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_15 * __pyx_v_in_data.strides[0]) )))); - /* "pytesmo/time_series/filters.pyx":157 + /* "pytesmo/time_series/filters.pyx":158 * if fabs(tdiff) <= limit: * sum = sum + in_data[j] * nobs = nobs + 1 # <<<<<<<<<<<<<< @@ -23109,7 +23561,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON */ __pyx_v_nobs = (__pyx_v_nobs + 1); - /* "pytesmo/time_series/filters.pyx":155 + /* "pytesmo/time_series/filters.pyx":156 * if not is_nan: * tdiff = in_jd[j] - in_jd[i] * if fabs(tdiff) <= limit: # <<<<<<<<<<<<<< @@ -23119,7 +23571,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON goto __pyx_L15; } - /* "pytesmo/time_series/filters.pyx":159 + /* "pytesmo/time_series/filters.pyx":160 * nobs = nobs + 1 * else: * break # <<<<<<<<<<<<<< @@ -23131,7 +23583,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON } __pyx_L15:; - /* "pytesmo/time_series/filters.pyx":153 + /* "pytesmo/time_series/filters.pyx":154 * for j in range(i, in_jd.shape[0]): * is_nan = (in_data[j] == nan) or isnan(in_data[j]) * if not is_nan: # <<<<<<<<<<<<<< @@ -23142,88 +23594,88 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON } __pyx_L11_break:; - /* "pytesmo/time_series/filters.pyx":161 + /* "pytesmo/time_series/filters.pyx":162 * break * * for j in range(i, -1, -1): # <<<<<<<<<<<<<< * if i != j: * is_nan = (in_data[j] == nan) or isnan(in_data[j]) */ - for (__pyx_t_15 = __pyx_v_i + 1; __pyx_t_15 > -1 + 1; ) { __pyx_t_15-=1; - __pyx_v_j = __pyx_t_15; + for (__pyx_t_14 = __pyx_v_i + 1; __pyx_t_14 > -1 + 1; ) { __pyx_t_14-=1; + __pyx_v_j = __pyx_t_14; - /* "pytesmo/time_series/filters.pyx":162 + /* "pytesmo/time_series/filters.pyx":163 * * for j in range(i, -1, -1): * if i != j: # <<<<<<<<<<<<<< * is_nan = (in_data[j] == nan) or isnan(in_data[j]) * if not is_nan: */ - __pyx_t_10 = (__pyx_v_i != __pyx_v_j); - if (__pyx_t_10) { + __pyx_t_9 = (__pyx_v_i != __pyx_v_j); + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":163 + /* "pytesmo/time_series/filters.pyx":164 * for j in range(i, -1, -1): * if i != j: * is_nan = (in_data[j] == nan) or isnan(in_data[j]) # <<<<<<<<<<<<<< * if not is_nan: * tdiff = in_jd[j] - in_jd[i] */ - __pyx_t_16 = __pyx_v_j; - __pyx_t_12 = ((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_16 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); - if (!__pyx_t_12) { + __pyx_t_15 = __pyx_v_j; + __pyx_t_11 = ((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_15 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); + if (!__pyx_t_11) { } else { - __pyx_t_10 = __pyx_t_12; + __pyx_t_9 = __pyx_t_11; goto __pyx_L19_bool_binop_done; } - __pyx_t_16 = __pyx_v_j; - __pyx_t_12 = isnan((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_16 * __pyx_v_in_data.strides[0]) )))); - __pyx_t_10 = __pyx_t_12; + __pyx_t_15 = __pyx_v_j; + __pyx_t_11 = isnan((*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_15 * __pyx_v_in_data.strides[0]) )))); + __pyx_t_9 = __pyx_t_11; __pyx_L19_bool_binop_done:; - __pyx_v_is_nan = __pyx_t_10; + __pyx_v_is_nan = __pyx_t_9; - /* "pytesmo/time_series/filters.pyx":164 + /* "pytesmo/time_series/filters.pyx":165 * if i != j: * is_nan = (in_data[j] == nan) or isnan(in_data[j]) * if not is_nan: # <<<<<<<<<<<<<< * tdiff = in_jd[j] - in_jd[i] * if fabs(tdiff) <= limit: */ - __pyx_t_10 = (!__pyx_v_is_nan); - if (__pyx_t_10) { + __pyx_t_9 = (!__pyx_v_is_nan); + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":165 + /* "pytesmo/time_series/filters.pyx":166 * is_nan = (in_data[j] == nan) or isnan(in_data[j]) * if not is_nan: * tdiff = in_jd[j] - in_jd[i] # <<<<<<<<<<<<<< * if fabs(tdiff) <= limit: * sum = sum + in_data[j] */ - __pyx_t_16 = __pyx_v_j; - __pyx_t_11 = __pyx_v_i; - __pyx_v_tdiff = ((*((float *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_16 * __pyx_v_in_jd.strides[0]) ))) - (*((float *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_11 * __pyx_v_in_jd.strides[0]) )))); + __pyx_t_15 = __pyx_v_j; + __pyx_t_10 = __pyx_v_i; + __pyx_v_tdiff = ((*((float *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_15 * __pyx_v_in_jd.strides[0]) ))) - (*((float *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_10 * __pyx_v_in_jd.strides[0]) )))); - /* "pytesmo/time_series/filters.pyx":166 + /* "pytesmo/time_series/filters.pyx":167 * if not is_nan: * tdiff = in_jd[j] - in_jd[i] * if fabs(tdiff) <= limit: # <<<<<<<<<<<<<< * sum = sum + in_data[j] * nobs = nobs + 1 */ - __pyx_t_10 = (fabs(__pyx_v_tdiff) <= __pyx_v_limit); - if (__pyx_t_10) { + __pyx_t_9 = (fabs(__pyx_v_tdiff) <= __pyx_v_limit); + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":167 + /* "pytesmo/time_series/filters.pyx":168 * tdiff = in_jd[j] - in_jd[i] * if fabs(tdiff) <= limit: * sum = sum + in_data[j] # <<<<<<<<<<<<<< * nobs = nobs + 1 * else: */ - __pyx_t_11 = __pyx_v_j; - __pyx_v_sum = (__pyx_v_sum + (*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_11 * __pyx_v_in_data.strides[0]) )))); + __pyx_t_10 = __pyx_v_j; + __pyx_v_sum = (__pyx_v_sum + (*((float *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_10 * __pyx_v_in_data.strides[0]) )))); - /* "pytesmo/time_series/filters.pyx":168 + /* "pytesmo/time_series/filters.pyx":169 * if fabs(tdiff) <= limit: * sum = sum + in_data[j] * nobs = nobs + 1 # <<<<<<<<<<<<<< @@ -23232,7 +23684,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON */ __pyx_v_nobs = (__pyx_v_nobs + 1); - /* "pytesmo/time_series/filters.pyx":166 + /* "pytesmo/time_series/filters.pyx":167 * if not is_nan: * tdiff = in_jd[j] - in_jd[i] * if fabs(tdiff) <= limit: # <<<<<<<<<<<<<< @@ -23242,7 +23694,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON goto __pyx_L22; } - /* "pytesmo/time_series/filters.pyx":170 + /* "pytesmo/time_series/filters.pyx":171 * nobs = nobs + 1 * else: * break # <<<<<<<<<<<<<< @@ -23254,7 +23706,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON } __pyx_L22:; - /* "pytesmo/time_series/filters.pyx":164 + /* "pytesmo/time_series/filters.pyx":165 * if i != j: * is_nan = (in_data[j] == nan) or isnan(in_data[j]) * if not is_nan: # <<<<<<<<<<<<<< @@ -23263,7 +23715,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON */ } - /* "pytesmo/time_series/filters.pyx":162 + /* "pytesmo/time_series/filters.pyx":163 * * for j in range(i, -1, -1): * if i != j: # <<<<<<<<<<<<<< @@ -23274,27 +23726,27 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON } __pyx_L17_break:; - /* "pytesmo/time_series/filters.pyx":172 + /* "pytesmo/time_series/filters.pyx":173 * break * * if nobs >= min_obs: # <<<<<<<<<<<<<< * filtered[i] = sum / nobs * */ - __pyx_t_10 = (__pyx_v_nobs >= __pyx_v_min_obs); - if (__pyx_t_10) { + __pyx_t_9 = (__pyx_v_nobs >= __pyx_v_min_obs); + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":173 + /* "pytesmo/time_series/filters.pyx":174 * * if nobs >= min_obs: * filtered[i] = sum / nobs # <<<<<<<<<<<<<< * * return filtered */ - __pyx_t_11 = __pyx_v_i; - *__Pyx_BufPtrStrided1d(float *, __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_filtered.diminfo[0].strides) = (__pyx_v_sum / ((double)__pyx_v_nobs)); + __pyx_t_10 = __pyx_v_i; + *__Pyx_BufPtrStrided1d(float *, __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_filtered.diminfo[0].strides) = (__pyx_v_sum / ((double)__pyx_v_nobs)); - /* "pytesmo/time_series/filters.pyx":172 + /* "pytesmo/time_series/filters.pyx":173 * break * * if nobs >= min_obs: # <<<<<<<<<<<<<< @@ -23303,7 +23755,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON */ } - /* "pytesmo/time_series/filters.pyx":148 + /* "pytesmo/time_series/filters.pyx":149 * for i in range(in_jd.shape[0]): * is_nan = (in_data[i] == nan) or isnan(in_data[i]) * if (not is_nan) or fillna: # <<<<<<<<<<<<<< @@ -23313,7 +23765,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON } } - /* "pytesmo/time_series/filters.pyx":175 + /* "pytesmo/time_series/filters.pyx":176 * filtered[i] = sum / nobs * * return filtered # <<<<<<<<<<<<<< @@ -23323,7 +23775,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_10boxcar_filter(CYTHON __pyx_r = ((PyObject *)__pyx_v_filtered); goto __pyx_L0; - /* "pytesmo/time_series/filters.pyx":112 + /* "pytesmo/time_series/filters.pyx":113 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -23407,7 +23859,7 @@ static PyObject *__pyx_fuse_1__pyx_pw_7pytesmo_11time_series_7filters_13boxcar_f (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -23415,42 +23867,42 @@ static PyObject *__pyx_fuse_1__pyx_pw_7pytesmo_11time_series_7filters_13boxcar_f (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("boxcar_filter", 0, 2, 6, 1); __PYX_ERR(0, 112, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("boxcar_filter", 0, 2, 6, 1); __PYX_ERR(0, 113, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_window); if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nan); if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fillna); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_min_obs); if (value) { values[5] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "boxcar_filter") < 0)) __PYX_ERR(0, 112, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "boxcar_filter") < 0)) __PYX_ERR(0, 113, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -23468,32 +23920,32 @@ static PyObject *__pyx_fuse_1__pyx_pw_7pytesmo_11time_series_7filters_13boxcar_f default: goto __pyx_L5_argtuple_error; } } - __pyx_v_in_data = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_in_data.memview)) __PYX_ERR(0, 115, __pyx_L3_error) - __pyx_v_in_jd = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_in_jd.memview)) __PYX_ERR(0, 116, __pyx_L3_error) + __pyx_v_in_data = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_in_data.memview)) __PYX_ERR(0, 116, __pyx_L3_error) + __pyx_v_in_jd = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_in_jd.memview)) __PYX_ERR(0, 117, __pyx_L3_error) if (values[2]) { - __pyx_v_window = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_window == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 117, __pyx_L3_error) + __pyx_v_window = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_window == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L3_error) } else { __pyx_v_window = ((float)((float)((float)1.0))); } if (values[3]) { - __pyx_v_nan = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_nan == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 117, __pyx_L3_error) + __pyx_v_nan = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_nan == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L3_error) } else { __pyx_v_nan = ((double)((double)((double)-999999.0))); } if (values[4]) { - __pyx_v_fillna = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_fillna == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L3_error) + __pyx_v_fillna = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_fillna == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error) } else { __pyx_v_fillna = ((int)((int)((int)0))); } if (values[5]) { - __pyx_v_min_obs = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_min_obs == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L3_error) + __pyx_v_min_obs = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_min_obs == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error) } else { __pyx_v_min_obs = ((int)((int)((int)1))); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("boxcar_filter", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 112, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("boxcar_filter", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 113, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -23542,17 +23994,16 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; + unsigned int __pyx_t_6; PyArrayObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; - unsigned int __pyx_t_9; - int __pyx_t_10; - size_t __pyx_t_11; - int __pyx_t_12; + int __pyx_t_9; + size_t __pyx_t_10; + int __pyx_t_11; + Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; - Py_ssize_t __pyx_t_14; - unsigned int __pyx_t_15; - size_t __pyx_t_16; + unsigned int __pyx_t_14; + size_t __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -23562,20 +24013,20 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON __pyx_pybuffernd_filtered.data = NULL; __pyx_pybuffernd_filtered.rcbuffer = &__pyx_pybuffer_filtered; - /* "pytesmo/time_series/filters.pyx":135 + /* "pytesmo/time_series/filters.pyx":136 * nan values to exclude from calculation * """ - * cdef np.ndarray[floating, ndim = 1] filtered = np.empty(len(in_data)) # <<<<<<<<<<<<<< + * cdef cnp.ndarray[floating, ndim = 1] filtered = np.empty(len(in_data)) # <<<<<<<<<<<<<< * cdef double tdiff * cdef unsigned int i */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_MemoryView_Len(__pyx_v_in_data); - __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -23596,17 +24047,17 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 135, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 136, __pyx_L1_error) __pyx_t_7 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_filtered.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_filtered = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 135, __pyx_L1_error) + __PYX_ERR(0, 136, __pyx_L1_error) } else {__pyx_pybuffernd_filtered.diminfo[0].strides = __pyx_pybuffernd_filtered.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_filtered.diminfo[0].shape = __pyx_pybuffernd_filtered.rcbuffer->pybuffer.shape[0]; } } @@ -23614,7 +24065,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON __pyx_v_filtered = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "pytesmo/time_series/filters.pyx":140 + /* "pytesmo/time_series/filters.pyx":141 * cdef unsigned int j * cdef bint is_nan * cdef double sum = 0 # <<<<<<<<<<<<<< @@ -23623,7 +24074,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON */ __pyx_v_sum = 0.0; - /* "pytesmo/time_series/filters.pyx":141 + /* "pytesmo/time_series/filters.pyx":142 * cdef bint is_nan * cdef double sum = 0 * cdef double limit = window / 2.0 # <<<<<<<<<<<<<< @@ -23632,7 +24083,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON */ __pyx_v_limit = (((double)__pyx_v_window) / 2.0); - /* "pytesmo/time_series/filters.pyx":142 + /* "pytesmo/time_series/filters.pyx":143 * cdef double sum = 0 * cdef double limit = window / 2.0 * cdef int nobs = 0 # <<<<<<<<<<<<<< @@ -23641,18 +24092,18 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON */ __pyx_v_nobs = 0; - /* "pytesmo/time_series/filters.pyx":144 + /* "pytesmo/time_series/filters.pyx":145 * cdef int nobs = 0 * * filtered.fill(np.nan) # <<<<<<<<<<<<<< * * for i in range(in_jd.shape[0]): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_filtered), __pyx_n_s_fill); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_filtered), __pyx_n_s_fill); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -23674,13 +24125,13 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pytesmo/time_series/filters.pyx":146 + /* "pytesmo/time_series/filters.pyx":147 * filtered.fill(np.nan) * * for i in range(in_jd.shape[0]): # <<<<<<<<<<<<<< @@ -23689,47 +24140,47 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON */ __pyx_t_4 = (__pyx_v_in_jd.shape[0]); __pyx_t_8 = __pyx_t_4; - for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { - __pyx_v_i = __pyx_t_9; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_8; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; - /* "pytesmo/time_series/filters.pyx":147 + /* "pytesmo/time_series/filters.pyx":148 * * for i in range(in_jd.shape[0]): * is_nan = (in_data[i] == nan) or isnan(in_data[i]) # <<<<<<<<<<<<<< * if (not is_nan) or fillna: * sum = 0 */ - __pyx_t_11 = __pyx_v_i; - __pyx_t_12 = ((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_11 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); - if (!__pyx_t_12) { + __pyx_t_10 = __pyx_v_i; + __pyx_t_11 = ((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_10 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); + if (!__pyx_t_11) { } else { - __pyx_t_10 = __pyx_t_12; + __pyx_t_9 = __pyx_t_11; goto __pyx_L5_bool_binop_done; } - __pyx_t_11 = __pyx_v_i; - __pyx_t_12 = isnan((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_11 * __pyx_v_in_data.strides[0]) )))); - __pyx_t_10 = __pyx_t_12; + __pyx_t_10 = __pyx_v_i; + __pyx_t_11 = isnan((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_10 * __pyx_v_in_data.strides[0]) )))); + __pyx_t_9 = __pyx_t_11; __pyx_L5_bool_binop_done:; - __pyx_v_is_nan = __pyx_t_10; + __pyx_v_is_nan = __pyx_t_9; - /* "pytesmo/time_series/filters.pyx":148 + /* "pytesmo/time_series/filters.pyx":149 * for i in range(in_jd.shape[0]): * is_nan = (in_data[i] == nan) or isnan(in_data[i]) * if (not is_nan) or fillna: # <<<<<<<<<<<<<< * sum = 0 * nobs = 0 */ - __pyx_t_12 = (!__pyx_v_is_nan); - if (!__pyx_t_12) { + __pyx_t_11 = (!__pyx_v_is_nan); + if (!__pyx_t_11) { } else { - __pyx_t_10 = __pyx_t_12; + __pyx_t_9 = __pyx_t_11; goto __pyx_L8_bool_binop_done; } - __pyx_t_10 = __pyx_v_fillna; + __pyx_t_9 = __pyx_v_fillna; __pyx_L8_bool_binop_done:; - if (__pyx_t_10) { + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":149 + /* "pytesmo/time_series/filters.pyx":150 * is_nan = (in_data[i] == nan) or isnan(in_data[i]) * if (not is_nan) or fillna: * sum = 0 # <<<<<<<<<<<<<< @@ -23738,7 +24189,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON */ __pyx_v_sum = 0.0; - /* "pytesmo/time_series/filters.pyx":150 + /* "pytesmo/time_series/filters.pyx":151 * if (not is_nan) or fillna: * sum = 0 * nobs = 0 # <<<<<<<<<<<<<< @@ -23747,80 +24198,80 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON */ __pyx_v_nobs = 0; - /* "pytesmo/time_series/filters.pyx":151 + /* "pytesmo/time_series/filters.pyx":152 * sum = 0 * nobs = 0 * for j in range(i, in_jd.shape[0]): # <<<<<<<<<<<<<< * is_nan = (in_data[j] == nan) or isnan(in_data[j]) * if not is_nan: */ - __pyx_t_13 = (__pyx_v_in_jd.shape[0]); - __pyx_t_14 = __pyx_t_13; - for (__pyx_t_15 = __pyx_v_i; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { - __pyx_v_j = __pyx_t_15; + __pyx_t_12 = (__pyx_v_in_jd.shape[0]); + __pyx_t_13 = __pyx_t_12; + for (__pyx_t_14 = __pyx_v_i; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { + __pyx_v_j = __pyx_t_14; - /* "pytesmo/time_series/filters.pyx":152 + /* "pytesmo/time_series/filters.pyx":153 * nobs = 0 * for j in range(i, in_jd.shape[0]): * is_nan = (in_data[j] == nan) or isnan(in_data[j]) # <<<<<<<<<<<<<< * if not is_nan: * tdiff = in_jd[j] - in_jd[i] */ - __pyx_t_11 = __pyx_v_j; - __pyx_t_12 = ((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_11 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); - if (!__pyx_t_12) { + __pyx_t_10 = __pyx_v_j; + __pyx_t_11 = ((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_10 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); + if (!__pyx_t_11) { } else { - __pyx_t_10 = __pyx_t_12; + __pyx_t_9 = __pyx_t_11; goto __pyx_L12_bool_binop_done; } - __pyx_t_11 = __pyx_v_j; - __pyx_t_12 = isnan((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_11 * __pyx_v_in_data.strides[0]) )))); - __pyx_t_10 = __pyx_t_12; + __pyx_t_10 = __pyx_v_j; + __pyx_t_11 = isnan((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_10 * __pyx_v_in_data.strides[0]) )))); + __pyx_t_9 = __pyx_t_11; __pyx_L12_bool_binop_done:; - __pyx_v_is_nan = __pyx_t_10; + __pyx_v_is_nan = __pyx_t_9; - /* "pytesmo/time_series/filters.pyx":153 + /* "pytesmo/time_series/filters.pyx":154 * for j in range(i, in_jd.shape[0]): * is_nan = (in_data[j] == nan) or isnan(in_data[j]) * if not is_nan: # <<<<<<<<<<<<<< * tdiff = in_jd[j] - in_jd[i] * if fabs(tdiff) <= limit: */ - __pyx_t_10 = (!__pyx_v_is_nan); - if (__pyx_t_10) { + __pyx_t_9 = (!__pyx_v_is_nan); + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":154 + /* "pytesmo/time_series/filters.pyx":155 * is_nan = (in_data[j] == nan) or isnan(in_data[j]) * if not is_nan: * tdiff = in_jd[j] - in_jd[i] # <<<<<<<<<<<<<< * if fabs(tdiff) <= limit: * sum = sum + in_data[j] */ - __pyx_t_11 = __pyx_v_j; - __pyx_t_16 = __pyx_v_i; - __pyx_v_tdiff = ((*((double *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_11 * __pyx_v_in_jd.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_16 * __pyx_v_in_jd.strides[0]) )))); + __pyx_t_10 = __pyx_v_j; + __pyx_t_15 = __pyx_v_i; + __pyx_v_tdiff = ((*((double *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_10 * __pyx_v_in_jd.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_15 * __pyx_v_in_jd.strides[0]) )))); - /* "pytesmo/time_series/filters.pyx":155 + /* "pytesmo/time_series/filters.pyx":156 * if not is_nan: * tdiff = in_jd[j] - in_jd[i] * if fabs(tdiff) <= limit: # <<<<<<<<<<<<<< * sum = sum + in_data[j] * nobs = nobs + 1 */ - __pyx_t_10 = (fabs(__pyx_v_tdiff) <= __pyx_v_limit); - if (__pyx_t_10) { + __pyx_t_9 = (fabs(__pyx_v_tdiff) <= __pyx_v_limit); + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":156 + /* "pytesmo/time_series/filters.pyx":157 * tdiff = in_jd[j] - in_jd[i] * if fabs(tdiff) <= limit: * sum = sum + in_data[j] # <<<<<<<<<<<<<< * nobs = nobs + 1 * else: */ - __pyx_t_16 = __pyx_v_j; - __pyx_v_sum = (__pyx_v_sum + (*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_16 * __pyx_v_in_data.strides[0]) )))); + __pyx_t_15 = __pyx_v_j; + __pyx_v_sum = (__pyx_v_sum + (*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_15 * __pyx_v_in_data.strides[0]) )))); - /* "pytesmo/time_series/filters.pyx":157 + /* "pytesmo/time_series/filters.pyx":158 * if fabs(tdiff) <= limit: * sum = sum + in_data[j] * nobs = nobs + 1 # <<<<<<<<<<<<<< @@ -23829,7 +24280,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON */ __pyx_v_nobs = (__pyx_v_nobs + 1); - /* "pytesmo/time_series/filters.pyx":155 + /* "pytesmo/time_series/filters.pyx":156 * if not is_nan: * tdiff = in_jd[j] - in_jd[i] * if fabs(tdiff) <= limit: # <<<<<<<<<<<<<< @@ -23839,7 +24290,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON goto __pyx_L15; } - /* "pytesmo/time_series/filters.pyx":159 + /* "pytesmo/time_series/filters.pyx":160 * nobs = nobs + 1 * else: * break # <<<<<<<<<<<<<< @@ -23851,7 +24302,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON } __pyx_L15:; - /* "pytesmo/time_series/filters.pyx":153 + /* "pytesmo/time_series/filters.pyx":154 * for j in range(i, in_jd.shape[0]): * is_nan = (in_data[j] == nan) or isnan(in_data[j]) * if not is_nan: # <<<<<<<<<<<<<< @@ -23862,88 +24313,88 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON } __pyx_L11_break:; - /* "pytesmo/time_series/filters.pyx":161 + /* "pytesmo/time_series/filters.pyx":162 * break * * for j in range(i, -1, -1): # <<<<<<<<<<<<<< * if i != j: * is_nan = (in_data[j] == nan) or isnan(in_data[j]) */ - for (__pyx_t_15 = __pyx_v_i + 1; __pyx_t_15 > -1 + 1; ) { __pyx_t_15-=1; - __pyx_v_j = __pyx_t_15; + for (__pyx_t_14 = __pyx_v_i + 1; __pyx_t_14 > -1 + 1; ) { __pyx_t_14-=1; + __pyx_v_j = __pyx_t_14; - /* "pytesmo/time_series/filters.pyx":162 + /* "pytesmo/time_series/filters.pyx":163 * * for j in range(i, -1, -1): * if i != j: # <<<<<<<<<<<<<< * is_nan = (in_data[j] == nan) or isnan(in_data[j]) * if not is_nan: */ - __pyx_t_10 = (__pyx_v_i != __pyx_v_j); - if (__pyx_t_10) { + __pyx_t_9 = (__pyx_v_i != __pyx_v_j); + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":163 + /* "pytesmo/time_series/filters.pyx":164 * for j in range(i, -1, -1): * if i != j: * is_nan = (in_data[j] == nan) or isnan(in_data[j]) # <<<<<<<<<<<<<< * if not is_nan: * tdiff = in_jd[j] - in_jd[i] */ - __pyx_t_16 = __pyx_v_j; - __pyx_t_12 = ((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_16 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); - if (!__pyx_t_12) { + __pyx_t_15 = __pyx_v_j; + __pyx_t_11 = ((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_15 * __pyx_v_in_data.strides[0]) ))) == __pyx_v_nan); + if (!__pyx_t_11) { } else { - __pyx_t_10 = __pyx_t_12; + __pyx_t_9 = __pyx_t_11; goto __pyx_L19_bool_binop_done; } - __pyx_t_16 = __pyx_v_j; - __pyx_t_12 = isnan((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_16 * __pyx_v_in_data.strides[0]) )))); - __pyx_t_10 = __pyx_t_12; + __pyx_t_15 = __pyx_v_j; + __pyx_t_11 = isnan((*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_15 * __pyx_v_in_data.strides[0]) )))); + __pyx_t_9 = __pyx_t_11; __pyx_L19_bool_binop_done:; - __pyx_v_is_nan = __pyx_t_10; + __pyx_v_is_nan = __pyx_t_9; - /* "pytesmo/time_series/filters.pyx":164 + /* "pytesmo/time_series/filters.pyx":165 * if i != j: * is_nan = (in_data[j] == nan) or isnan(in_data[j]) * if not is_nan: # <<<<<<<<<<<<<< * tdiff = in_jd[j] - in_jd[i] * if fabs(tdiff) <= limit: */ - __pyx_t_10 = (!__pyx_v_is_nan); - if (__pyx_t_10) { + __pyx_t_9 = (!__pyx_v_is_nan); + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":165 + /* "pytesmo/time_series/filters.pyx":166 * is_nan = (in_data[j] == nan) or isnan(in_data[j]) * if not is_nan: * tdiff = in_jd[j] - in_jd[i] # <<<<<<<<<<<<<< * if fabs(tdiff) <= limit: * sum = sum + in_data[j] */ - __pyx_t_16 = __pyx_v_j; - __pyx_t_11 = __pyx_v_i; - __pyx_v_tdiff = ((*((double *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_16 * __pyx_v_in_jd.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_11 * __pyx_v_in_jd.strides[0]) )))); + __pyx_t_15 = __pyx_v_j; + __pyx_t_10 = __pyx_v_i; + __pyx_v_tdiff = ((*((double *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_15 * __pyx_v_in_jd.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_in_jd.data + __pyx_t_10 * __pyx_v_in_jd.strides[0]) )))); - /* "pytesmo/time_series/filters.pyx":166 + /* "pytesmo/time_series/filters.pyx":167 * if not is_nan: * tdiff = in_jd[j] - in_jd[i] * if fabs(tdiff) <= limit: # <<<<<<<<<<<<<< * sum = sum + in_data[j] * nobs = nobs + 1 */ - __pyx_t_10 = (fabs(__pyx_v_tdiff) <= __pyx_v_limit); - if (__pyx_t_10) { + __pyx_t_9 = (fabs(__pyx_v_tdiff) <= __pyx_v_limit); + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":167 + /* "pytesmo/time_series/filters.pyx":168 * tdiff = in_jd[j] - in_jd[i] * if fabs(tdiff) <= limit: * sum = sum + in_data[j] # <<<<<<<<<<<<<< * nobs = nobs + 1 * else: */ - __pyx_t_11 = __pyx_v_j; - __pyx_v_sum = (__pyx_v_sum + (*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_11 * __pyx_v_in_data.strides[0]) )))); + __pyx_t_10 = __pyx_v_j; + __pyx_v_sum = (__pyx_v_sum + (*((double *) ( /* dim=0 */ (__pyx_v_in_data.data + __pyx_t_10 * __pyx_v_in_data.strides[0]) )))); - /* "pytesmo/time_series/filters.pyx":168 + /* "pytesmo/time_series/filters.pyx":169 * if fabs(tdiff) <= limit: * sum = sum + in_data[j] * nobs = nobs + 1 # <<<<<<<<<<<<<< @@ -23952,7 +24403,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON */ __pyx_v_nobs = (__pyx_v_nobs + 1); - /* "pytesmo/time_series/filters.pyx":166 + /* "pytesmo/time_series/filters.pyx":167 * if not is_nan: * tdiff = in_jd[j] - in_jd[i] * if fabs(tdiff) <= limit: # <<<<<<<<<<<<<< @@ -23962,7 +24413,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON goto __pyx_L22; } - /* "pytesmo/time_series/filters.pyx":170 + /* "pytesmo/time_series/filters.pyx":171 * nobs = nobs + 1 * else: * break # <<<<<<<<<<<<<< @@ -23974,7 +24425,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON } __pyx_L22:; - /* "pytesmo/time_series/filters.pyx":164 + /* "pytesmo/time_series/filters.pyx":165 * if i != j: * is_nan = (in_data[j] == nan) or isnan(in_data[j]) * if not is_nan: # <<<<<<<<<<<<<< @@ -23983,7 +24434,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON */ } - /* "pytesmo/time_series/filters.pyx":162 + /* "pytesmo/time_series/filters.pyx":163 * * for j in range(i, -1, -1): * if i != j: # <<<<<<<<<<<<<< @@ -23994,27 +24445,27 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON } __pyx_L17_break:; - /* "pytesmo/time_series/filters.pyx":172 + /* "pytesmo/time_series/filters.pyx":173 * break * * if nobs >= min_obs: # <<<<<<<<<<<<<< * filtered[i] = sum / nobs * */ - __pyx_t_10 = (__pyx_v_nobs >= __pyx_v_min_obs); - if (__pyx_t_10) { + __pyx_t_9 = (__pyx_v_nobs >= __pyx_v_min_obs); + if (__pyx_t_9) { - /* "pytesmo/time_series/filters.pyx":173 + /* "pytesmo/time_series/filters.pyx":174 * * if nobs >= min_obs: * filtered[i] = sum / nobs # <<<<<<<<<<<<<< * * return filtered */ - __pyx_t_11 = __pyx_v_i; - *__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_filtered.diminfo[0].strides) = (__pyx_v_sum / ((double)__pyx_v_nobs)); + __pyx_t_10 = __pyx_v_i; + *__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_filtered.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_filtered.diminfo[0].strides) = (__pyx_v_sum / ((double)__pyx_v_nobs)); - /* "pytesmo/time_series/filters.pyx":172 + /* "pytesmo/time_series/filters.pyx":173 * break * * if nobs >= min_obs: # <<<<<<<<<<<<<< @@ -24023,7 +24474,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON */ } - /* "pytesmo/time_series/filters.pyx":148 + /* "pytesmo/time_series/filters.pyx":149 * for i in range(in_jd.shape[0]): * is_nan = (in_data[i] == nan) or isnan(in_data[i]) * if (not is_nan) or fillna: # <<<<<<<<<<<<<< @@ -24033,7 +24484,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON } } - /* "pytesmo/time_series/filters.pyx":175 + /* "pytesmo/time_series/filters.pyx":176 * filtered[i] = sum / nobs * * return filtered # <<<<<<<<<<<<<< @@ -24043,7 +24494,7 @@ static PyObject *__pyx_pf_7pytesmo_11time_series_7filters_12boxcar_filter(CYTHON __pyx_r = ((PyObject *)__pyx_v_filtered); goto __pyx_L0; - /* "pytesmo/time_series/filters.pyx":112 + /* "pytesmo/time_series/filters.pyx":113 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -24332,6 +24783,9 @@ static PyTypeObject __pyx_type___pyx_array = { #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif @@ -24502,6 +24956,9 @@ static PyTypeObject __pyx_type___pyx_MemviewEnum = { #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif @@ -24845,6 +25302,9 @@ static PyTypeObject __pyx_type___pyx_memoryview = { #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif @@ -25015,6 +25475,9 @@ static PyTypeObject __pyx_type___pyx_memoryviewslice = { #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif @@ -25158,8 +25621,8 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_nobs, __pyx_k_nobs, sizeof(__pyx_k_nobs), 0, 0, 1, 1}, {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, - {&__pyx_kp_u_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 1, 0, 0}, - {&__pyx_kp_u_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 1, 0, 0}, + {&__pyx_kp_u_numpy__core_multiarray_failed_to, __pyx_k_numpy__core_multiarray_failed_to, sizeof(__pyx_k_numpy__core_multiarray_failed_to), 0, 1, 0, 0}, + {&__pyx_kp_u_numpy__core_umath_failed_to_impo, __pyx_k_numpy__core_umath_failed_to_impo, sizeof(__pyx_k_numpy__core_umath_failed_to_impo), 0, 1, 0, 0}, {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1}, {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1}, @@ -25212,9 +25675,9 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { } /* #### Code section: cached_builtins ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 46, __pyx_L1_error) - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 46, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 47, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 47, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 84, __pyx_L1_error) __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_n_s_import); if (!__pyx_builtin___import__) __PYX_ERR(1, 100, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 156, __pyx_L1_error) __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 159, __pyx_L1_error) @@ -25222,7 +25685,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 408, __pyx_L1_error) __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 618, __pyx_L1_error) __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 914, __pyx_L1_error) - __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 984, __pyx_L1_error) + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1025, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -25269,39 +25732,39 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":984 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025 * __pyx_import_array() * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< + * raise ImportError("numpy._core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ - __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 984, __pyx_L1_error) + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_numpy__core_multiarray_failed_to); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":990 + /* "../../../../../home/wpreimes/miniforge3/envs/pytesmo/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031 * _import_umath() * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ - __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 990, __pyx_L1_error) + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_numpy__core_umath_failed_to_impo); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 1031, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); - /* "pytesmo/time_series/filters.pyx":46 + /* "pytesmo/time_series/filters.pyx":47 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.cdivision(True) */ - __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_No_matching_signature_found); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_No_matching_signature_found); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); - __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_Function_call_with_ambiguous_arg); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_Function_call_with_ambiguous_arg); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); @@ -25406,35 +25869,35 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GIVEREF(__pyx_tuple__24); __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(1, 1, __pyx_L1_error) - /* "pytesmo/time_series/filters.pyx":46 + /* "pytesmo/time_series/filters.pyx":47 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.cdivision(True) */ - __pyx_tuple__26 = PyTuple_Pack(2, __pyx_int_10, __pyx_float_neg_999999_0); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_tuple__26 = PyTuple_Pack(2, __pyx_int_10, __pyx_float_neg_999999_0); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); - __pyx_tuple__27 = PyTuple_Pack(14, __pyx_n_s_in_data, __pyx_n_s_in_jd, __pyx_n_s_ctime, __pyx_n_s_nan, __pyx_n_s_filtered, __pyx_n_s_tdiff, __pyx_n_s_ef, __pyx_n_s_gain, __pyx_n_s_is_nan, __pyx_n_s_last_jd_var, __pyx_n_s_last_filtered_var, __pyx_n_s_i, __pyx_n_s_found_index, __pyx_n_s_index); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_tuple__27 = PyTuple_Pack(14, __pyx_n_s_in_data, __pyx_n_s_in_jd, __pyx_n_s_ctime, __pyx_n_s_nan, __pyx_n_s_filtered, __pyx_n_s_tdiff, __pyx_n_s_ef, __pyx_n_s_gain, __pyx_n_s_is_nan, __pyx_n_s_last_jd_var, __pyx_n_s_last_filtered_var, __pyx_n_s_i, __pyx_n_s_found_index, __pyx_n_s_index); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); - __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_time_series_filters, __pyx_n_s_exp_filter, 46, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_time_series_filters, __pyx_n_s_exp_filter, 47, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 47, __pyx_L1_error) - /* "pytesmo/time_series/filters.pyx":112 + /* "pytesmo/time_series/filters.pyx":113 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.cdivision(True) */ - __pyx_tuple__29 = PyTuple_Pack(4, __pyx_int_1, __pyx_float_neg_999999_0, __pyx_int_0, __pyx_int_1); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_tuple__29 = PyTuple_Pack(4, __pyx_int_1, __pyx_float_neg_999999_0, __pyx_int_0, __pyx_int_1); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__29); __Pyx_GIVEREF(__pyx_tuple__29); - __pyx_tuple__30 = PyTuple_Pack(14, __pyx_n_s_in_data, __pyx_n_s_in_jd, __pyx_n_s_window, __pyx_n_s_nan, __pyx_n_s_fillna, __pyx_n_s_min_obs, __pyx_n_s_filtered, __pyx_n_s_tdiff, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_is_nan, __pyx_n_s_sum, __pyx_n_s_limit, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_tuple__30 = PyTuple_Pack(14, __pyx_n_s_in_data, __pyx_n_s_in_jd, __pyx_n_s_window, __pyx_n_s_nan, __pyx_n_s_fillna, __pyx_n_s_min_obs, __pyx_n_s_filtered, __pyx_n_s_tdiff, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_is_nan, __pyx_n_s_sum, __pyx_n_s_limit, __pyx_n_s_nobs); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__30); __Pyx_GIVEREF(__pyx_tuple__30); - __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_time_series_filters, __pyx_n_s_boxcar_filter, 112, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pytesmo_time_series_filters, __pyx_n_s_boxcar_filter, 113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -25469,25 +25932,6 @@ static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { /* AssertionsEnabled.init */ if (likely(__Pyx_init_assertions_enabled() == 0)); else -if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) - - /* NumpyImportArray.init */ - /* - * Cython has automatically inserted a call to _import_array since - * you didn't include one when you cimported numpy. To disable this - * add the line - * numpy._import_array - */ -#ifdef NPY_FEATURE_VERSION -#ifndef NO_IMPORT_ARRAY -if (unlikely(_import_array() == -1)) { - PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import " - "(auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; " - "use 'numpy._import_array' to disable if you are certain you don't need it)."); -} -#endif -#endif - if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) return 0; @@ -25700,33 +26144,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(2, 202, __pyx_L1_error) + __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 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(2, 202, __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(2, 225, __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(2, 229, __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(2, 238, __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(2, 809, __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(2, 811, __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(2, 813, __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(2, 815, __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(2, 817, __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(2, 819, __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(2, 821, __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(2, 823, __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(2, 825, __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(2, 827, __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(2, 866, __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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 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(2, 929, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; @@ -25921,6 +26365,7 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_filters(PyObject *__pyx_pyinit_mod int __pyx_t_6; PyObject *__pyx_t_7 = NULL; static PyThread_type_lock __pyx_t_8[8]; + int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -26554,48 +26999,57 @@ if (!__Pyx_RefNanny) { * * import platform # <<<<<<<<<<<<<< * - * cimport numpy as np + * import numpy as np */ __pyx_t_7 = __Pyx_ImportDottedModule(__pyx_n_s_platform, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_platform, __pyx_t_7) < 0) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pytesmo/time_series/filters.pyx":40 + /* "pytesmo/time_series/filters.pyx":39 + * import platform * - * cimport numpy as np * import numpy as np # <<<<<<<<<<<<<< - * from libc.math cimport exp, fabs, isnan - * cimport cython + * cimport numpy as cnp + * cnp.import_array() */ - __pyx_t_7 = __Pyx_ImportDottedModule(__pyx_n_s_numpy, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_t_7 = __Pyx_ImportDottedModule(__pyx_n_s_numpy, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_7) < 0) __PYX_ERR(0, 40, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_7) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pytesmo/time_series/filters.pyx":46 + /* "pytesmo/time_series/filters.pyx":41 + * import numpy as np + * cimport numpy as cnp + * cnp.import_array() # <<<<<<<<<<<<<< + * from libc.math cimport exp, fabs, isnan + * cimport cython + */ + __pyx_t_9 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 41, __pyx_L1_error) + + /* "pytesmo/time_series/filters.pyx":47 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.cdivision(True) */ - __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_11time_series_7filters_5exp_filter, 0, __pyx_n_s_exp_filter, NULL, __pyx_n_s_pytesmo_time_series_filters, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_11time_series_7filters_5exp_filter, 0, __pyx_n_s_exp_filter, NULL, __pyx_n_s_pytesmo_time_series_filters, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__26); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_float, __pyx_t_4) < 0) __PYX_ERR(0, 46, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_float, __pyx_t_4) < 0) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_11time_series_7filters_7exp_filter, 0, __pyx_n_s_exp_filter, NULL, __pyx_n_s_pytesmo_time_series_filters, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_11time_series_7filters_7exp_filter, 0, __pyx_n_s_exp_filter, NULL, __pyx_n_s_pytesmo_time_series_filters, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__26); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_double, __pyx_t_4) < 0) __PYX_ERR(0, 46, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_double, __pyx_t_4) < 0) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_11time_series_7filters_1exp_filter, 0, __pyx_n_s_exp_filter, NULL, __pyx_n_s_pytesmo_time_series_filters, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_11time_series_7filters_1exp_filter, 0, __pyx_n_s_exp_filter, NULL, __pyx_n_s_pytesmo_time_series_filters, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 46, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 46, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 47, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_4)->__pyx_arg__fused_sigindex = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); @@ -26604,32 +27058,32 @@ if (!__Pyx_RefNanny) { ((__pyx_FusedFunctionObject *) __pyx_t_4)->__signatures__ = __pyx_t_7; __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_exp_filter, __pyx_t_4) < 0) __PYX_ERR(0, 46, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_exp_filter, __pyx_t_4) < 0) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pytesmo/time_series/filters.pyx":112 + /* "pytesmo/time_series/filters.pyx":113 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * @cython.cdivision(True) */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_11time_series_7filters_11boxcar_filter, 0, __pyx_n_s_boxcar_filter, NULL, __pyx_n_s_pytesmo_time_series_filters, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_7pytesmo_11time_series_7filters_11boxcar_filter, 0, __pyx_n_s_boxcar_filter, NULL, __pyx_n_s_pytesmo_time_series_filters, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__29); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 112, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_11time_series_7filters_13boxcar_filter, 0, __pyx_n_s_boxcar_filter, NULL, __pyx_n_s_pytesmo_time_series_filters, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_7pytesmo_11time_series_7filters_13boxcar_filter, 0, __pyx_n_s_boxcar_filter, NULL, __pyx_n_s_pytesmo_time_series_filters, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__29); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_7) < 0) __PYX_ERR(0, 112, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_7) < 0) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_11time_series_7filters_3boxcar_filter, 0, __pyx_n_s_boxcar_filter, NULL, __pyx_n_s_pytesmo_time_series_filters, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_7pytesmo_11time_series_7filters_3boxcar_filter, 0, __pyx_n_s_boxcar_filter, NULL, __pyx_n_s_pytesmo_time_series_filters, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults1), 1)) __PYX_ERR(0, 112, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults1), 1)) __PYX_ERR(0, 113, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_7)->__pyx_arg__fused_sigindex = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); @@ -26638,7 +27092,7 @@ if (!__Pyx_RefNanny) { ((__pyx_FusedFunctionObject *) __pyx_t_7)->__signatures__ = __pyx_t_4; __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_boxcar_filter, __pyx_t_7) < 0) __PYX_ERR(0, 112, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_boxcar_filter, __pyx_t_7) < 0) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pytesmo/time_series/filters.pyx":1 @@ -29118,7 +29572,6 @@ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { } /* HasAttr */ -#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; if (unlikely(!__Pyx_PyBaseString_Check(n))) { @@ -29135,7 +29588,6 @@ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { return 1; } } -#endif /* DictGetItem */ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY @@ -30877,10 +31329,10 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { #endif /* 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]; @@ -30934,7 +31386,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. " @@ -30942,7 +31394,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", @@ -32077,6 +32529,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 @@ -32454,6 +32909,9 @@ static PyTypeObject __pyx_FusedFunctionType_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 @@ -33572,6 +34030,160 @@ static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *o #endif #endif +/* Declarations */ + #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) { + return ::std::complex< long double >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) { + return x + y*(__pyx_t_long_double_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) { + __pyx_t_long_double_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +/* Arithmetic */ + #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) +#else + static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + __pyx_t_long_double_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + __pyx_t_long_double_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + __pyx_t_long_double_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + if (b.imag == 0) { + return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabsl(b.real) >= fabsl(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + long double r = b.imag / b.real; + long double s = (long double)(1.0) / (b.real + b.imag * r); + return __pyx_t_long_double_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + long double r = b.real / b.imag; + long double s = (long double)(1.0) / (b.imag + b.real * r); + return __pyx_t_long_double_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + if (b.imag == 0) { + return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + long double denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_long_double_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex a) { + __pyx_t_long_double_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex a) { + __pyx_t_long_double_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrtl(z.real*z.real + z.imag*z.imag); + #else + return hypotl(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + __pyx_t_long_double_complex z; + long double r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + long double denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + return __Pyx_c_prod_long__double(a, a); + case 3: + z = __Pyx_c_prod_long__double(a, a); + return __Pyx_c_prod_long__double(z, a); + case 4: + z = __Pyx_c_prod_long__double(a, a); + return __Pyx_c_prod_long__double(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if ((b.imag == 0) && (a.real >= 0)) { + z.real = powl(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2l(0.0, -1.0); + } + } else { + r = __Pyx_c_abs_long__double(a); + theta = atan2l(a.imag, a.real); + } + lnr = logl(r); + z_r = expl(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cosl(z_theta); + z.imag = z_r * sinl(z_theta); + return z; + } + #endif +#endif + /* MemviewSliceCopyTemplate */ static __Pyx_memviewslice __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, @@ -33805,12 +34417,19 @@ static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice, } } { - 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"); @@ -33860,245 +34479,239 @@ static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice, } 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; + } + 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; } - } 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) { + 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: @@ -34142,12 +34755,19 @@ static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice, } } { - 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"); @@ -34197,245 +34817,239 @@ static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice, } return (unsigned int) val; } - } else + } #endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { + if (unlikely(!PyLong_Check(x))) { + unsigned int val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (unsigned int) -1; + val = __Pyx_PyInt_As_unsigned_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(unsigned 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(unsigned int) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT)) { - return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); - } + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT)) { + return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); } - break; - case 3: - if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT)) { - return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); - } + } + break; + case 3: + if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT)) { + return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); } - break; - case 4: - if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) >= 4 * PyLong_SHIFT)) { - return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); - } + } + break; + case 4: + if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) >= 4 * PyLong_SHIFT)) { + return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned 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 (unsigned int) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (unsigned int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } #endif - if ((sizeof(unsigned int) <= sizeof(unsigned long))) { - __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x)) + if ((sizeof(unsigned int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG - } else if ((sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } else if ((sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned 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(unsigned 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(unsigned int) - 1 > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) { - return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); - } + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) { + return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); } - break; - case 2: - if ((8 * sizeof(unsigned int) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) { - return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); - } + } + break; + case 2: + if ((8 * sizeof(unsigned int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) { + return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); } - break; - case -3: - if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) { - return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); - } + } + break; + case -3: + if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) { + return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); } - break; - case 3: - if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) { - return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); - } + } + break; + case 3: + if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) { + return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); } - break; - case -4: - if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) - 1 > 4 * PyLong_SHIFT)) { - return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); - } + } + break; + case -4: + if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) - 1 > 4 * PyLong_SHIFT)) { + return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); } - break; - case 4: - if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) - 1 > 4 * PyLong_SHIFT)) { - return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); - } + } + break; + case 4: + if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) - 1 > 4 * PyLong_SHIFT)) { + return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); } - break; - } + } + break; } + } #endif - if ((sizeof(unsigned int) <= sizeof(long))) { - __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x)) + if ((sizeof(unsigned int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG - } else if ((sizeof(unsigned int) <= sizeof(PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } else if ((sizeof(unsigned int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif - } + } + } + { + unsigned 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 (unsigned int) -1; + assert(PyLong_CheckExact(v)); } { - unsigned 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 (unsigned int) -1; - } -#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(x) == 0) - return (unsigned int) 0; - is_negative = Py_SIZE(x) < 0; -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (unsigned 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 (unsigned int) -1; - } else { - stepval = __Pyx_NewRef(v); - } - val = (unsigned 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(unsigned 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 |= ((unsigned 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(unsigned int) * 8) - bits - (is_unsigned ? 0 : 1); - if (unlikely(idigit >= (1L << remaining_bits))) - goto raise_overflow; - val |= ((unsigned int) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - unpacking_done: - #endif - if (!is_unsigned) { - if (unlikely(val & (((unsigned int) 1) << (sizeof(unsigned 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 (unsigned int) -1; } - return (unsigned int) -1; + is_negative = result == 1; + } + 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 (unsigned int) -1; + } else { + stepval = v; + } + v = NULL; + val = (unsigned 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(unsigned 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 |= ((unsigned 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(unsigned int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((unsigned int) idigit) << bits; } - } else { - unsigned int val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (unsigned int) -1; - val = __Pyx_PyInt_As_unsigned_int(tmp); - Py_DECREF(tmp); + if (!is_unsigned) { + if (unlikely(val & (((unsigned int) 1) << (sizeof(unsigned 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 (unsigned int) -1; return val; } raise_overflow: @@ -34479,12 +35093,19 @@ static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice, } } { - 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(unsigned 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"); @@ -34560,245 +35181,239 @@ static CYTHON_INLINE PyObject* __Pyx_ImportNumPyArrayTypeIfAvailable(void) { } 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; + } + 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; } - } 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) { + 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: @@ -34833,245 +35448,239 @@ static CYTHON_INLINE PyObject* __Pyx_ImportNumPyArrayTypeIfAvailable(void) { } return (char) val; } - } else + } #endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { + if (unlikely(!PyLong_Check(x))) { + char val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (char) -1; + val = __Pyx_PyInt_As_char(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(char, __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(char) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) { - return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); - } + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(char, __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(char) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) { + return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); } - break; - case 3: - if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) { - return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); - } + } + break; + case 3: + if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) { + return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); } - break; - case 4: - if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, 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(char) >= 4 * PyLong_SHIFT)) { - return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); - } + } + break; + case 4: + if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, 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(char) >= 4 * PyLong_SHIFT)) { + return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)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 (char) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (char) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } #endif - if ((sizeof(char) <= sizeof(unsigned long))) { - __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x)) + if ((sizeof(char) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG - } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif - } - } else { + } + } else { #if CYTHON_USE_PYLONG_INTERNALS - if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(char, __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(char) - 1 > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { - return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); - } + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(char, __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(char) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { + return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } - break; - case 2: - if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { - return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); - } + } + break; + case 2: + if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { + return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } - break; - case -3: - if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { - return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); - } + } + break; + case -3: + if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { + return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } - break; - case 3: - if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { - return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); - } + } + break; + case 3: + if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { + return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } - break; - case -4: - if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT)) { - return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); - } + } + break; + case -4: + if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT)) { + return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } - break; - case 4: - if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT)) { - return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); - } + } + break; + case 4: + if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT)) { + return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); } - break; - } + } + break; } + } #endif - if ((sizeof(char) <= sizeof(long))) { - __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x)) + if ((sizeof(char) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG - } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x)) + } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif - } + } + } + { + char 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 (char) -1; + assert(PyLong_CheckExact(v)); } { - char 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 (char) -1; - } -#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(x) == 0) - return (char) 0; - is_negative = Py_SIZE(x) < 0; -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (char) -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 (char) -1; - } else { - stepval = __Pyx_NewRef(v); - } - val = (char) 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(char) * 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 |= ((char) 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(char) * 8) - bits - (is_unsigned ? 0 : 1); - if (unlikely(idigit >= (1L << remaining_bits))) - goto raise_overflow; - val |= ((char) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - unpacking_done: - #endif - if (!is_unsigned) { - if (unlikely(val & (((char) 1) << (sizeof(char) * 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 (char) -1; } - return (char) -1; + is_negative = result == 1; + } + 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 (char) -1; + } else { + stepval = v; + } + v = NULL; + val = (char) 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(char) * 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 |= ((char) 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(char) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((char) idigit) << bits; } - } else { - char val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (char) -1; - val = __Pyx_PyInt_As_char(tmp); - Py_DECREF(tmp); + if (!is_unsigned) { + if (unlikely(val & (((char) 1) << (sizeof(char) * 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 (char) -1; return val; } raise_overflow: diff --git a/src/pytesmo/time_series/filters.pyx b/src/pytesmo/time_series/filters.pyx index 7e12b3f..42c58c5 100755 --- a/src/pytesmo/time_series/filters.pyx +++ b/src/pytesmo/time_series/filters.pyx @@ -36,8 +36,9 @@ Fast cython functions for calculating various filters import platform -cimport numpy as np import numpy as np +cimport numpy as cnp +cnp.import_array() from libc.math cimport exp, fabs, isnan cimport cython from cython cimport floating @@ -66,7 +67,7 @@ def exp_filter(floating [:] in_data, nan : double nan values to exclude from calculation """ - cdef np.ndarray[floating, ndim = 1] filtered = np.empty(len(in_data)) + cdef cnp.ndarray[floating, ndim = 1] filtered = np.empty(len(in_data)) cdef double tdiff cdef float ef cdef float gain = 1 @@ -132,7 +133,7 @@ def boxcar_filter(floating [:] in_data, nan : double nan values to exclude from calculation """ - cdef np.ndarray[floating, ndim = 1] filtered = np.empty(len(in_data)) + cdef cnp.ndarray[floating, ndim = 1] filtered = np.empty(len(in_data)) cdef double tdiff cdef unsigned int i cdef unsigned int j diff --git a/src/pytesmo/validation_framework/metric_calculators.py b/src/pytesmo/validation_framework/metric_calculators.py index b2fb0c4..8f91db8 100644 --- a/src/pytesmo/validation_framework/metric_calculators.py +++ b/src/pytesmo/validation_framework/metric_calculators.py @@ -1649,6 +1649,8 @@ def calc_metrics(self, data, gpi_info): """ result = super().calc_metrics(data, gpi_info) + data = data.dropna() + n_obs = len(data) result["n_obs"][0] = n_obs if n_obs < self.min_obs: