From 09fff823fe895d67aeaacb728a2a6e558847c296 Mon Sep 17 00:00:00 2001 From: crusaderky Date: Tue, 18 Mar 2025 16:13:54 +0000 Subject: [PATCH] MAINT: sparse: bump to 0.16b3 --- pixi.lock | 121 +++++++++++---------------- pyproject.toml | 15 ++-- src/array_api_extra/_delegation.py | 4 +- src/array_api_extra/_lib/_funcs.py | 2 +- src/array_api_extra/_lib/_testing.py | 4 +- tests/test_funcs.py | 36 ++++---- tests/test_helpers.py | 14 +--- tests/test_testing.py | 2 +- 8 files changed, 81 insertions(+), 117 deletions(-) diff --git a/pixi.lock b/pixi.lock index c2071402..331d7b1c 100644 --- a/pixi.lock +++ b/pixi.lock @@ -291,7 +291,6 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/snowballstemmer-2.2.0-pyhd8ed1ab_0.tar.bz2 - conda: https://prefix.dev/conda-forge/noarch/sortedcontainers-2.4.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/soupsieve-2.5-pyhd8ed1ab_1.conda - - conda: https://prefix.dev/conda-forge/noarch/sparse-0.15.5-pyh72ffeb9_0.conda - conda: https://prefix.dev/conda-forge/noarch/sphinx-8.2.3-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/sphinx-autodoc-typehints-3.1.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/sphinx-basic-ng-1.0.0b2-pyhd8ed1ab_3.conda @@ -330,6 +329,7 @@ environments: - conda: https://prefix.dev/conda-forge/linux-64/zlib-1.3.1-hb9d3cd8_2.conda - conda: https://prefix.dev/conda-forge/linux-64/zstandard-0.23.0-py313h80202fe_1.conda - conda: https://prefix.dev/conda-forge/linux-64/zstd-1.5.6-ha6fb4c9_0.conda + - pypi: https://files.pythonhosted.org/packages/82/84/de41ad6793c584a9b92935c4541744c169f7b6ce9ca69e98a147c412ed4a/sparse-0.16.0b3-py2.py3-none-any.whl - pypi: . osx-arm64: - conda: https://prefix.dev/conda-forge/noarch/alabaster-1.0.0-pyhd8ed1ab_1.conda @@ -539,7 +539,6 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/snowballstemmer-2.2.0-pyhd8ed1ab_0.tar.bz2 - conda: https://prefix.dev/conda-forge/noarch/sortedcontainers-2.4.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/soupsieve-2.5-pyhd8ed1ab_1.conda - - conda: https://prefix.dev/conda-forge/noarch/sparse-0.15.5-pyh72ffeb9_0.conda - conda: https://prefix.dev/conda-forge/noarch/sphinx-8.2.3-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/sphinx-autodoc-typehints-3.1.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/sphinx-basic-ng-1.0.0b2-pyhd8ed1ab_3.conda @@ -577,6 +576,7 @@ environments: - conda: https://prefix.dev/conda-forge/osx-arm64/zlib-1.3.1-h8359307_2.conda - conda: https://prefix.dev/conda-forge/osx-arm64/zstandard-0.23.0-py313hf2da073_1.conda - conda: https://prefix.dev/conda-forge/osx-arm64/zstd-1.5.6-hb46c0d2_0.conda + - pypi: https://files.pythonhosted.org/packages/82/84/de41ad6793c584a9b92935c4541744c169f7b6ce9ca69e98a147c412ed4a/sparse-0.16.0b3-py2.py3-none-any.whl - pypi: . win-64: - conda: https://prefix.dev/conda-forge/win-64/_openmp_mutex-4.5-2_gnu.conda @@ -750,7 +750,6 @@ environments: - conda: https://prefix.dev/conda-forge/win-64/re2-2024.07.02-haf4117d_2.conda - conda: https://prefix.dev/conda-forge/noarch/requests-2.32.3-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/roman-numerals-py-3.1.0-pyhd8ed1ab_0.conda - - conda: https://prefix.dev/conda-forge/win-64/scipy-1.15.2-py313h2eca4b9_0.conda - conda: https://prefix.dev/conda-forge/noarch/setuptools-75.8.2-pyhff2d567_0.conda - conda: https://prefix.dev/conda-forge/noarch/six-1.17.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/win-64/sleef-3.8-h7e360cc_0.conda @@ -758,7 +757,6 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/snowballstemmer-2.2.0-pyhd8ed1ab_0.tar.bz2 - conda: https://prefix.dev/conda-forge/noarch/sortedcontainers-2.4.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/soupsieve-2.5-pyhd8ed1ab_1.conda - - conda: https://prefix.dev/conda-forge/noarch/sparse-0.15.5-pyh72ffeb9_0.conda - conda: https://prefix.dev/conda-forge/noarch/sphinx-8.2.3-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/sphinx-autodoc-typehints-3.1.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/sphinx-basic-ng-1.0.0b2-pyhd8ed1ab_3.conda @@ -801,6 +799,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/zipp-3.21.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/win-64/zstandard-0.23.0-py313h574b89f_1.conda - conda: https://prefix.dev/conda-forge/win-64/zstd-1.5.6-h0ea2cb4_0.conda + - pypi: https://files.pythonhosted.org/packages/82/84/de41ad6793c584a9b92935c4541744c169f7b6ce9ca69e98a147c412ed4a/sparse-0.16.0b3-py2.py3-none-any.whl - pypi: . dev-cuda: channels: @@ -1071,7 +1070,6 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/snowballstemmer-2.2.0-pyhd8ed1ab_0.tar.bz2 - conda: https://prefix.dev/conda-forge/noarch/sortedcontainers-2.4.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/soupsieve-2.5-pyhd8ed1ab_1.conda - - conda: https://prefix.dev/conda-forge/noarch/sparse-0.15.5-pyh72ffeb9_0.conda - conda: https://prefix.dev/conda-forge/noarch/sphinx-8.2.3-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/sphinx-autodoc-typehints-3.1.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/sphinx-basic-ng-1.0.0b2-pyhd8ed1ab_3.conda @@ -1111,6 +1109,7 @@ environments: - conda: https://prefix.dev/conda-forge/linux-64/zlib-1.3.1-hb9d3cd8_2.conda - conda: https://prefix.dev/conda-forge/linux-64/zstandard-0.23.0-py312hef9b889_1.conda - conda: https://prefix.dev/conda-forge/linux-64/zstd-1.5.6-ha6fb4c9_0.conda + - pypi: https://files.pythonhosted.org/packages/82/84/de41ad6793c584a9b92935c4541744c169f7b6ce9ca69e98a147c412ed4a/sparse-0.16.0b3-py2.py3-none-any.whl - pypi: . osx-arm64: - conda: https://prefix.dev/conda-forge/noarch/alabaster-1.0.0-pyhd8ed1ab_1.conda @@ -1320,7 +1319,6 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/snowballstemmer-2.2.0-pyhd8ed1ab_0.tar.bz2 - conda: https://prefix.dev/conda-forge/noarch/sortedcontainers-2.4.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/soupsieve-2.5-pyhd8ed1ab_1.conda - - conda: https://prefix.dev/conda-forge/noarch/sparse-0.15.5-pyh72ffeb9_0.conda - conda: https://prefix.dev/conda-forge/noarch/sphinx-8.2.3-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/sphinx-autodoc-typehints-3.1.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/sphinx-basic-ng-1.0.0b2-pyhd8ed1ab_3.conda @@ -1358,6 +1356,7 @@ environments: - conda: https://prefix.dev/conda-forge/osx-arm64/zlib-1.3.1-h8359307_2.conda - conda: https://prefix.dev/conda-forge/osx-arm64/zstandard-0.23.0-py313hf2da073_1.conda - conda: https://prefix.dev/conda-forge/osx-arm64/zstd-1.5.6-hb46c0d2_0.conda + - pypi: https://files.pythonhosted.org/packages/82/84/de41ad6793c584a9b92935c4541744c169f7b6ce9ca69e98a147c412ed4a/sparse-0.16.0b3-py2.py3-none-any.whl - pypi: . win-64: - conda: https://prefix.dev/conda-forge/win-64/_openmp_mutex-4.5-2_gnu.conda @@ -1552,7 +1551,6 @@ environments: - conda: https://prefix.dev/conda-forge/win-64/re2-2024.07.02-haf4117d_2.conda - conda: https://prefix.dev/conda-forge/noarch/requests-2.32.3-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/roman-numerals-py-3.1.0-pyhd8ed1ab_0.conda - - conda: https://prefix.dev/conda-forge/win-64/scipy-1.15.2-py313h2eca4b9_0.conda - conda: https://prefix.dev/conda-forge/noarch/setuptools-75.8.2-pyhff2d567_0.conda - conda: https://prefix.dev/conda-forge/noarch/six-1.17.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/win-64/sleef-3.8-h7e360cc_0.conda @@ -1560,7 +1558,6 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/snowballstemmer-2.2.0-pyhd8ed1ab_0.tar.bz2 - conda: https://prefix.dev/conda-forge/noarch/sortedcontainers-2.4.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/soupsieve-2.5-pyhd8ed1ab_1.conda - - conda: https://prefix.dev/conda-forge/noarch/sparse-0.15.5-pyh72ffeb9_0.conda - conda: https://prefix.dev/conda-forge/noarch/sphinx-8.2.3-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/sphinx-autodoc-typehints-3.1.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/sphinx-basic-ng-1.0.0b2-pyhd8ed1ab_3.conda @@ -1603,6 +1600,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/zipp-3.21.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/win-64/zstandard-0.23.0-py313h574b89f_1.conda - conda: https://prefix.dev/conda-forge/win-64/zstd-1.5.6-h0ea2cb4_0.conda + - pypi: https://files.pythonhosted.org/packages/82/84/de41ad6793c584a9b92935c4541744c169f7b6ce9ca69e98a147c412ed4a/sparse-0.16.0b3-py2.py3-none-any.whl - pypi: . docs: channels: @@ -2502,7 +2500,6 @@ environments: - conda: https://prefix.dev/conda-forge/linux-64/sleef-3.8-h1b44611_0.conda - conda: https://prefix.dev/conda-forge/linux-64/snappy-1.2.1-h8bd8927_1.conda - conda: https://prefix.dev/conda-forge/noarch/sortedcontainers-2.4.0-pyhd8ed1ab_1.conda - - conda: https://prefix.dev/conda-forge/noarch/sparse-0.15.5-pyh72ffeb9_0.conda - conda: https://prefix.dev/conda-forge/noarch/sympy-1.13.3-pyh2585a3b_105.conda - conda: https://prefix.dev/conda-forge/linux-64/tbb-2021.13.0-hceb3a55_1.conda - conda: https://prefix.dev/conda-forge/noarch/tblib-3.0.0-pyhd8ed1ab_1.conda @@ -2524,6 +2521,7 @@ environments: - conda: https://prefix.dev/conda-forge/linux-64/zlib-1.3.1-hb9d3cd8_2.conda - conda: https://prefix.dev/conda-forge/linux-64/zstandard-0.23.0-py310ha39cb0e_1.conda - conda: https://prefix.dev/conda-forge/linux-64/zstd-1.5.6-ha6fb4c9_0.conda + - pypi: https://files.pythonhosted.org/packages/82/84/de41ad6793c584a9b92935c4541744c169f7b6ce9ca69e98a147c412ed4a/sparse-0.16.0b3-py2.py3-none-any.whl - pypi: . osx-arm64: - conda: https://prefix.dev/conda-forge/noarch/array-api-compat-1.11.1-pyhd8ed1ab_0.conda @@ -2681,7 +2679,6 @@ environments: - conda: https://prefix.dev/conda-forge/osx-arm64/sleef-3.8-h8391f65_0.conda - conda: https://prefix.dev/conda-forge/osx-arm64/snappy-1.2.1-h98b9ce2_1.conda - conda: https://prefix.dev/conda-forge/noarch/sortedcontainers-2.4.0-pyhd8ed1ab_1.conda - - conda: https://prefix.dev/conda-forge/noarch/sparse-0.15.5-pyh72ffeb9_0.conda - conda: https://prefix.dev/conda-forge/noarch/sympy-1.13.3-pyh2585a3b_105.conda - conda: https://prefix.dev/conda-forge/noarch/tblib-3.0.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/osx-arm64/tk-8.6.13-h5083fa2_1.conda @@ -2702,6 +2699,7 @@ environments: - conda: https://prefix.dev/conda-forge/osx-arm64/zlib-1.3.1-h8359307_2.conda - conda: https://prefix.dev/conda-forge/osx-arm64/zstandard-0.23.0-py310h2665a74_1.conda - conda: https://prefix.dev/conda-forge/osx-arm64/zstd-1.5.6-hb46c0d2_0.conda + - pypi: https://files.pythonhosted.org/packages/82/84/de41ad6793c584a9b92935c4541744c169f7b6ce9ca69e98a147c412ed4a/sparse-0.16.0b3-py2.py3-none-any.whl - pypi: . win-64: - conda: https://prefix.dev/conda-forge/win-64/_openmp_mutex-4.5-2_gnu.conda @@ -2828,13 +2826,11 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/pytz-2024.1-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/win-64/pyyaml-6.0.2-py310h38315fa_2.conda - conda: https://prefix.dev/conda-forge/win-64/re2-2024.07.02-haf4117d_2.conda - - conda: https://prefix.dev/conda-forge/win-64/scipy-1.15.2-py310h15c175c_0.conda - conda: https://prefix.dev/conda-forge/noarch/setuptools-75.8.2-pyhff2d567_0.conda - conda: https://prefix.dev/conda-forge/noarch/six-1.17.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/win-64/sleef-3.8-h7e360cc_0.conda - conda: https://prefix.dev/conda-forge/win-64/snappy-1.2.1-h500f7fa_1.conda - conda: https://prefix.dev/conda-forge/noarch/sortedcontainers-2.4.0-pyhd8ed1ab_1.conda - - conda: https://prefix.dev/conda-forge/noarch/sparse-0.15.5-pyh72ffeb9_0.conda - conda: https://prefix.dev/conda-forge/noarch/sympy-1.13.3-pyh04b8f61_5.conda - conda: https://prefix.dev/conda-forge/win-64/tbb-2021.13.0-h62715c5_1.conda - conda: https://prefix.dev/conda-forge/noarch/tblib-3.0.0-pyhd8ed1ab_1.conda @@ -2860,6 +2856,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/zipp-3.21.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/win-64/zstandard-0.23.0-py310he5e10e1_1.conda - conda: https://prefix.dev/conda-forge/win-64/zstd-1.5.6-h0ea2cb4_0.conda + - pypi: https://files.pythonhosted.org/packages/82/84/de41ad6793c584a9b92935c4541744c169f7b6ce9ca69e98a147c412ed4a/sparse-0.16.0b3-py2.py3-none-any.whl - pypi: . tests-cuda: channels: @@ -3080,7 +3077,6 @@ environments: - conda: https://prefix.dev/conda-forge/linux-64/sleef-3.8-h1b44611_0.conda - conda: https://prefix.dev/conda-forge/linux-64/snappy-1.2.1-h8bd8927_1.conda - conda: https://prefix.dev/conda-forge/noarch/sortedcontainers-2.4.0-pyhd8ed1ab_1.conda - - conda: https://prefix.dev/conda-forge/noarch/sparse-0.15.5-pyh72ffeb9_0.conda - conda: https://prefix.dev/conda-forge/noarch/sympy-1.13.3-pyh2585a3b_105.conda - conda: https://prefix.dev/conda-forge/linux-64/tbb-2021.13.0-hceb3a55_1.conda - conda: https://prefix.dev/conda-forge/noarch/tblib-3.0.0-pyhd8ed1ab_1.conda @@ -3103,6 +3099,7 @@ environments: - conda: https://prefix.dev/conda-forge/linux-64/zlib-1.3.1-hb9d3cd8_2.conda - conda: https://prefix.dev/conda-forge/linux-64/zstandard-0.19.0-py310h5764c6d_0.tar.bz2 - conda: https://prefix.dev/conda-forge/linux-64/zstd-1.5.7-hb8e6e7a_1.conda + - pypi: https://files.pythonhosted.org/packages/82/84/de41ad6793c584a9b92935c4541744c169f7b6ce9ca69e98a147c412ed4a/sparse-0.16.0b3-py2.py3-none-any.whl - pypi: . osx-arm64: - conda: https://prefix.dev/conda-forge/noarch/array-api-compat-1.11.1-pyhd8ed1ab_0.conda @@ -3260,7 +3257,6 @@ environments: - conda: https://prefix.dev/conda-forge/osx-arm64/sleef-3.8-h8391f65_0.conda - conda: https://prefix.dev/conda-forge/osx-arm64/snappy-1.2.1-h98b9ce2_1.conda - conda: https://prefix.dev/conda-forge/noarch/sortedcontainers-2.4.0-pyhd8ed1ab_1.conda - - conda: https://prefix.dev/conda-forge/noarch/sparse-0.15.5-pyh72ffeb9_0.conda - conda: https://prefix.dev/conda-forge/noarch/sympy-1.13.3-pyh2585a3b_105.conda - conda: https://prefix.dev/conda-forge/noarch/tblib-3.0.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/osx-arm64/tk-8.6.13-h5083fa2_1.conda @@ -3281,6 +3277,7 @@ environments: - conda: https://prefix.dev/conda-forge/osx-arm64/zlib-1.3.1-h8359307_2.conda - conda: https://prefix.dev/conda-forge/osx-arm64/zstandard-0.23.0-py310h2665a74_1.conda - conda: https://prefix.dev/conda-forge/osx-arm64/zstd-1.5.6-hb46c0d2_0.conda + - pypi: https://files.pythonhosted.org/packages/82/84/de41ad6793c584a9b92935c4541744c169f7b6ce9ca69e98a147c412ed4a/sparse-0.16.0b3-py2.py3-none-any.whl - pypi: . win-64: - conda: https://prefix.dev/conda-forge/win-64/_openmp_mutex-4.5-2_gnu.conda @@ -3428,13 +3425,11 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/pytz-2024.1-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/win-64/pyyaml-6.0.2-py310h38315fa_2.conda - conda: https://prefix.dev/conda-forge/win-64/re2-2024.07.02-haf4117d_2.conda - - conda: https://prefix.dev/conda-forge/win-64/scipy-1.15.2-py310h15c175c_0.conda - conda: https://prefix.dev/conda-forge/noarch/setuptools-75.8.2-pyhff2d567_0.conda - conda: https://prefix.dev/conda-forge/noarch/six-1.17.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/win-64/sleef-3.8-h7e360cc_0.conda - conda: https://prefix.dev/conda-forge/win-64/snappy-1.2.1-h500f7fa_1.conda - conda: https://prefix.dev/conda-forge/noarch/sortedcontainers-2.4.0-pyhd8ed1ab_1.conda - - conda: https://prefix.dev/conda-forge/noarch/sparse-0.15.5-pyh72ffeb9_0.conda - conda: https://prefix.dev/conda-forge/noarch/sympy-1.13.3-pyh04b8f61_5.conda - conda: https://prefix.dev/conda-forge/win-64/tbb-2021.13.0-h62715c5_1.conda - conda: https://prefix.dev/conda-forge/noarch/tblib-3.0.0-pyhd8ed1ab_1.conda @@ -3460,6 +3455,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/zipp-3.21.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/win-64/zstandard-0.23.0-py310he5e10e1_1.conda - conda: https://prefix.dev/conda-forge/win-64/zstd-1.5.6-h0ea2cb4_0.conda + - pypi: https://files.pythonhosted.org/packages/82/84/de41ad6793c584a9b92935c4541744c169f7b6ce9ca69e98a147c412ed4a/sparse-0.16.0b3-py2.py3-none-any.whl - pypi: . tests-py310: channels: @@ -3788,7 +3784,7 @@ packages: - pypi: . name: array-api-extra version: 0.7.0.dev0 - sha256: af349b53edfb4298b00cbb25c5e3d68fa41ae6abcca3d0a7032f4423fe8bcd14 + sha256: 18b0cdd4c0d1503890ea125b0cb9ec618e6d9d6eb255a6bbce7da7351e784af2 requires_dist: - array-api-compat>=1.11,<2 requires_python: '>=3.10' @@ -13406,48 +13402,6 @@ packages: - pkg:pypi/scipy?source=hash-mapping size: 14548640 timestamp: 1739792791585 -- conda: https://prefix.dev/conda-forge/win-64/scipy-1.15.2-py310h15c175c_0.conda - sha256: f19350c2061b1cdc3151a33c3dd4f71a1a481f9b10ac186674f957814bc839bc - md5: 81798168111d1021e3d815217c444418 - depends: - - libblas >=3.9.0,<4.0a0 - - libcblas >=3.9.0,<4.0a0 - - liblapack >=3.9.0,<4.0a0 - - numpy <2.5 - - numpy >=1.19,<3 - - numpy >=1.23.5 - - python >=3.10,<3.11.0a0 - - python_abi 3.10.* *_cp310 - - ucrt >=10.0.20348.0 - - vc >=14.2,<15 - - vc14_runtime >=14.29.30139 - license: BSD-3-Clause - license_family: BSD - purls: - - pkg:pypi/scipy?source=hash-mapping - size: 14352068 - timestamp: 1739793156239 -- conda: https://prefix.dev/conda-forge/win-64/scipy-1.15.2-py313h2eca4b9_0.conda - sha256: 64ab269e333ab957c61053745cb967bfbe216f191a594107adcb69aca16b6294 - md5: 9ee392518b0a688b996dec39ced39e35 - depends: - - libblas >=3.9.0,<4.0a0 - - libcblas >=3.9.0,<4.0a0 - - liblapack >=3.9.0,<4.0a0 - - numpy <2.5 - - numpy >=1.21,<3 - - numpy >=1.23.5 - - python >=3.13,<3.14.0a0 - - python_abi 3.13.* *_cp313 - - ucrt >=10.0.20348.0 - - vc >=14.2,<15 - - vc14_runtime >=14.29.30139 - license: BSD-3-Clause - license_family: BSD - purls: - - pkg:pypi/scipy?source=hash-mapping - size: 15516458 - timestamp: 1739793288161 - conda: https://prefix.dev/conda-forge/noarch/setuptools-75.8.2-pyhff2d567_0.conda sha256: 91d664ace7c22e787775069418daa9f232ee8bafdd0a6a080a5ed2395a6fa6b2 md5: 9bddfdbf4e061821a1a443f93223be61 @@ -13572,20 +13526,41 @@ packages: - pkg:pypi/soupsieve?source=hash-mapping size: 36754 timestamp: 1693929424267 -- conda: https://prefix.dev/conda-forge/noarch/sparse-0.15.5-pyh72ffeb9_0.conda - sha256: 7cd9657cffe60891f418cc86d013c7872648a274c5957e626498e4e804272ec3 - md5: e640762c293807bbd75c003e18d8ff0c - depends: - - python >=3.8 - - numpy >=1.17 - - scipy >=0.19 - - numba >=0.49 - - python - license: BSD-3-Clause - license_family: BSD - purls: [] - size: 98482 - timestamp: 1736951003899 +- pypi: https://files.pythonhosted.org/packages/82/84/de41ad6793c584a9b92935c4541744c169f7b6ce9ca69e98a147c412ed4a/sparse-0.16.0b3-py2.py3-none-any.whl + name: sparse + version: 0.16.0b3 + sha256: b0b685c4a2b5bb2c34b2945300062a0f140a8d918bbe54f9393749a11e1e7a33 + requires_dist: + - numpy>=1.17 + - numba>=0.49 + - mkdocs-material ; extra == 'docs' + - mkdocstrings[python] ; extra == 'docs' + - mkdocs-gen-files ; extra == 'docs' + - mkdocs-literate-nav ; extra == 'docs' + - mkdocs-section-index ; extra == 'docs' + - mkdocs-jupyter ; extra == 'docs' + - sparse[extras] ; extra == 'docs' + - dask[array] ; extra == 'extras' + - sparse[finch] ; extra == 'extras' + - scipy ; extra == 'extras' + - scikit-learn ; extra == 'extras' + - networkx ; extra == 'extras' + - sparse[extras] ; extra == 'tests' + - pytest>=3.5 ; extra == 'tests' + - pytest-cov ; extra == 'tests' + - pytest-xdist ; extra == 'tests' + - pre-commit ; extra == 'tests' + - pytest-codspeed ; extra == 'tests' + - sparse[tests] ; extra == 'tox' + - tox ; extra == 'tox' + - sparse[tests] ; extra == 'notebooks' + - nbmake ; extra == 'notebooks' + - matplotlib ; extra == 'notebooks' + - sparse[docs,mlir,notebooks,tox] ; extra == 'all' + - matrepr ; extra == 'all' + - finch-tensor>=0.2.4 ; extra == 'finch' + - finch-mlir>=0.0.2 ; extra == 'mlir' + requires_python: '>=3.10' - conda: https://prefix.dev/conda-forge/noarch/sphinx-8.2.3-pyhd8ed1ab_0.conda sha256: 995f58c662db0197d681fa345522fd9e7ac5f05330d3dff095ab2f102e260ab0 md5: f7af826063ed569bb13f7207d6f949b0 diff --git a/pyproject.toml b/pyproject.toml index 78ab718f..2fc2fb93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -124,22 +124,21 @@ python = "~=3.10.0" python = "~=3.13.0" # Backends that can run on CPU-only hosts -[tool.pixi.feature.backends.target.linux-64.dependencies] +[tool.pixi.feature.backends.dependencies] pytorch = "*" dask = "*" -sparse = ">=0.15" +numba = "*" # sparse dependency + +[tool.pixi.feature.backends.pypi-dependencies] +sparse = { version = ">= 0.16.0b3" } + +[tool.pixi.feature.backends.target.linux-64.dependencies] jax = "*" [tool.pixi.feature.backends.target.osx-arm64.dependencies] -pytorch = "*" -dask = "*" -sparse = ">=0.15" jax = "*" [tool.pixi.feature.backends.target.win-64.dependencies] -pytorch = "*" -dask = "*" -sparse = ">=0.15" # jax = "*" # unavailable # Backends that require a GPU host and a CUDA driver diff --git a/src/array_api_extra/_delegation.py b/src/array_api_extra/_delegation.py index 0c455ae1..b6e58688 100644 --- a/src/array_api_extra/_delegation.py +++ b/src/array_api_extra/_delegation.py @@ -125,7 +125,7 @@ def pad( pad_width: int | tuple[int, int] | Sequence[tuple[int, int]], mode: Literal["constant"] = "constant", *, - constant_values: bool | int | float | complex = 0, + constant_values: complex = 0, xp: ModuleType | None = None, ) -> Array: """ @@ -168,7 +168,7 @@ def pad( pad_width = xp.flip(pad_width, axis=(0,)).flatten() return xp.nn.functional.pad(x, tuple(pad_width), value=constant_values) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] - if _delegate(xp, Backend.NUMPY, Backend.JAX, Backend.CUPY): + if _delegate(xp, Backend.NUMPY, Backend.JAX, Backend.CUPY, Backend.SPARSE): return xp.pad(x, pad_width, mode, constant_values=constant_values) return _funcs.pad(x, pad_width, constant_values=constant_values, xp=xp) diff --git a/src/array_api_extra/_lib/_funcs.py b/src/array_api_extra/_lib/_funcs.py index 43698c42..9833577a 100644 --- a/src/array_api_extra/_lib/_funcs.py +++ b/src/array_api_extra/_lib/_funcs.py @@ -575,7 +575,7 @@ def pad( x: Array, pad_width: int | tuple[int, int] | Sequence[tuple[int, int]], *, - constant_values: bool | int | float | complex = 0, + constant_values: complex = 0, xp: ModuleType, ) -> Array: # numpydoc ignore=PR01,RT01 """See docstring in `array_api_extra._delegation.py`.""" diff --git a/src/array_api_extra/_lib/_testing.py b/src/array_api_extra/_lib/_testing.py index c6be5e97..87de688d 100644 --- a/src/array_api_extra/_lib/_testing.py +++ b/src/array_api_extra/_lib/_testing.py @@ -166,8 +166,8 @@ def xp_assert_close( import numpy as np # pylint: disable=import-outside-toplevel if is_pydata_sparse_namespace(xp): - actual = actual.to_dense() # type: ignore[attr-defined] # pyright: ignore[reportAttributeAccessIssue] - desired = desired.to_dense() # type: ignore[attr-defined] # pyright: ignore[reportAttributeAccessIssue] + actual = actual.todense() # type: ignore[attr-defined] # pyright: ignore[reportAttributeAccessIssue] + desired = desired.todense() # type: ignore[attr-defined] # pyright: ignore[reportAttributeAccessIssue] # JAX uses `np.testing` assert isinstance(rtol, float) diff --git a/tests/test_funcs.py b/tests/test_funcs.py index 65d19aaa..9b5b3ace 100644 --- a/tests/test_funcs.py +++ b/tests/test_funcs.py @@ -42,7 +42,6 @@ lazy_xp_function(sinc, static_argnames="xp") -@pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="no expand_dims") class TestAtLeastND: def test_0D(self, xp: ModuleType): x = xp.asarray(1.0) @@ -69,7 +68,7 @@ def test_1D(self, xp: ModuleType): xp_assert_equal(y, xp.asarray([[0, 1]])) y = atleast_nd(x, ndim=5) - xp_assert_equal(y, xp.reshape(xp.arange(2), (1, 1, 1, 1, 2))) + xp_assert_equal(y, xp.asarray([[[[[0, 1]]]]])) def test_2D(self, xp: ModuleType): x = xp.asarray([[3.0]]) @@ -218,8 +217,10 @@ def test_xp(self, xp: ModuleType): ) +@pytest.mark.skip_xp_backend( + Backend.SPARSE, reason="read-only backend without .at support" +) class TestCreateDiagonal: - @pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="no device kwarg in zeros()") def test_1d_from_numpy(self, xp: ModuleType): # from np.diag tests vals = 100 * xp.arange(5, dtype=xp.float64) @@ -235,7 +236,6 @@ def test_1d_from_numpy(self, xp: ModuleType): xp_assert_equal(create_diagonal(vals, offset=2), b) xp_assert_equal(create_diagonal(vals, offset=-2), c) - @pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="no device kwarg in zeros()") @pytest.mark.parametrize("n", range(1, 10)) @pytest.mark.parametrize("offset", range(1, 10)) def test_1d_from_scipy(self, xp: ModuleType, n: int, offset: int): @@ -251,7 +251,6 @@ def test_0d_raises(self, xp: ModuleType): with pytest.raises(ValueError, match="1-dimensional"): _ = create_diagonal(xp.asarray(1)) - @pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="no device kwarg in zeros()") @pytest.mark.parametrize( "shape", [ @@ -277,12 +276,10 @@ def test_nd(self, xp: ModuleType, shape: tuple[int, ...]): for i in ndindex(*eager_shape(c)): xp_assert_equal(c[i], b[i[:-1]] if i[-2] == i[-1] else zero) - @pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="no device kwarg in zeros()") def test_device(self, xp: ModuleType, device: Device): x = xp.asarray([1, 2, 3], device=device) assert get_device(create_diagonal(x)) == device - @pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="no device kwarg in zeros()") def test_xp(self, xp: ModuleType): x = xp.asarray([1, 2]) y = create_diagonal(x, xp=xp) @@ -290,8 +287,8 @@ def test_xp(self, xp: ModuleType): class TestExpandDims: - @pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="no expand_dims") @pytest.mark.xfail_xp_backend(Backend.DASK, reason="tuple index out of range") + @pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="tuple index out of range") @pytest.mark.xfail_xp_backend(Backend.TORCH, reason="tuple index out of range") def test_functionality(self, xp: ModuleType): def _squeeze_all(b: Array) -> Array: @@ -308,7 +305,6 @@ def _squeeze_all(b: Array) -> Array: assert b.shape[axis] == 1 assert _squeeze_all(b).shape == s - @pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="no expand_dims") def test_axis_tuple(self, xp: ModuleType): a = xp.empty((3, 3, 3)) assert expand_dims(a, axis=(0, 1, 2)).shape == (1, 1, 1, 3, 3, 3) @@ -341,12 +337,10 @@ def test_positive_negative_repeated(self, xp: ModuleType): with pytest.raises(ValueError, match="Duplicate dimensions"): _ = expand_dims(a, axis=(3, -3)) - @pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="no expand_dims") def test_device(self, xp: ModuleType, device: Device): x = xp.asarray([1, 2, 3], device=device) assert get_device(expand_dims(x, axis=0)) == device - @pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="no expand_dims") def test_xp(self, xp: ModuleType): x = xp.asarray([1, 2, 3]) y = expand_dims(x, axis=(0, 1, 2), xp=xp) @@ -513,7 +507,6 @@ def test_xp(self, xp: ModuleType): xp_assert_equal(isclose(a, b, xp=xp), xp.asarray([True, False])) -@pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="no expand_dims") class TestKron: def test_basic(self, xp: ModuleType): # Using 0-dimensional array @@ -572,6 +565,7 @@ def test_kron_shape( k = kron(a, b) assert k.shape == expected_shape + @pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="no isdtype") def test_python_scalar(self, xp: ModuleType): a = 1 # Test no dtype promotion to xp.asarray(a); use b.dtype @@ -614,25 +608,27 @@ def test_xp(self, xp: ModuleType): xp_assert_equal(nunique(a, xp=xp), xp.asarray(3)) -@pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="no arange, no device") class TestPad: def test_simple(self, xp: ModuleType): - a = xp.arange(1, 4) + a = xp.asarray([1, 2, 3]) padded = pad(a, 2) xp_assert_equal(padded, xp.asarray([0, 0, 1, 2, 3, 0, 0])) + @pytest.mark.xfail_xp_backend( + Backend.SPARSE, reason="constant_values can only be equal to fill value" + ) def test_fill_value(self, xp: ModuleType): - a = xp.arange(1, 4) + a = xp.asarray([1, 2, 3]) padded = pad(a, 2, constant_values=42) xp_assert_equal(padded, xp.asarray([42, 42, 1, 2, 3, 42, 42])) def test_ndim(self, xp: ModuleType): - a = xp.reshape(xp.arange(2 * 3 * 4), (2, 3, 4)) + a = xp.asarray(np.reshape(np.arange(2 * 3 * 4), (2, 3, 4))) padded = pad(a, 2) assert padded.shape == (6, 7, 8) def test_mode_not_implemented(self, xp: ModuleType): - a = xp.arange(3) + a = xp.asarray([1, 2, 3]) with pytest.raises(NotImplementedError, match="Only `'constant'`"): _ = pad(a, 2, mode="edge") # type: ignore[arg-type] # pyright: ignore[reportArgumentType] @@ -645,7 +641,7 @@ def test_xp(self, xp: ModuleType): xp_assert_equal(padded, xp.asarray(0)) def test_tuple_width(self, xp: ModuleType): - a = xp.reshape(xp.arange(12), (3, 4)) + a = xp.asarray(np.reshape(np.arange(12), (3, 4))) padded = pad(a, (1, 0)) assert padded.shape == (4, 5) @@ -656,7 +652,7 @@ def test_tuple_width(self, xp: ModuleType): _ = pad(a, [(1, 2, 3)]) # type: ignore[list-item] # pyright: ignore[reportArgumentType] def test_sequence_of_tuples_width(self, xp: ModuleType): - a = xp.reshape(xp.arange(12), (3, 4)) + a = xp.asarray(np.reshape(np.arange(12), (3, 4))) padded = pad(a, ((1, 0), (0, 2))) assert padded.shape == (4, 6) @@ -678,7 +674,7 @@ def test_sequence_of_tuples_width(self, xp: ModuleType): ) -@pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="no device kwarg in asarray()") +@pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="no argsort") class TestSetDiff1D: @pytest.mark.xfail_xp_backend(Backend.DASK, reason="NaN-shaped arrays") @pytest.mark.xfail_xp_backend( diff --git a/tests/test_helpers.py b/tests/test_helpers.py index 9895e2c5..606f837a 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -17,10 +17,8 @@ lazy_xp_function(in1d, jax_jit=False, static_argnames=("assume_unique", "invert", "xp")) +@pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="no unique_inverse") class TestIn1D: - @pytest.mark.xfail_xp_backend( - Backend.SPARSE, reason="no unique_inverse, no device kwarg in asarray()" - ) # cover both code paths @pytest.mark.parametrize( "n", @@ -42,19 +40,15 @@ def test_no_invert_assume_unique(self, xp: ModuleType, n: int): actual = in1d(x1, x2) xp_assert_equal(actual, expected) - @pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="no device kwarg in asarray") def test_device(self, xp: ModuleType, device: Device): x1 = xp.asarray([3, 8, 20], device=device) x2 = xp.asarray([2, 3, 4], device=device) assert get_device(in1d(x1, x2)) == device @pytest.mark.skip_xp_backend(Backend.NUMPY_READONLY, reason="xp=xp") - @pytest.mark.xfail_xp_backend( - Backend.SPARSE, reason="no arange, no device kwarg in asarray" - ) def test_xp(self, xp: ModuleType): x1 = xp.asarray([1, 6]) - x2 = xp.arange(5) + x2 = xp.asarray([0, 1, 2, 3, 4]) expected = xp.asarray([True, False]) actual = in1d(x1, x2, xp=xp) xp_assert_equal(actual, expected) @@ -90,7 +84,7 @@ class TestAsArrays: ], ) def test_array_vs_scalar( - self, dtype: str, b: int | float | complex, defined: bool, xp: ModuleType + self, dtype: str, b: complex, defined: bool, xp: ModuleType ): a = xp.asarray(1, dtype=getattr(xp, dtype)) @@ -158,7 +152,7 @@ def test_ndindex(shape: tuple[int, ...]): assert tuple(ndindex(*shape)) == tuple(np.ndindex(*shape)) -@pytest.mark.skip_xp_backend(Backend.SPARSE, reason="index by sparse array") +@pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="index by sparse array") def test_eager_shape(xp: ModuleType, library: Backend): a = xp.asarray([1, 2, 3]) # Lazy arrays, like Dask, have an eager shape until you slice them with diff --git a/tests/test_testing.py b/tests/test_testing.py index b5ec7d85..1968eded 100644 --- a/tests/test_testing.py +++ b/tests/test_testing.py @@ -72,7 +72,7 @@ def test_assert_close_tolerance(xp: ModuleType): @param_assert_equal_close -@pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="no bool indexing") +@pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="index by sparse array") def test_assert_close_equal_none_shape(xp: ModuleType, func: Callable[..., None]): # type: ignore[no-any-explicit] """On dask and other lazy backends, test that a shape with NaN's or None's can be compared to a real shape.