Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-sparse for openSUSE:Factory checked in at 2026-08-22 21:36:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-sparse (Old) and /work/SRC/openSUSE:Factory/.python-sparse.new.1258 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-sparse" Sat Aug 22 21:36:34 2026 rev:25 rq:1373076 version:0.19.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-sparse/python-sparse.changes 2026-07-23 23:11:03.633799825 +0200 +++ /work/SRC/openSUSE:Factory/.python-sparse.new.1258/python-sparse.changes 2026-08-22 21:38:42.210714223 +0200 @@ -1,0 +2,9 @@ +Sat Aug 22 13:52:40 UTC 2026 - Dirk Müller <[email protected]> + +- update to 0.19.2: + * fix: don't let NaN fill_value poison reductions of fully- + populated slices +- update to 0.19.1: + * fix: avoid narrow-dtype overflow in reduceat group offsets + +------------------------------------------------------------------- Old: ---- sparse-0.19.0.tar.gz New: ---- sparse-0.19.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-sparse.spec ++++++ --- /var/tmp/diff_new_pack.V0cSgl/_old 2026-08-22 21:38:42.872737935 +0200 +++ /var/tmp/diff_new_pack.V0cSgl/_new 2026-08-22 21:38:42.874738007 +0200 @@ -30,7 +30,7 @@ %{?sle15_python_module_pythons} Name: python-sparse%{psuffix} -Version: 0.19.0 +Version: 0.19.2 Release: 0 Summary: Sparse n-dimensional arrays for Python License: BSD-3-Clause ++++++ sparse-0.19.0.tar.gz -> sparse-0.19.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sparse-0.19.0/.pre-commit-config.yaml new/sparse-0.19.2/.pre-commit-config.yaml --- old/sparse-0.19.0/.pre-commit-config.yaml 2026-07-02 09:30:40.000000000 +0200 +++ new/sparse-0.19.2/.pre-commit-config.yaml 2026-08-14 11:35:32.035873400 +0200 @@ -16,7 +16,7 @@ exclude: ".ipynb" - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.20 + rev: v0.16.2 hooks: - id: ruff-check args: ["--fix"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sparse-0.19.0/PKG-INFO new/sparse-0.19.2/PKG-INFO --- old/sparse-0.19.0/PKG-INFO 2026-07-02 09:32:25.244779800 +0200 +++ new/sparse-0.19.2/PKG-INFO 2026-08-14 11:37:10.265489000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.4 Name: sparse -Version: 0.19.0 +Version: 0.19.2 Summary: Sparse n-dimensional arrays for the PyData ecosystem Maintainer-email: Hameer Abbasi <[email protected]> License: BSD 3-Clause License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sparse-0.19.0/sparse/_version.py new/sparse-0.19.2/sparse/_version.py --- old/sparse-0.19.0/sparse/_version.py 2026-07-02 09:32:25.000000000 +0200 +++ new/sparse-0.19.2/sparse/_version.py 2026-08-14 11:37:10.177766600 +0200 @@ -18,7 +18,7 @@ commit_id: str | None __commit_id__: str | None -__version__ = version = '0.19.0' -__version_tuple__ = version_tuple = (0, 19, 0) +__version__ = version = '0.19.2' +__version_tuple__ = version_tuple = (0, 19, 2) -__commit_id__ = commit_id = 'g39331ecc7' +__commit_id__ = commit_id = 'g90ecf60e0' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sparse-0.19.0/sparse/numba_backend/_coo/core.py new/sparse-0.19.2/sparse/numba_backend/_coo/core.py --- old/sparse-0.19.0/sparse/numba_backend/_coo/core.py 2026-07-02 09:30:40.000000000 +0200 +++ new/sparse-0.19.2/sparse/numba_backend/_coo/core.py 2026-08-04 10:32:40.797483700 +0200 @@ -1600,13 +1600,18 @@ @numba.jit(nopython=True, nogil=True) # pragma: no cover def _calc_counts_invidx(groups): + # NB: inv_idx/counts index into the (potentially much larger) nnz-length data + # array, so they must not be narrowed to groups.dtype, which is only sized to fit + # the group values (e.g. a shape dimension). Doing so silently overflows for + # arrays with more stored elements than the dtype max, e.g. int16 wraps negative + # past 32767 nnz, causing an IndexError in the np.add.reduceat call downstream. inv_idx = [] counts = [] if len(groups) == 0: return ( - np.array(inv_idx, dtype=groups.dtype), - np.array(counts, dtype=groups.dtype), + np.array(inv_idx, dtype=np.intp), + np.array(counts, dtype=np.intp), ) inv_idx.append(0) @@ -1614,13 +1619,13 @@ last_group = groups[0] for i in range(1, len(groups)): if groups[i] != last_group: - counts.append(i - inv_idx[-1]) - inv_idx.append(i) + counts.append(np.intp(i - inv_idx[-1])) + inv_idx.append(np.intp(i)) last_group = groups[i] - counts.append(len(groups) - inv_idx[-1]) + counts.append(np.intp(len(groups) - inv_idx[-1])) - return (np.array(inv_idx, dtype=groups.dtype), np.array(counts, dtype=groups.dtype)) + return (np.array(inv_idx, dtype=np.intp), np.array(counts, dtype=np.intp)) def _grouped_reduce(x, groups, method, **kwargs): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sparse-0.19.0/sparse/numba_backend/_sparse_array.py new/sparse-0.19.2/sparse/numba_backend/_sparse_array.py --- old/sparse-0.19.0/sparse/numba_backend/_sparse_array.py 2026-07-01 12:47:22.000000000 +0200 +++ new/sparse-0.19.2/sparse/numba_backend/_sparse_array.py 2026-08-14 11:35:32.036348800 +0200 @@ -407,10 +407,18 @@ missing_counts = counts != n_cols data[missing_counts] = method(data[missing_counts], self.fill_value, **kwargs) else: - data = method( - data, - reduce_super_ufunc(self.fill_value, n_cols - counts), - ).astype(data.dtype) + n_fill = n_cols - counts + with np.errstate(invalid="ignore"): + # Suppresses spurious "invalid value" warnings from e.g. `nan * 0` + # below, for entries the following `np.where` discards anyway. + contribution = reduce_super_ufunc(self.fill_value, n_fill) + if method.identity is not None: + # Positions with no fill-value contribution (n_fill == 0) must reduce + # to the ufunc's identity, not `reduce_super_ufunc(fill_value, 0)`: + # e.g. `nan * 0 == nan`, even though 0 is the correct (identity) + # contribution of "no missing/fill elements" to a sum. + contribution = np.where(n_fill == 0, method.identity, contribution) + data = method(data, contribution).astype(data.dtype) result_fill_value = reduce_super_ufunc(self.fill_value, n_cols) out = self._reduce_return(data, arr_attrs, result_fill_value) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sparse-0.19.0/sparse/numba_backend/tests/test_coo.py new/sparse-0.19.2/sparse/numba_backend/tests/test_coo.py --- old/sparse-0.19.0/sparse/numba_backend/tests/test_coo.py 2026-07-02 09:30:40.000000000 +0200 +++ new/sparse-0.19.2/sparse/numba_backend/tests/test_coo.py 2026-08-14 11:35:32.036871200 +0200 @@ -165,6 +165,24 @@ assert_eq(expected, actual) [email protected]("reduction", ["sum", "mean"]) [email protected]("axis", [None, 0, 1]) +def test_reduction_nan_fill_value(reduction, axis): + # Regression test: a NaN `fill_value` must not poison reduction results for + # positions/slices that have no implicit (fill) elements contributing to them. + # `reduce_super_ufunc(fill_value, n_fill)` (e.g. `fill_value * n_fill` for `sum`) + # must use the ufunc's identity when `n_fill == 0`, since e.g. `nan * 0 == nan` + # even though 0 is the correct contribution of "no missing elements". + coords = [[0, 0, 1, 1, 2, 2], [0, 1, 0, 1, 0, 1]] + data = [0.586, 0.021, np.nan, 0.156, 0.363, 0.281] + s = COO(coords, data, shape=(3, 2), fill_value=np.nan) + x = s.todense() + + expected = getattr(np, reduction)(x, axis=axis) + actual = getattr(s, reduction)(axis=axis) + assert_eq(expected, actual) + + @pytest.mark.parametrize("reduction", ["nanmax", "nanmin", "nanmean"]) @pytest.mark.parametrize("axis", [None, 0, 1]) def test_all_nan_reduction_warning(reduction, axis): @@ -762,6 +780,25 @@ assert b.nnz > 100000 +def test_reduce_narrow_idx_dtype(rng): + # Regression test: a narrow idx_dtype is a legitimate choice when the array + # *shape* is small, but reductions must not reuse that dtype for internal + # group offsets, which index into the (possibly much larger) nnz-length data + # array. Previously overflowed/wrapped negative once nnz exceeded the dtype's + # max (e.g. 32767 for int16), raising "IndexError: index ... out-of-bounds in + # add.reduceat". + shape = (200, 20, 10) + coords = np.mgrid[0 : shape[0], 0 : shape[1], 0 : shape[2]].reshape(3, -1) + data = rng.random(coords.shape[1]) + a = COO(coords, data, shape=shape, idx_dtype=np.int16) + assert a.nnz > np.iinfo(np.int16).max + + x = a.todense() + assert_eq(a.sum(axis=(1, 2)), x.sum(axis=(1, 2))) + assert_eq(a.mean(axis=(1, 2)), x.mean(axis=(1, 2))) + assert_eq(a.max(axis=(1, 2)), x.max(axis=(1, 2))) + + def test_add_many_sparse_arrays(): x = COO({(1, 1): 1}, shape=(2, 2)) y = sum([x] * 100) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sparse-0.19.0/sparse.egg-info/PKG-INFO new/sparse-0.19.2/sparse.egg-info/PKG-INFO --- old/sparse-0.19.0/sparse.egg-info/PKG-INFO 2026-07-02 09:32:25.000000000 +0200 +++ new/sparse-0.19.2/sparse.egg-info/PKG-INFO 2026-08-14 11:37:10.206205100 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.4 Name: sparse -Version: 0.19.0 +Version: 0.19.2 Summary: Sparse n-dimensional arrays for the PyData ecosystem Maintainer-email: Hameer Abbasi <[email protected]> License: BSD 3-Clause License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sparse-0.19.0/sparse.egg-info/scm_file_list.json new/sparse-0.19.2/sparse.egg-info/scm_file_list.json --- old/sparse-0.19.0/sparse.egg-info/scm_file_list.json 2026-07-02 09:32:25.000000000 +0200 +++ new/sparse-0.19.2/sparse.egg-info/scm_file_list.json 2026-08-14 11:37:10.204241500 +0200 @@ -1,150 +1,150 @@ { "files": [ - "mkdocs.yml", ".codecov.yml", - "pixi.toml", - "pytest.ini", - "LICENSE", - ".pre-commit-config.yaml", - "pyproject.toml", - "pixi.lock", ".coveragerc", + ".gitattributes", + ".github/CODE_OF_CONDUCT.md", + ".github/FUNDING.yml", + ".github/ISSUE_TEMPLATE/bug_report.yml", + ".github/ISSUE_TEMPLATE/config.yml", + ".github/ISSUE_TEMPLATE/doc_issue.yml", + ".github/ISSUE_TEMPLATE/feature_request.yml", + ".github/ISSUE_TEMPLATE/question-support.yml", + ".github/dependabot.yml", + ".github/pull_request_template.md", + ".github/release-drafter.yml", + ".github/workflows/ci.yml", + ".github/workflows/codspeed.yml", + ".github/workflows/release-drafter.yml", + ".gitignore", + ".pre-commit-config.yaml", ".readthedocs.yml", + "LICENSE", "README.md", - ".gitignore", - "tox.ini", - ".gitattributes", - "setup.cfg", - "release-procedure.md", - "xp-tests/Numba-array-api-skips.txt", - "xp-tests/Finch-array-api-skips.txt", - "xp-tests/array-api-tests-rev.txt", - "xp-tests/Numba-array-api-xfails.txt", - "xp-tests/Finch-array-api-xfails.txt", - "docs/examples.md", - "docs/construct.md", - "docs/operations.md", + "benchmarks/__init__.py", + "benchmarks/conftest.py", + "benchmarks/test_benchmark_coo.py", + "benchmarks/test_elemwise.py", + "benchmarks/test_tensordot.py", + "benchmarks/utils.py", + "benchmarks_original/__init__.py", + "benchmarks_original/elemwise_example.py", + "benchmarks_original/matmul_example.py", + "benchmarks_original/mttkrp_example.py", + "benchmarks_original/sddmm_example.py", + "benchmarks_original/spmv_add_example.py", + "benchmarks_original/utils.py", "docs/api.md", + "docs/assets/images/check-list-icon.png", + "docs/assets/images/conference-room-icon.png", + "docs/assets/images/group-discussion-icon.png", + "docs/assets/images/install-software-download-icon.png", + "docs/assets/images/logo.png", + "docs/assets/images/logo.svg", + "docs/assets/images/logo_with_text.svg", + "docs/assets/images/open-book-icon.png", + "docs/assets/images/repair-fix-repairing-icon.png", "docs/changelog.md", - "docs/quickstart.md", - "docs/how-to-guides.md", - "docs/install.md", - "docs/introduction.md", - "docs/migration-jl.md", "docs/completed-tasks.md", - "docs/roadmap.md", - "docs/index.md", - "docs/logo.png", - "docs/contributing.md", - "docs/gen_logo.py", - "docs/logo.svg", "docs/conduct.md", + "docs/construct.md", + "docs/contributing.md", "docs/css/mkdocstrings.css", - "docs/js/katex.js", - "docs/examples/formats_example_finch.py", + "docs/examples.md", "docs/examples/dask_example.py", "docs/examples/formats_example.py", + "docs/examples/formats_example_finch.py", "docs/examples/scipy_example.py", - "docs/assets/images/check-list-icon.png", - "docs/assets/images/open-book-icon.png", - "docs/assets/images/install-software-download-icon.png", - "docs/assets/images/conference-room-icon.png", - "docs/assets/images/logo_with_text.svg", - "docs/assets/images/logo.png", - "docs/assets/images/group-discussion-icon.png", - "docs/assets/images/repair-fix-repairing-icon.png", - "docs/assets/images/logo.svg", - "examples/sddmm_example.py", - "examples/triangles_example.py", - "examples/hits_example.py", - "examples/mttkrp_example.py", + "docs/gen_logo.py", + "docs/how-to-guides.md", + "docs/index.md", + "docs/install.md", + "docs/introduction.md", + "docs/js/katex.js", + "docs/logo.png", + "docs/logo.svg", + "docs/migration-jl.md", + "docs/operations.md", + "docs/quickstart.md", + "docs/roadmap.md", "examples/__init__.py", + "examples/elemwise_example.py", + "examples/hits_example.py", "examples/matmul_example.py", - "examples/utils.py", + "examples/mttkrp_example.py", + "examples/sddmm_example.py", "examples/sparse_finch.ipynb", - "examples/elemwise_example.py", "examples/spmv_add_example.py", - "benchmarks/test_benchmark_coo.py", - "benchmarks/conftest.py", - "benchmarks/test_tensordot.py", - "benchmarks/__init__.py", - "benchmarks/test_elemwise.py", - "benchmarks/utils.py", + "examples/triangles_example.py", + "examples/utils.py", + "mkdocs.yml", + "pixi.lock", + "pixi.toml", + "pyproject.toml", + "pytest.ini", + "release-procedure.md", "scripts/gen_ref_pages.py", "scripts/test_examples.sh", "scripts/test_notebooks.sh", - ".github/FUNDING.yml", - ".github/CODE_OF_CONDUCT.md", - ".github/pull_request_template.md", - ".github/release-drafter.yml", - ".github/dependabot.yml", - ".github/workflows/release-drafter.yml", - ".github/workflows/codspeed.yml", - ".github/workflows/ci.yml", - ".github/ISSUE_TEMPLATE/question-support.yml", - ".github/ISSUE_TEMPLATE/feature_request.yml", - ".github/ISSUE_TEMPLATE/bug_report.yml", - ".github/ISSUE_TEMPLATE/config.yml", - ".github/ISSUE_TEMPLATE/doc_issue.yml", - "benchmarks_original/sddmm_example.py", - "benchmarks_original/mttkrp_example.py", - "benchmarks_original/__init__.py", - "benchmarks_original/matmul_example.py", - "benchmarks_original/utils.py", - "benchmarks_original/elemwise_example.py", - "benchmarks_original/spmv_add_example.py", - "sparse/conftest.py", + "setup.cfg", "sparse/__init__.py", - "sparse/tests/conftest.py", - "sparse/tests/__init__.py", - "sparse/tests/test_backends.py", + "sparse/conftest.py", "sparse/finch_backend/__init__.py", - "sparse/mlir_backend/_ops.py", - "sparse/mlir_backend/_conversions.py", - "sparse/mlir_backend/_common.py", "sparse/mlir_backend/__init__.py", + "sparse/mlir_backend/_array.py", + "sparse/mlir_backend/_common.py", + "sparse/mlir_backend/_conversions.py", "sparse/mlir_backend/_core.py", "sparse/mlir_backend/_dtypes.py", + "sparse/mlir_backend/_ops.py", "sparse/mlir_backend/formats.py", - "sparse/mlir_backend/_array.py", + "sparse/mlir_backend/tests/__init__.py", "sparse/mlir_backend/tests/conftest.py", "sparse/mlir_backend/tests/test_simple.py", - "sparse/mlir_backend/tests/__init__.py", - "sparse/numba_backend/_io.py", - "sparse/numba_backend/_common.py", "sparse/numba_backend/__init__.py", - "sparse/numba_backend/_umath.py", - "sparse/numba_backend/_slicing.py", - "sparse/numba_backend/_settings.py", + "sparse/numba_backend/_common.py", + "sparse/numba_backend/_compressed/__init__.py", + "sparse/numba_backend/_compressed/common.py", + "sparse/numba_backend/_compressed/compressed.py", + "sparse/numba_backend/_compressed/convert.py", + "sparse/numba_backend/_compressed/indexing.py", + "sparse/numba_backend/_coo/__init__.py", + "sparse/numba_backend/_coo/common.py", + "sparse/numba_backend/_coo/core.py", + "sparse/numba_backend/_coo/indexing.py", + "sparse/numba_backend/_coo/numba_extension.py", + "sparse/numba_backend/_dok.py", + "sparse/numba_backend/_io.py", "sparse/numba_backend/_numba_extension.py", + "sparse/numba_backend/_settings.py", + "sparse/numba_backend/_slicing.py", "sparse/numba_backend/_sparse_array.py", + "sparse/numba_backend/_umath.py", "sparse/numba_backend/_utils.py", - "sparse/numba_backend/_dok.py", - "sparse/numba_backend/tests/test_coo.py", - "sparse/numba_backend/tests/conftest.py", - "sparse/numba_backend/tests/test_namespace.py", - "sparse/numba_backend/tests/test_compressed_2d.py", "sparse/numba_backend/tests/__init__.py", + "sparse/numba_backend/tests/conftest.py", "sparse/numba_backend/tests/test_array_function.py", - "sparse/numba_backend/tests/test_dok.py", - "sparse/numba_backend/tests/test_io.py", - "sparse/numba_backend/tests/test_conversion.py", - "sparse/numba_backend/tests/test_elemwise.py", - "sparse/numba_backend/tests/test_dot.py", "sparse/numba_backend/tests/test_compressed.py", - "sparse/numba_backend/tests/test_coo_numba.py", - "sparse/numba_backend/tests/test_einsum.py", + "sparse/numba_backend/tests/test_compressed_2d.py", "sparse/numba_backend/tests/test_compressed_convert.py", + "sparse/numba_backend/tests/test_conversion.py", + "sparse/numba_backend/tests/test_coo.py", + "sparse/numba_backend/tests/test_coo_numba.py", "sparse/numba_backend/tests/test_dask_interop.py", - "sparse/numba_backend/_coo/__init__.py", - "sparse/numba_backend/_coo/core.py", - "sparse/numba_backend/_coo/numba_extension.py", - "sparse/numba_backend/_coo/common.py", - "sparse/numba_backend/_coo/indexing.py", - "sparse/numba_backend/_compressed/compressed.py", - "sparse/numba_backend/_compressed/convert.py", - "sparse/numba_backend/_compressed/__init__.py", - "sparse/numba_backend/_compressed/common.py", - "sparse/numba_backend/_compressed/indexing.py" + "sparse/numba_backend/tests/test_dok.py", + "sparse/numba_backend/tests/test_dot.py", + "sparse/numba_backend/tests/test_einsum.py", + "sparse/numba_backend/tests/test_elemwise.py", + "sparse/numba_backend/tests/test_io.py", + "sparse/numba_backend/tests/test_namespace.py", + "sparse/tests/__init__.py", + "sparse/tests/conftest.py", + "sparse/tests/test_backends.py", + "tox.ini", + "xp-tests/Finch-array-api-skips.txt", + "xp-tests/Finch-array-api-xfails.txt", + "xp-tests/Numba-array-api-skips.txt", + "xp-tests/Numba-array-api-xfails.txt", + "xp-tests/array-api-tests-rev.txt" ] } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sparse-0.19.0/sparse.egg-info/scm_version.json new/sparse-0.19.2/sparse.egg-info/scm_version.json --- old/sparse-0.19.0/sparse.egg-info/scm_version.json 2026-07-02 09:32:25.000000000 +0200 +++ new/sparse-0.19.2/sparse.egg-info/scm_version.json 2026-08-14 11:37:10.193649000 +0200 @@ -1,8 +1,8 @@ { - "tag": "0.19.0", + "tag": "0.19.2", "distance": 0, - "node": "g39331ecc7ab904bfa203fa89829faa4800fc42c8", + "node": "g90ecf60e0568fc9616dad44d841ea3e82c825be4", "dirty": false, "branch": "main", - "node_date": "2026-07-01" + "node_date": "2026-08-14" }
