Skip to content

Backport PR #4404 on branch 1.12.x (fix: handle zero counts in Pearson residual normalization) - #4475

Merged
flying-sheep merged 1 commit into
scverse:1.12.xfrom
meeseeksmachine:auto-backport-of-pr-4404-on-1.12.x
Nov 3, 2026
Merged

flying-sheep merged 1 commit into
scverse:1.12.xfrom
meeseeksmachine:auto-backport-of-pr-4404-on-1.12.x

Conversation

@meeseeksmachine

Copy link
Copy Markdown
Contributor

Backport PR #4404: fix: handle zero counts in Pearson residual normalization

@lumberbot-app lumberbot-app Bot added this to the 1.12.6 milestone Nov 3, 2026
@flying-sheep
flying-sheep enabled auto-merge (squash) November 3, 2026 16:11
@codecov

codecov Bot commented Nov 3, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2129 1 2128 1054
View the top 1 failed test(s) by shortest run time
tests/test_datasets.py::test_pbmc68k_reduced
Stack Traces | 0.031s run time
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_pbmc68k_reduced#x1B[39;49;00m():#x1B[90m#x1B[39;49;00m
        #x1B[94mwith#x1B[39;49;00m warnings.catch_warnings():#x1B[90m#x1B[39;49;00m
            warnings.simplefilter(#x1B[33m"#x1B[39;49;00m#x1B[33merror#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
>           sc.datasets.pbmc68k_reduced()#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_datasets.py#x1B[0m:113: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[.../scanpy/datasets/_datasets.py#x1B[0m:379: in pbmc68k_reduced
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m read_h5ad(HERE / #x1B[33m"#x1B[39;49;00m#x1B[33m10x_pbmc68k_reduced.h5ad#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/_io/h5ad.py#x1B[0m:297: in read_h5ad
    #x1B[0madata = read_dispatched(f, callback=callback)#x1B[90m#x1B[39;49;00m
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/experimental/_dispatch_io.py#x1B[0m:39: in read_dispatched
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m reader.read_elem(elem)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/_io/utils.py#x1B[0m:235: in func_wrapper
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../_io/specs/registry.py#x1B[0m:304: in read_elem
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m.callback(read_func, elem.name, elem, iospec=iospec)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/_io/h5ad.py#x1B[0m:279: in callback
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m AnnData(**{#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:276: in __init__
    #x1B[0m#x1B[96mself#x1B[39;49;00m._init_as_actual(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:514: in _init_as_actual
    #x1B[0m#x1B[96mself#x1B[39;49;00m._raw = Raw(#x1B[96mself#x1B[39;49;00m, **raw)#x1B[90m#x1B[39;49;00m
                ^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/_core/raw.py#x1B[0m:53: in __init__
    #x1B[0m#x1B[96mself#x1B[39;49;00m._var = _gen_dataframe(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../...../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/functools.py#x1B[0m:982: in wrapper
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m dispatch(args[#x1B[94m0#x1B[39;49;00m].#x1B[91m__class__#x1B[39;49;00m)(*args, **kw)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/_core/aligned_df.py#x1B[0m:100: in _gen_dataframe_df
    #x1B[0manno.columns = pandas_as_str(anno.columns)#x1B[90m#x1B[39;49;00m
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/compat/__init__.py#x1B[0m:249: in pandas_as_str
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m a #x1B[94mif#x1B[39;49;00m pd.options.future.infer_string #x1B[94melse#x1B[39;49;00m a.astype(#x1B[96mobject#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../pandas/_config/config.py#x1B[0m:454: in __getattr__
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m get_option(prefix)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../pandas/_config/config.py#x1B[0m:190: in get_option
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m _get_option_impl(pat)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../pandas/_config/config.py#x1B[0m:194: in _get_option_impl
    #x1B[0mkey = _get_single_key(pat, warn=warn)#x1B[90m#x1B[39;49;00m
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../pandas/_config/config.py#x1B[0m:139: in _get_single_key
    #x1B[0m_warn_if_deprecated(key, extra_stacklevel=extra_stacklevel)#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

key = 'future.infer_string', extra_stacklevel = 0

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92m_warn_if_deprecated#x1B[39;49;00m(key: #x1B[96mstr#x1B[39;49;00m, extra_stacklevel: #x1B[96mint#x1B[39;49;00m = #x1B[94m0#x1B[39;49;00m) -> #x1B[96mbool#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
    #x1B[33m    Checks if `key` is a deprecated option and if so, prints a warning.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    Returns#x1B[39;49;00m
    #x1B[33m    -------#x1B[39;49;00m
    #x1B[33m    bool - True if `key` is deprecated, False otherwise.#x1B[39;49;00m
    #x1B[33m    """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        d = _get_deprecated_option(key)#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m d:#x1B[90m#x1B[39;49;00m
            stacklevel = find_stack_level() + extra_stacklevel#x1B[90m#x1B[39;49;00m
            #x1B[94mif#x1B[39;49;00m d.msg:#x1B[90m#x1B[39;49;00m
>               warnings.warn(#x1B[90m#x1B[39;49;00m
                    d.msg,#x1B[90m#x1B[39;49;00m
                    d.category,#x1B[90m#x1B[39;49;00m
                    stacklevel=stacklevel,#x1B[90m#x1B[39;49;00m
                )#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE               pandas.errors.Pandas4Warning: The 'future.infer_string' option is deprecated and will be removed in pandas 4.0. Inferring str dtype for string data has been the default since pandas 3.0, and it will no longer be possible to disable it.#x1B[0m
#x1B[1m#x1B[31mE               Error raised while reading key '' of <class 'h5py._hl.files.File'> from /#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../pandas/_config/config.py#x1B[0m:752: Pandas4Warning

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@flying-sheep
flying-sheep disabled auto-merge November 3, 2026 16:37
@flying-sheep
flying-sheep merged commit c959dda into scverse:1.12.x Nov 3, 2026
3 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants