Skip to content

feat: v2 datasets - #4524

Open
flying-sheep wants to merge 5 commits into
mainfrom
v2-data
Open

flying-sheep wants to merge 5 commits into
mainfrom
v2-data

Conversation

@flying-sheep

@flying-sheep flying-sheep commented Nov 16, 2026 •

Copy link
Copy Markdown
Member
  • added a script that creates the v2 datasets from the old versions
  • uploaded the one we don’t include in our wheel under a new registry name
  • gated the new version behind the v2 preview preset so can be backported to 1.13.1

tests might fail because I overwrote the dataset (forgot to remove .raw) – should work in 3 hours when the cloudflare cache times out


  • Closes modernize datasets #4044
  • Tests included or not required because:
  • Release notes not necessary because:
  • LLM or coding agent used: Claude Opus 5.5 via Claude Code
  • If one was used, I, a human, have reviewed, understood and tested every changed line

@flying-sheep flying-sheep added this to the 1.13.1 milestone Nov 16, 2026
Comment thread ci/scripts/datasets-v2.py

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not the best spot for this one-time-run script, but the only script dir we have.

@flying-sheep flying-sheep Nov 16, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repeatedly writing into a zip file makes it bigger …

this is smaller since it doesn’t contain duplicate metadata. only other change is that the X_-less keys are now in the file and the old keys are reconstructed in the dataset code.

@codecov

codecov Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

❌ 12 Tests Failed:

Tests completed Failed Passed Skipped
2654 12 2642 1397
View the top 3 failed test(s) by shortest run time
tests/test_aggregated.py::test_combine_categories[three]
Stack Traces | 0.003s run time
label_cols = {'a': ['a', 'b', 'c']
Categories (3, str): ['a', 'b', 'c'], 'b': ['d', 'd', 'f']
Categories (2, str): ['d', 'f'], 'c': ['g', 'h', 'h']
Categories (2, str): ['g', 'h']}
expected = ['a_d_g', 'b_d_h', 'c_f_h']
Categories (3, str): ['a_d_g', 'b_d_h', 'c_f_h']

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
        (#x1B[33m"#x1B[39;49;00m#x1B[33mlabel_cols#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mexpected#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
        [#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[96mdict#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
                    a=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    b=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    c=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mg#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma_d_g#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc_f_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mthree#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[96mdict#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
                    a=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    b=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc_f#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mtwo-1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[96mdict#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
                    a=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    c=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mg#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma_g#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mtwo-2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[96mdict#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
                    b=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    c=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mg#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33md_g#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mf_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mtwo-3#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
        ],#x1B[90m#x1B[39;49;00m
    )#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_combine_categories#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        label_cols: #x1B[96mdict#x1B[39;49;00m[#x1B[96mstr#x1B[39;49;00m, pd.Categorical], expected: pd.Categorical#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        #x1B[94mfrom#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[04m#x1B[96mscanpy#x1B[39;49;00m#x1B[04m#x1B[96m.#x1B[39;49;00m#x1B[04m#x1B[96mget#x1B[39;49;00m#x1B[04m#x1B[96m.#x1B[39;49;00m#x1B[04m#x1B[96m_aggregated#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[94mimport#x1B[39;49;00m _combine_categories#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        label_df = pd.DataFrame(label_cols)#x1B[90m#x1B[39;49;00m
        result, result_label_df = _combine_categories(label_df)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[94massert#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(result, pd.Categorical)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       pd.testing.assert_extension_array_equal(result, expected)#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_aggregated.py#x1B[0m:460: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

left = ['a_d_g', 'b_d_h', 'c_f_h']
Categories (3, object): ['a_d_g', 'b_d_h', 'c_f_h']
right = ['a_d_g', 'b_d_h', 'c_f_h']
Categories (3, str): ['a_d_g', 'b_d_h', 'c_f_h']
check_dtype = True, index_values = None, check_exact = False, rtol = 1e-05
atol = 1e-08, obj = 'ExtensionArray'

    #x1B[0m#x1B[37m@set_module#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mpandas.testing#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92massert_extension_array_equal#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        left: ExtensionArray,#x1B[90m#x1B[39;49;00m
        right: ExtensionArray,#x1B[90m#x1B[39;49;00m
        check_dtype: #x1B[96mbool#x1B[39;49;00m | Literal[#x1B[33m"#x1B[39;49;00m#x1B[33mequiv#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = #x1B[94mTrue#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        index_values: Index | np.ndarray | #x1B[94mNone#x1B[39;49;00m = #x1B[94mNone#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        check_exact: #x1B[96mbool#x1B[39;49;00m | lib.NoDefault = lib.no_default,#x1B[90m#x1B[39;49;00m
        rtol: #x1B[96mfloat#x1B[39;49;00m | lib.NoDefault = lib.no_default,#x1B[90m#x1B[39;49;00m
        atol: #x1B[96mfloat#x1B[39;49;00m | lib.NoDefault = lib.no_default,#x1B[90m#x1B[39;49;00m
        obj: #x1B[96mstr#x1B[39;49;00m = #x1B[33m"#x1B[39;49;00m#x1B[33mExtensionArray#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
    #x1B[33m    Check that left and right ExtensionArrays are equal.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    This method compares two ``ExtensionArray`` instances for equality,#x1B[39;49;00m
    #x1B[33m    including checks for missing values, the dtype of the arrays, and#x1B[39;49;00m
    #x1B[33m    the exactness of the comparison (or tolerance when comparing floats).#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    Parameters#x1B[39;49;00m
    #x1B[33m    ----------#x1B[39;49;00m
    #x1B[33m    left, right : ExtensionArray#x1B[39;49;00m
    #x1B[33m        The two arrays to compare.#x1B[39;49;00m
    #x1B[33m    check_dtype : bool, default True#x1B[39;49;00m
    #x1B[33m        Whether to check if the ExtensionArray dtypes are identical.#x1B[39;49;00m
    #x1B[33m    index_values : Index | numpy.ndarray, default None#x1B[39;49;00m
    #x1B[33m        Optional index (shared by both left and right), used in output.#x1B[39;49;00m
    #x1B[33m    check_exact : bool, default False#x1B[39;49;00m
    #x1B[33m        Whether to compare number exactly.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m        .. versionchanged:: 2.2.0#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m            Defaults to True for integer dtypes if none of#x1B[39;49;00m
    #x1B[33m            ``check_exact``, ``rtol`` and ``atol`` are specified.#x1B[39;49;00m
    #x1B[33m    rtol : float, default 1e-5#x1B[39;49;00m
    #x1B[33m        Relative tolerance. Only used when check_exact is False, and only#x1B[39;49;00m
    #x1B[33m        applied to numeric dtypes; values of other dtypes, such as interval,#x1B[39;49;00m
    #x1B[33m        are always compared exactly.#x1B[39;49;00m
    #x1B[33m    atol : float, default 1e-8#x1B[39;49;00m
    #x1B[33m        Absolute tolerance. Only used when check_exact is False, and only#x1B[39;49;00m
    #x1B[33m        applied to numeric dtypes; values of other dtypes, such as interval,#x1B[39;49;00m
    #x1B[33m        are always compared exactly.#x1B[39;49;00m
    #x1B[33m    obj : str, default 'ExtensionArray'#x1B[39;49;00m
    #x1B[33m        Specify object name being compared, internally used to show appropriate#x1B[39;49;00m
    #x1B[33m        assertion message.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m        .. versionadded:: 2.0.0#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    See Also#x1B[39;49;00m
    #x1B[33m    --------#x1B[39;49;00m
    #x1B[33m    testing.assert_series_equal : Check that left and right ``Series`` are equal.#x1B[39;49;00m
    #x1B[33m    testing.assert_frame_equal : Check that left and right ``DataFrame`` are equal.#x1B[39;49;00m
    #x1B[33m    testing.assert_index_equal : Check that left and right ``Index`` are equal.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    Notes#x1B[39;49;00m
    #x1B[33m    -----#x1B[39;49;00m
    #x1B[33m    Missing values are checked separately from valid values.#x1B[39;49;00m
    #x1B[33m    A mask of missing values is computed for each and checked to match.#x1B[39;49;00m
    #x1B[33m    The remaining all-valid values are cast to object dtype and checked.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    Examples#x1B[39;49;00m
    #x1B[33m    --------#x1B[39;49;00m
    #x1B[33m    >>> from pandas import testing as tm#x1B[39;49;00m
    #x1B[33m    >>> a = pd.Series([1, 2, 3, 4])#x1B[39;49;00m
    #x1B[33m    >>> b, c = a.array, a.array#x1B[39;49;00m
    #x1B[33m    >>> tm.assert_extension_array_equal(b, c)#x1B[39;49;00m
    #x1B[33m    """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m (#x1B[90m#x1B[39;49;00m
            check_exact #x1B[95mis#x1B[39;49;00m lib.no_default#x1B[90m#x1B[39;49;00m
            #x1B[95mand#x1B[39;49;00m rtol #x1B[95mis#x1B[39;49;00m lib.no_default#x1B[90m#x1B[39;49;00m
            #x1B[95mand#x1B[39;49;00m atol #x1B[95mis#x1B[39;49;00m lib.no_default#x1B[90m#x1B[39;49;00m
        ):#x1B[90m#x1B[39;49;00m
            check_exact = (#x1B[90m#x1B[39;49;00m
                is_numeric_dtype(left.dtype) #x1B[95mand#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m is_float_dtype(left.dtype)#x1B[90m#x1B[39;49;00m
            ) #x1B[95mor#x1B[39;49;00m (is_numeric_dtype(right.dtype) #x1B[95mand#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m is_float_dtype(right.dtype))#x1B[90m#x1B[39;49;00m
        #x1B[94melif#x1B[39;49;00m check_exact #x1B[95mis#x1B[39;49;00m lib.no_default:#x1B[90m#x1B[39;49;00m
            check_exact = #x1B[94mFalse#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        rtol = rtol #x1B[94mif#x1B[39;49;00m rtol #x1B[95mis#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m lib.no_default #x1B[94melse#x1B[39;49;00m #x1B[94m1.0e-5#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        atol = atol #x1B[94mif#x1B[39;49;00m atol #x1B[95mis#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m lib.no_default #x1B[94melse#x1B[39;49;00m #x1B[94m1.0e-8#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[94massert#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(left, ExtensionArray), #x1B[33m"#x1B[39;49;00m#x1B[33mleft is not an ExtensionArray#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94massert#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(right, ExtensionArray), #x1B[33m"#x1B[39;49;00m#x1B[33mright is not an ExtensionArray#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m check_dtype:#x1B[90m#x1B[39;49;00m
>           assert_attr_equal(#x1B[33m"#x1B[39;49;00m#x1B[33mdtype#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, left, right, obj=#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mAttributes of #x1B[39;49;00m#x1B[33m{#x1B[39;49;00mobj#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           AssertionError: Attributes of ExtensionArray are different#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           Attribute "dtype" are different#x1B[0m
#x1B[1m#x1B[31mE           [left]:  CategoricalDtype(categories=['a_d_g', 'b_d_h', 'c_f_h'], ordered=False, categories_dtype=object)#x1B[0m
#x1B[1m#x1B[31mE           [right]: CategoricalDtype(categories=['a_d_g', 'b_d_h', 'c_f_h'], ordered=False, categories_dtype=str)#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../pandas/_testing/asserters.py#x1B[0m:954: AssertionError
tests/test_aggregated.py::test_combine_categories[two-1]
Stack Traces | 0.003s run time
label_cols = {'a': ['a', 'b', 'c']
Categories (3, str): ['a', 'b', 'c'], 'b': ['d', 'd', 'f']
Categories (2, str): ['d', 'f']}
expected = ['a_d', 'b_d', 'c_f']
Categories (3, str): ['a_d', 'b_d', 'c_f']

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
        (#x1B[33m"#x1B[39;49;00m#x1B[33mlabel_cols#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mexpected#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
        [#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[96mdict#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
                    a=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    b=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    c=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mg#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma_d_g#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc_f_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mthree#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[96mdict#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
                    a=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    b=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc_f#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mtwo-1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[96mdict#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
                    a=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    c=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mg#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma_g#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mtwo-2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[96mdict#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
                    b=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    c=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mg#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33md_g#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mf_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mtwo-3#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
        ],#x1B[90m#x1B[39;49;00m
    )#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_combine_categories#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        label_cols: #x1B[96mdict#x1B[39;49;00m[#x1B[96mstr#x1B[39;49;00m, pd.Categorical], expected: pd.Categorical#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        #x1B[94mfrom#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[04m#x1B[96mscanpy#x1B[39;49;00m#x1B[04m#x1B[96m.#x1B[39;49;00m#x1B[04m#x1B[96mget#x1B[39;49;00m#x1B[04m#x1B[96m.#x1B[39;49;00m#x1B[04m#x1B[96m_aggregated#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[94mimport#x1B[39;49;00m _combine_categories#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        label_df = pd.DataFrame(label_cols)#x1B[90m#x1B[39;49;00m
        result, result_label_df = _combine_categories(label_df)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[94massert#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(result, pd.Categorical)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       pd.testing.assert_extension_array_equal(result, expected)#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_aggregated.py#x1B[0m:460: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

left = ['a_d', 'b_d', 'c_f']
Categories (3, object): ['a_d', 'b_d', 'c_f']
right = ['a_d', 'b_d', 'c_f']
Categories (3, str): ['a_d', 'b_d', 'c_f']
check_dtype = True, index_values = None, check_exact = False, rtol = 1e-05
atol = 1e-08, obj = 'ExtensionArray'

    #x1B[0m#x1B[37m@set_module#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mpandas.testing#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92massert_extension_array_equal#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        left: ExtensionArray,#x1B[90m#x1B[39;49;00m
        right: ExtensionArray,#x1B[90m#x1B[39;49;00m
        check_dtype: #x1B[96mbool#x1B[39;49;00m | Literal[#x1B[33m"#x1B[39;49;00m#x1B[33mequiv#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = #x1B[94mTrue#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        index_values: Index | np.ndarray | #x1B[94mNone#x1B[39;49;00m = #x1B[94mNone#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        check_exact: #x1B[96mbool#x1B[39;49;00m | lib.NoDefault = lib.no_default,#x1B[90m#x1B[39;49;00m
        rtol: #x1B[96mfloat#x1B[39;49;00m | lib.NoDefault = lib.no_default,#x1B[90m#x1B[39;49;00m
        atol: #x1B[96mfloat#x1B[39;49;00m | lib.NoDefault = lib.no_default,#x1B[90m#x1B[39;49;00m
        obj: #x1B[96mstr#x1B[39;49;00m = #x1B[33m"#x1B[39;49;00m#x1B[33mExtensionArray#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
    #x1B[33m    Check that left and right ExtensionArrays are equal.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    This method compares two ``ExtensionArray`` instances for equality,#x1B[39;49;00m
    #x1B[33m    including checks for missing values, the dtype of the arrays, and#x1B[39;49;00m
    #x1B[33m    the exactness of the comparison (or tolerance when comparing floats).#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    Parameters#x1B[39;49;00m
    #x1B[33m    ----------#x1B[39;49;00m
    #x1B[33m    left, right : ExtensionArray#x1B[39;49;00m
    #x1B[33m        The two arrays to compare.#x1B[39;49;00m
    #x1B[33m    check_dtype : bool, default True#x1B[39;49;00m
    #x1B[33m        Whether to check if the ExtensionArray dtypes are identical.#x1B[39;49;00m
    #x1B[33m    index_values : Index | numpy.ndarray, default None#x1B[39;49;00m
    #x1B[33m        Optional index (shared by both left and right), used in output.#x1B[39;49;00m
    #x1B[33m    check_exact : bool, default False#x1B[39;49;00m
    #x1B[33m        Whether to compare number exactly.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m        .. versionchanged:: 2.2.0#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m            Defaults to True for integer dtypes if none of#x1B[39;49;00m
    #x1B[33m            ``check_exact``, ``rtol`` and ``atol`` are specified.#x1B[39;49;00m
    #x1B[33m    rtol : float, default 1e-5#x1B[39;49;00m
    #x1B[33m        Relative tolerance. Only used when check_exact is False, and only#x1B[39;49;00m
    #x1B[33m        applied to numeric dtypes; values of other dtypes, such as interval,#x1B[39;49;00m
    #x1B[33m        are always compared exactly.#x1B[39;49;00m
    #x1B[33m    atol : float, default 1e-8#x1B[39;49;00m
    #x1B[33m        Absolute tolerance. Only used when check_exact is False, and only#x1B[39;49;00m
    #x1B[33m        applied to numeric dtypes; values of other dtypes, such as interval,#x1B[39;49;00m
    #x1B[33m        are always compared exactly.#x1B[39;49;00m
    #x1B[33m    obj : str, default 'ExtensionArray'#x1B[39;49;00m
    #x1B[33m        Specify object name being compared, internally used to show appropriate#x1B[39;49;00m
    #x1B[33m        assertion message.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m        .. versionadded:: 2.0.0#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    See Also#x1B[39;49;00m
    #x1B[33m    --------#x1B[39;49;00m
    #x1B[33m    testing.assert_series_equal : Check that left and right ``Series`` are equal.#x1B[39;49;00m
    #x1B[33m    testing.assert_frame_equal : Check that left and right ``DataFrame`` are equal.#x1B[39;49;00m
    #x1B[33m    testing.assert_index_equal : Check that left and right ``Index`` are equal.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    Notes#x1B[39;49;00m
    #x1B[33m    -----#x1B[39;49;00m
    #x1B[33m    Missing values are checked separately from valid values.#x1B[39;49;00m
    #x1B[33m    A mask of missing values is computed for each and checked to match.#x1B[39;49;00m
    #x1B[33m    The remaining all-valid values are cast to object dtype and checked.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    Examples#x1B[39;49;00m
    #x1B[33m    --------#x1B[39;49;00m
    #x1B[33m    >>> from pandas import testing as tm#x1B[39;49;00m
    #x1B[33m    >>> a = pd.Series([1, 2, 3, 4])#x1B[39;49;00m
    #x1B[33m    >>> b, c = a.array, a.array#x1B[39;49;00m
    #x1B[33m    >>> tm.assert_extension_array_equal(b, c)#x1B[39;49;00m
    #x1B[33m    """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m (#x1B[90m#x1B[39;49;00m
            check_exact #x1B[95mis#x1B[39;49;00m lib.no_default#x1B[90m#x1B[39;49;00m
            #x1B[95mand#x1B[39;49;00m rtol #x1B[95mis#x1B[39;49;00m lib.no_default#x1B[90m#x1B[39;49;00m
            #x1B[95mand#x1B[39;49;00m atol #x1B[95mis#x1B[39;49;00m lib.no_default#x1B[90m#x1B[39;49;00m
        ):#x1B[90m#x1B[39;49;00m
            check_exact = (#x1B[90m#x1B[39;49;00m
                is_numeric_dtype(left.dtype) #x1B[95mand#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m is_float_dtype(left.dtype)#x1B[90m#x1B[39;49;00m
            ) #x1B[95mor#x1B[39;49;00m (is_numeric_dtype(right.dtype) #x1B[95mand#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m is_float_dtype(right.dtype))#x1B[90m#x1B[39;49;00m
        #x1B[94melif#x1B[39;49;00m check_exact #x1B[95mis#x1B[39;49;00m lib.no_default:#x1B[90m#x1B[39;49;00m
            check_exact = #x1B[94mFalse#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        rtol = rtol #x1B[94mif#x1B[39;49;00m rtol #x1B[95mis#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m lib.no_default #x1B[94melse#x1B[39;49;00m #x1B[94m1.0e-5#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        atol = atol #x1B[94mif#x1B[39;49;00m atol #x1B[95mis#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m lib.no_default #x1B[94melse#x1B[39;49;00m #x1B[94m1.0e-8#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[94massert#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(left, ExtensionArray), #x1B[33m"#x1B[39;49;00m#x1B[33mleft is not an ExtensionArray#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94massert#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(right, ExtensionArray), #x1B[33m"#x1B[39;49;00m#x1B[33mright is not an ExtensionArray#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m check_dtype:#x1B[90m#x1B[39;49;00m
>           assert_attr_equal(#x1B[33m"#x1B[39;49;00m#x1B[33mdtype#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, left, right, obj=#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mAttributes of #x1B[39;49;00m#x1B[33m{#x1B[39;49;00mobj#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           AssertionError: Attributes of ExtensionArray are different#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           Attribute "dtype" are different#x1B[0m
#x1B[1m#x1B[31mE           [left]:  CategoricalDtype(categories=['a_d', 'b_d', 'c_f'], ordered=False, categories_dtype=object)#x1B[0m
#x1B[1m#x1B[31mE           [right]: CategoricalDtype(categories=['a_d', 'b_d', 'c_f'], ordered=False, categories_dtype=str)#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../pandas/_testing/asserters.py#x1B[0m:954: AssertionError
tests/test_aggregated.py::test_combine_categories[two-2]
Stack Traces | 0.003s run time
label_cols = {'a': ['a', 'b', 'c']
Categories (3, str): ['a', 'b', 'c'], 'c': ['g', 'h', 'h']
Categories (2, str): ['g', 'h']}
expected = ['a_g', 'b_h', 'c_h']
Categories (3, str): ['a_g', 'b_h', 'c_h']

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
        (#x1B[33m"#x1B[39;49;00m#x1B[33mlabel_cols#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mexpected#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
        [#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[96mdict#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
                    a=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    b=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    c=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mg#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma_d_g#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc_f_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mthree#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[96mdict#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
                    a=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    b=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc_f#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mtwo-1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[96mdict#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
                    a=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    c=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mg#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma_g#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mtwo-2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[96mdict#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
                    b=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    c=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mg#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33md_g#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mf_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mtwo-3#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
        ],#x1B[90m#x1B[39;49;00m
    )#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_combine_categories#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        label_cols: #x1B[96mdict#x1B[39;49;00m[#x1B[96mstr#x1B[39;49;00m, pd.Categorical], expected: pd.Categorical#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        #x1B[94mfrom#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[04m#x1B[96mscanpy#x1B[39;49;00m#x1B[04m#x1B[96m.#x1B[39;49;00m#x1B[04m#x1B[96mget#x1B[39;49;00m#x1B[04m#x1B[96m.#x1B[39;49;00m#x1B[04m#x1B[96m_aggregated#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[94mimport#x1B[39;49;00m _combine_categories#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        label_df = pd.DataFrame(label_cols)#x1B[90m#x1B[39;49;00m
        result, result_label_df = _combine_categories(label_df)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[94massert#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(result, pd.Categorical)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       pd.testing.assert_extension_array_equal(result, expected)#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_aggregated.py#x1B[0m:460: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

left = ['a_g', 'b_h', 'c_h']
Categories (3, object): ['a_g', 'b_h', 'c_h']
right = ['a_g', 'b_h', 'c_h']
Categories (3, str): ['a_g', 'b_h', 'c_h']
check_dtype = True, index_values = None, check_exact = False, rtol = 1e-05
atol = 1e-08, obj = 'ExtensionArray'

    #x1B[0m#x1B[37m@set_module#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mpandas.testing#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92massert_extension_array_equal#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        left: ExtensionArray,#x1B[90m#x1B[39;49;00m
        right: ExtensionArray,#x1B[90m#x1B[39;49;00m
        check_dtype: #x1B[96mbool#x1B[39;49;00m | Literal[#x1B[33m"#x1B[39;49;00m#x1B[33mequiv#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = #x1B[94mTrue#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        index_values: Index | np.ndarray | #x1B[94mNone#x1B[39;49;00m = #x1B[94mNone#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        check_exact: #x1B[96mbool#x1B[39;49;00m | lib.NoDefault = lib.no_default,#x1B[90m#x1B[39;49;00m
        rtol: #x1B[96mfloat#x1B[39;49;00m | lib.NoDefault = lib.no_default,#x1B[90m#x1B[39;49;00m
        atol: #x1B[96mfloat#x1B[39;49;00m | lib.NoDefault = lib.no_default,#x1B[90m#x1B[39;49;00m
        obj: #x1B[96mstr#x1B[39;49;00m = #x1B[33m"#x1B[39;49;00m#x1B[33mExtensionArray#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
    #x1B[33m    Check that left and right ExtensionArrays are equal.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    This method compares two ``ExtensionArray`` instances for equality,#x1B[39;49;00m
    #x1B[33m    including checks for missing values, the dtype of the arrays, and#x1B[39;49;00m
    #x1B[33m    the exactness of the comparison (or tolerance when comparing floats).#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    Parameters#x1B[39;49;00m
    #x1B[33m    ----------#x1B[39;49;00m
    #x1B[33m    left, right : ExtensionArray#x1B[39;49;00m
    #x1B[33m        The two arrays to compare.#x1B[39;49;00m
    #x1B[33m    check_dtype : bool, default True#x1B[39;49;00m
    #x1B[33m        Whether to check if the ExtensionArray dtypes are identical.#x1B[39;49;00m
    #x1B[33m    index_values : Index | numpy.ndarray, default None#x1B[39;49;00m
    #x1B[33m        Optional index (shared by both left and right), used in output.#x1B[39;49;00m
    #x1B[33m    check_exact : bool, default False#x1B[39;49;00m
    #x1B[33m        Whether to compare number exactly.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m        .. versionchanged:: 2.2.0#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m            Defaults to True for integer dtypes if none of#x1B[39;49;00m
    #x1B[33m            ``check_exact``, ``rtol`` and ``atol`` are specified.#x1B[39;49;00m
    #x1B[33m    rtol : float, default 1e-5#x1B[39;49;00m
    #x1B[33m        Relative tolerance. Only used when check_exact is False, and only#x1B[39;49;00m
    #x1B[33m        applied to numeric dtypes; values of other dtypes, such as interval,#x1B[39;49;00m
    #x1B[33m        are always compared exactly.#x1B[39;49;00m
    #x1B[33m    atol : float, default 1e-8#x1B[39;49;00m
    #x1B[33m        Absolute tolerance. Only used when check_exact is False, and only#x1B[39;49;00m
    #x1B[33m        applied to numeric dtypes; values of other dtypes, such as interval,#x1B[39;49;00m
    #x1B[33m        are always compared exactly.#x1B[39;49;00m
    #x1B[33m    obj : str, default 'ExtensionArray'#x1B[39;49;00m
    #x1B[33m        Specify object name being compared, internally used to show appropriate#x1B[39;49;00m
    #x1B[33m        assertion message.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m        .. versionadded:: 2.0.0#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    See Also#x1B[39;49;00m
    #x1B[33m    --------#x1B[39;49;00m
    #x1B[33m    testing.assert_series_equal : Check that left and right ``Series`` are equal.#x1B[39;49;00m
    #x1B[33m    testing.assert_frame_equal : Check that left and right ``DataFrame`` are equal.#x1B[39;49;00m
    #x1B[33m    testing.assert_index_equal : Check that left and right ``Index`` are equal.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    Notes#x1B[39;49;00m
    #x1B[33m    -----#x1B[39;49;00m
    #x1B[33m    Missing values are checked separately from valid values.#x1B[39;49;00m
    #x1B[33m    A mask of missing values is computed for each and checked to match.#x1B[39;49;00m
    #x1B[33m    The remaining all-valid values are cast to object dtype and checked.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    Examples#x1B[39;49;00m
    #x1B[33m    --------#x1B[39;49;00m
    #x1B[33m    >>> from pandas import testing as tm#x1B[39;49;00m
    #x1B[33m    >>> a = pd.Series([1, 2, 3, 4])#x1B[39;49;00m
    #x1B[33m    >>> b, c = a.array, a.array#x1B[39;49;00m
    #x1B[33m    >>> tm.assert_extension_array_equal(b, c)#x1B[39;49;00m
    #x1B[33m    """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m (#x1B[90m#x1B[39;49;00m
            check_exact #x1B[95mis#x1B[39;49;00m lib.no_default#x1B[90m#x1B[39;49;00m
            #x1B[95mand#x1B[39;49;00m rtol #x1B[95mis#x1B[39;49;00m lib.no_default#x1B[90m#x1B[39;49;00m
            #x1B[95mand#x1B[39;49;00m atol #x1B[95mis#x1B[39;49;00m lib.no_default#x1B[90m#x1B[39;49;00m
        ):#x1B[90m#x1B[39;49;00m
            check_exact = (#x1B[90m#x1B[39;49;00m
                is_numeric_dtype(left.dtype) #x1B[95mand#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m is_float_dtype(left.dtype)#x1B[90m#x1B[39;49;00m
            ) #x1B[95mor#x1B[39;49;00m (is_numeric_dtype(right.dtype) #x1B[95mand#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m is_float_dtype(right.dtype))#x1B[90m#x1B[39;49;00m
        #x1B[94melif#x1B[39;49;00m check_exact #x1B[95mis#x1B[39;49;00m lib.no_default:#x1B[90m#x1B[39;49;00m
            check_exact = #x1B[94mFalse#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        rtol = rtol #x1B[94mif#x1B[39;49;00m rtol #x1B[95mis#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m lib.no_default #x1B[94melse#x1B[39;49;00m #x1B[94m1.0e-5#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        atol = atol #x1B[94mif#x1B[39;49;00m atol #x1B[95mis#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m lib.no_default #x1B[94melse#x1B[39;49;00m #x1B[94m1.0e-8#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[94massert#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(left, ExtensionArray), #x1B[33m"#x1B[39;49;00m#x1B[33mleft is not an ExtensionArray#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94massert#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(right, ExtensionArray), #x1B[33m"#x1B[39;49;00m#x1B[33mright is not an ExtensionArray#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m check_dtype:#x1B[90m#x1B[39;49;00m
>           assert_attr_equal(#x1B[33m"#x1B[39;49;00m#x1B[33mdtype#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, left, right, obj=#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mAttributes of #x1B[39;49;00m#x1B[33m{#x1B[39;49;00mobj#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           AssertionError: Attributes of ExtensionArray are different#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           Attribute "dtype" are different#x1B[0m
#x1B[1m#x1B[31mE           [left]:  CategoricalDtype(categories=['a_g', 'b_h', 'c_h'], ordered=False, categories_dtype=object)#x1B[0m
#x1B[1m#x1B[31mE           [right]: CategoricalDtype(categories=['a_g', 'b_h', 'c_h'], ordered=False, categories_dtype=str)#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../pandas/_testing/asserters.py#x1B[0m:954: AssertionError
tests/test_aggregated.py::test_combine_categories[two-3]
Stack Traces | 0.003s run time
label_cols = {'b': ['d', 'd', 'f']
Categories (2, str): ['d', 'f'], 'c': ['g', 'h', 'h']
Categories (2, str): ['g', 'h']}
expected = ['d_g', 'd_h', 'f_h']
Categories (3, str): ['d_g', 'd_h', 'f_h']

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
        (#x1B[33m"#x1B[39;49;00m#x1B[33mlabel_cols#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mexpected#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
        [#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[96mdict#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
                    a=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    b=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    c=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mg#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma_d_g#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc_f_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mthree#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[96mdict#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
                    a=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    b=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc_f#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mtwo-1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[96mdict#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
                    a=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    c=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mg#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma_g#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mc_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mtwo-2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                #x1B[96mdict#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
                    b=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                    c=pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mg#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mh#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33md_g#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mf_h#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mtwo-3#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
        ],#x1B[90m#x1B[39;49;00m
    )#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_combine_categories#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        label_cols: #x1B[96mdict#x1B[39;49;00m[#x1B[96mstr#x1B[39;49;00m, pd.Categorical], expected: pd.Categorical#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        #x1B[94mfrom#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[04m#x1B[96mscanpy#x1B[39;49;00m#x1B[04m#x1B[96m.#x1B[39;49;00m#x1B[04m#x1B[96mget#x1B[39;49;00m#x1B[04m#x1B[96m.#x1B[39;49;00m#x1B[04m#x1B[96m_aggregated#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[94mimport#x1B[39;49;00m _combine_categories#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        label_df = pd.DataFrame(label_cols)#x1B[90m#x1B[39;49;00m
        result, result_label_df = _combine_categories(label_df)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[94massert#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(result, pd.Categorical)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       pd.testing.assert_extension_array_equal(result, expected)#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_aggregated.py#x1B[0m:460: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

left = ['d_g', 'd_h', 'f_h']
Categories (3, object): ['d_g', 'd_h', 'f_h']
right = ['d_g', 'd_h', 'f_h']
Categories (3, str): ['d_g', 'd_h', 'f_h']
check_dtype = True, index_values = None, check_exact = False, rtol = 1e-05
atol = 1e-08, obj = 'ExtensionArray'

    #x1B[0m#x1B[37m@set_module#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mpandas.testing#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92massert_extension_array_equal#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        left: ExtensionArray,#x1B[90m#x1B[39;49;00m
        right: ExtensionArray,#x1B[90m#x1B[39;49;00m
        check_dtype: #x1B[96mbool#x1B[39;49;00m | Literal[#x1B[33m"#x1B[39;49;00m#x1B[33mequiv#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = #x1B[94mTrue#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        index_values: Index | np.ndarray | #x1B[94mNone#x1B[39;49;00m = #x1B[94mNone#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        check_exact: #x1B[96mbool#x1B[39;49;00m | lib.NoDefault = lib.no_default,#x1B[90m#x1B[39;49;00m
        rtol: #x1B[96mfloat#x1B[39;49;00m | lib.NoDefault = lib.no_default,#x1B[90m#x1B[39;49;00m
        atol: #x1B[96mfloat#x1B[39;49;00m | lib.NoDefault = lib.no_default,#x1B[90m#x1B[39;49;00m
        obj: #x1B[96mstr#x1B[39;49;00m = #x1B[33m"#x1B[39;49;00m#x1B[33mExtensionArray#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
    #x1B[33m    Check that left and right ExtensionArrays are equal.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    This method compares two ``ExtensionArray`` instances for equality,#x1B[39;49;00m
    #x1B[33m    including checks for missing values, the dtype of the arrays, and#x1B[39;49;00m
    #x1B[33m    the exactness of the comparison (or tolerance when comparing floats).#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    Parameters#x1B[39;49;00m
    #x1B[33m    ----------#x1B[39;49;00m
    #x1B[33m    left, right : ExtensionArray#x1B[39;49;00m
    #x1B[33m        The two arrays to compare.#x1B[39;49;00m
    #x1B[33m    check_dtype : bool, default True#x1B[39;49;00m
    #x1B[33m        Whether to check if the ExtensionArray dtypes are identical.#x1B[39;49;00m
    #x1B[33m    index_values : Index | numpy.ndarray, default None#x1B[39;49;00m
    #x1B[33m        Optional index (shared by both left and right), used in output.#x1B[39;49;00m
    #x1B[33m    check_exact : bool, default False#x1B[39;49;00m
    #x1B[33m        Whether to compare number exactly.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m        .. versionchanged:: 2.2.0#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m            Defaults to True for integer dtypes if none of#x1B[39;49;00m
    #x1B[33m            ``check_exact``, ``rtol`` and ``atol`` are specified.#x1B[39;49;00m
    #x1B[33m    rtol : float, default 1e-5#x1B[39;49;00m
    #x1B[33m        Relative tolerance. Only used when check_exact is False, and only#x1B[39;49;00m
    #x1B[33m        applied to numeric dtypes; values of other dtypes, such as interval,#x1B[39;49;00m
    #x1B[33m        are always compared exactly.#x1B[39;49;00m
    #x1B[33m    atol : float, default 1e-8#x1B[39;49;00m
    #x1B[33m        Absolute tolerance. Only used when check_exact is False, and only#x1B[39;49;00m
    #x1B[33m        applied to numeric dtypes; values of other dtypes, such as interval,#x1B[39;49;00m
    #x1B[33m        are always compared exactly.#x1B[39;49;00m
    #x1B[33m    obj : str, default 'ExtensionArray'#x1B[39;49;00m
    #x1B[33m        Specify object name being compared, internally used to show appropriate#x1B[39;49;00m
    #x1B[33m        assertion message.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m        .. versionadded:: 2.0.0#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    See Also#x1B[39;49;00m
    #x1B[33m    --------#x1B[39;49;00m
    #x1B[33m    testing.assert_series_equal : Check that left and right ``Series`` are equal.#x1B[39;49;00m
    #x1B[33m    testing.assert_frame_equal : Check that left and right ``DataFrame`` are equal.#x1B[39;49;00m
    #x1B[33m    testing.assert_index_equal : Check that left and right ``Index`` are equal.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    Notes#x1B[39;49;00m
    #x1B[33m    -----#x1B[39;49;00m
    #x1B[33m    Missing values are checked separately from valid values.#x1B[39;49;00m
    #x1B[33m    A mask of missing values is computed for each and checked to match.#x1B[39;49;00m
    #x1B[33m    The remaining all-valid values are cast to object dtype and checked.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    Examples#x1B[39;49;00m
    #x1B[33m    --------#x1B[39;49;00m
    #x1B[33m    >>> from pandas import testing as tm#x1B[39;49;00m
    #x1B[33m    >>> a = pd.Series([1, 2, 3, 4])#x1B[39;49;00m
    #x1B[33m    >>> b, c = a.array, a.array#x1B[39;49;00m
    #x1B[33m    >>> tm.assert_extension_array_equal(b, c)#x1B[39;49;00m
    #x1B[33m    """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m (#x1B[90m#x1B[39;49;00m
            check_exact #x1B[95mis#x1B[39;49;00m lib.no_default#x1B[90m#x1B[39;49;00m
            #x1B[95mand#x1B[39;49;00m rtol #x1B[95mis#x1B[39;49;00m lib.no_default#x1B[90m#x1B[39;49;00m
            #x1B[95mand#x1B[39;49;00m atol #x1B[95mis#x1B[39;49;00m lib.no_default#x1B[90m#x1B[39;49;00m
        ):#x1B[90m#x1B[39;49;00m
            check_exact = (#x1B[90m#x1B[39;49;00m
                is_numeric_dtype(left.dtype) #x1B[95mand#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m is_float_dtype(left.dtype)#x1B[90m#x1B[39;49;00m
            ) #x1B[95mor#x1B[39;49;00m (is_numeric_dtype(right.dtype) #x1B[95mand#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m is_float_dtype(right.dtype))#x1B[90m#x1B[39;49;00m
        #x1B[94melif#x1B[39;49;00m check_exact #x1B[95mis#x1B[39;49;00m lib.no_default:#x1B[90m#x1B[39;49;00m
            check_exact = #x1B[94mFalse#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        rtol = rtol #x1B[94mif#x1B[39;49;00m rtol #x1B[95mis#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m lib.no_default #x1B[94melse#x1B[39;49;00m #x1B[94m1.0e-5#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        atol = atol #x1B[94mif#x1B[39;49;00m atol #x1B[95mis#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m lib.no_default #x1B[94melse#x1B[39;49;00m #x1B[94m1.0e-8#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[94massert#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(left, ExtensionArray), #x1B[33m"#x1B[39;49;00m#x1B[33mleft is not an ExtensionArray#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94massert#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(right, ExtensionArray), #x1B[33m"#x1B[39;49;00m#x1B[33mright is not an ExtensionArray#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m check_dtype:#x1B[90m#x1B[39;49;00m
>           assert_attr_equal(#x1B[33m"#x1B[39;49;00m#x1B[33mdtype#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, left, right, obj=#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mAttributes of #x1B[39;49;00m#x1B[33m{#x1B[39;49;00mobj#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           AssertionError: Attributes of ExtensionArray are different#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           Attribute "dtype" are different#x1B[0m
#x1B[1m#x1B[31mE           [left]:  CategoricalDtype(categories=['d_g', 'd_h', 'f_h'], ordered=False, categories_dtype=object)#x1B[0m
#x1B[1m#x1B[31mE           [right]: CategoricalDtype(categories=['d_g', 'd_h', 'f_h'], ordered=False, categories_dtype=str)#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../pandas/_testing/asserters.py#x1B[0m:954: AssertionError
tests/test_aggregated.py::test_aggregate_examples[mean]
Stack Traces | 0.004s run time
matrix = array([[1., 1., 0., 0.],
       [1., 1., 0., 0.],
       [0., 0., 1., 1.],
       [0., 0., 1., 1.]])
df =       a  b
a_c   a  c
a_d   a  d
b_d1  b  d
b_d2  b  d, keys = ['a', 'b']
metrics = ['mean']
expected = AnnData object with n_obs × n_vars = 3 × 4
    obs: 'a', 'b', 'n_obs_aggregated'
    layers: 'mean'

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
        (#x1B[33m"#x1B[39;49;00m#x1B[33mmatrix#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mdf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mkeys#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mmetrics#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mexpected#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
        [#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                np.block([#x1B[90m#x1B[39;49;00m
                    [np.ones((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m)), np.zeros((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m))],#x1B[90m#x1B[39;49;00m
                    [np.zeros((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m)), np.ones((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m))],#x1B[90m#x1B[39;49;00m
                ]),#x1B[90m#x1B[39;49;00m
                pd.DataFrame(#x1B[90m#x1B[39;49;00m
                    {#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                    },#x1B[90m#x1B[39;49;00m
                    index=[#x1B[33m"#x1B[39;49;00m#x1B[33ma_c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                [#x1B[33m"#x1B[39;49;00m#x1B[33mcount_nonzero#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],  #x1B[90m# , "sum", "mean"],#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                ad.AnnData(#x1B[90m#x1B[39;49;00m
                    obs=pd.DataFrame(#x1B[90m#x1B[39;49;00m
                        {#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33mn_obs_aggregated#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        },#x1B[90m#x1B[39;49;00m
                        index=[#x1B[33m"#x1B[39;49;00m#x1B[33ma_c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                    ),#x1B[90m#x1B[39;49;00m
                    var=pd.DataFrame(index=[#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mgene_#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mi#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mfor#x1B[39;49;00m i #x1B[95min#x1B[39;49;00m #x1B[96mrange#x1B[39;49;00m(#x1B[94m4#x1B[39;49;00m)]),#x1B[90m#x1B[39;49;00m
                    layers={#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mcount_nonzero#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: np.array([#x1B[90m#x1B[39;49;00m
                            [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                            [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                            [#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        ]),#x1B[90m#x1B[39;49;00m
                        #x1B[90m# "sum": np.array([[2, 0], [0, 2]]),#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                        #x1B[90m# "mean": np.array([[1, 0], [0, 1]]),#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                    },#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mcount_nonzero#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                np.block([#x1B[90m#x1B[39;49;00m
                    [np.ones((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m)), np.zeros((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m))],#x1B[90m#x1B[39;49;00m
                    [np.zeros((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m)), np.ones((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m))],#x1B[90m#x1B[39;49;00m
                ]),#x1B[90m#x1B[39;49;00m
                pd.DataFrame(#x1B[90m#x1B[39;49;00m
                    {#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                    },#x1B[90m#x1B[39;49;00m
                    index=[#x1B[33m"#x1B[39;49;00m#x1B[33ma_c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                [#x1B[33m"#x1B[39;49;00m#x1B[33msum#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mmean#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mcount_nonzero#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                ad.AnnData(#x1B[90m#x1B[39;49;00m
                    obs=pd.DataFrame(#x1B[90m#x1B[39;49;00m
                        {#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33mn_obs_aggregated#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        },#x1B[90m#x1B[39;49;00m
                        index=[#x1B[33m"#x1B[39;49;00m#x1B[33ma_c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                    ),#x1B[90m#x1B[39;49;00m
                    var=pd.DataFrame(index=[#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mgene_#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mi#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mfor#x1B[39;49;00m i #x1B[95min#x1B[39;49;00m #x1B[96mrange#x1B[39;49;00m(#x1B[94m4#x1B[39;49;00m)]),#x1B[90m#x1B[39;49;00m
                    layers={#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33msum#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: np.array([[#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]]),#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mmean#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: np.array([[#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m]]),#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mcount_nonzero#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: np.array([#x1B[90m#x1B[39;49;00m
                            [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                            [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                            [#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        ]),#x1B[90m#x1B[39;49;00m
                    },#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33msum-mean-count_nonzero#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                np.block([#x1B[90m#x1B[39;49;00m
                    [np.ones((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m)), np.zeros((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m))],#x1B[90m#x1B[39;49;00m
                    [np.zeros((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m)), np.ones((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m))],#x1B[90m#x1B[39;49;00m
                ]),#x1B[90m#x1B[39;49;00m
                pd.DataFrame(#x1B[90m#x1B[39;49;00m
                    {#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                    },#x1B[90m#x1B[39;49;00m
                    index=[#x1B[33m"#x1B[39;49;00m#x1B[33ma_c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                [#x1B[33m"#x1B[39;49;00m#x1B[33mmean#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                ad.AnnData(#x1B[90m#x1B[39;49;00m
                    obs=pd.DataFrame(#x1B[90m#x1B[39;49;00m
                        {#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33mn_obs_aggregated#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        },#x1B[90m#x1B[39;49;00m
                        index=[#x1B[33m"#x1B[39;49;00m#x1B[33ma_c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                    ),#x1B[90m#x1B[39;49;00m
                    var=pd.DataFrame(index=[#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mgene_#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mi#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mfor#x1B[39;49;00m i #x1B[95min#x1B[39;49;00m #x1B[96mrange#x1B[39;49;00m(#x1B[94m4#x1B[39;49;00m)]),#x1B[90m#x1B[39;49;00m
                    layers={#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mmean#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: np.array([[#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m]]),#x1B[90m#x1B[39;49;00m
                    },#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mmean#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
        ],#x1B[90m#x1B[39;49;00m
    )#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_aggregate_examples#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        matrix: NDArray[np.int64],#x1B[90m#x1B[39;49;00m
        df: pd.DataFrame,#x1B[90m#x1B[39;49;00m
        keys: #x1B[96mlist#x1B[39;49;00m[#x1B[96mstr#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
        metrics: #x1B[96mlist#x1B[39;49;00m[AggType],#x1B[90m#x1B[39;49;00m
        expected: ad.AnnData,#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        adata = ad.AnnData(#x1B[90m#x1B[39;49;00m
            X=matrix,#x1B[90m#x1B[39;49;00m
            obs=df,#x1B[90m#x1B[39;49;00m
            var=pd.DataFrame(index=[#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mgene_#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mi#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mfor#x1B[39;49;00m i #x1B[95min#x1B[39;49;00m #x1B[96mrange#x1B[39;49;00m(matrix.shape[#x1B[94m1#x1B[39;49;00m])]),#x1B[90m#x1B[39;49;00m
        )#x1B[90m#x1B[39;49;00m
        result = sc.get.aggregate(adata, by=keys, func=metrics)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       assert_equal(expected, result)#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_aggregated.py#x1B[0m:409: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#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/tests/helpers.py#x1B[0m:881: in assert_adata_equal
    #x1B[0massert_equal(a.obs_names, b.obs_names, exact=exact, elem_name=fmt_name(#x1B[33m"#x1B[39;49;00m#x1B[33mobs_names#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m))#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/tests/helpers.py#x1B[0m:808: in assert_equal_index
    #x1B[0mreport_name(pd.testing.assert_index_equal)(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/tests/helpers.py#x1B[0m:606: in func_wrapper
    #x1B[0m#x1B[94mraise#x1B[39;49;00m e#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/tests/helpers.py#x1B[0m:595: 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
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

left = Index(['a_c', 'a_d', 'b_d'], dtype='str')
right = Index(['a_c', 'a_d', 'b_d'], dtype='object'), obj = 'Index'

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92m_check_types#x1B[39;49;00m(left: Index, right: Index, obj: #x1B[96mstr#x1B[39;49;00m = #x1B[33m"#x1B[39;49;00m#x1B[33mIndex#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m exact:#x1B[90m#x1B[39;49;00m
            #x1B[94mreturn#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        assert_class_equal(left, right, exact=exact, obj=obj)#x1B[90m#x1B[39;49;00m
        assert_attr_equal(#x1B[33m"#x1B[39;49;00m#x1B[33minferred_type#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, left, right, obj=obj)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[90m# Skip exact dtype checking when `check_categorical` is False#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(left.dtype, CategoricalDtype) #x1B[95mand#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
            right.dtype, CategoricalDtype#x1B[90m#x1B[39;49;00m
        ):#x1B[90m#x1B[39;49;00m
            #x1B[94mif#x1B[39;49;00m check_categorical:#x1B[90m#x1B[39;49;00m
                assert_attr_equal(#x1B[33m"#x1B[39;49;00m#x1B[33mdtype#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, left, right, obj=obj)#x1B[90m#x1B[39;49;00m
                assert_index_equal(#x1B[90m#x1B[39;49;00m
                    cast(#x1B[33m"#x1B[39;49;00m#x1B[33mCategoricalIndex#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, left).categories,#x1B[90m#x1B[39;49;00m
                    cast(#x1B[33m"#x1B[39;49;00m#x1B[33mCategoricalIndex#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, right).categories,#x1B[90m#x1B[39;49;00m
                    exact=exact,#x1B[90m#x1B[39;49;00m
                    check_freq=check_freq,#x1B[90m#x1B[39;49;00m
                )#x1B[90m#x1B[39;49;00m
            #x1B[94mreturn#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       assert_attr_equal(#x1B[33m"#x1B[39;49;00m#x1B[33mdtype#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, left, right, obj=obj)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE       AssertionError: Index are different#x1B[0m
#x1B[1m#x1B[31mE       #x1B[0m
#x1B[1m#x1B[31mE       Attribute "dtype" are different#x1B[0m
#x1B[1m#x1B[31mE       [left]:  <StringDtype(storage='python', na_value=nan)>#x1B[0m
#x1B[1m#x1B[31mE       [right]: object#x1B[0m
#x1B[1m#x1B[31mE       #x1B[0m
#x1B[1m#x1B[31mE       Error raised from element 'obs_names'.#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../pandas/_testing/asserters.py#x1B[0m:350: AssertionError
tests/test_aggregated.py::test_aggregate_examples[sum-mean-count_nonzero]
Stack Traces | 0.004s run time
matrix = array([[1., 1., 0., 0.],
       [1., 1., 0., 0.],
       [0., 0., 1., 1.],
       [0., 0., 1., 1.]])
df =       a  b
a_c   a  c
a_d   a  d
b_d1  b  d
b_d2  b  d, keys = ['a', 'b']
metrics = ['sum', 'mean', 'count_nonzero']
expected = AnnData object with n_obs × n_vars = 3 × 4
    obs: 'a', 'b', 'n_obs_aggregated'
    layers: 'sum', 'mean', 'count_nonzero'

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
        (#x1B[33m"#x1B[39;49;00m#x1B[33mmatrix#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mdf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mkeys#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mmetrics#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mexpected#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
        [#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                np.block([#x1B[90m#x1B[39;49;00m
                    [np.ones((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m)), np.zeros((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m))],#x1B[90m#x1B[39;49;00m
                    [np.zeros((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m)), np.ones((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m))],#x1B[90m#x1B[39;49;00m
                ]),#x1B[90m#x1B[39;49;00m
                pd.DataFrame(#x1B[90m#x1B[39;49;00m
                    {#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                    },#x1B[90m#x1B[39;49;00m
                    index=[#x1B[33m"#x1B[39;49;00m#x1B[33ma_c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                [#x1B[33m"#x1B[39;49;00m#x1B[33mcount_nonzero#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],  #x1B[90m# , "sum", "mean"],#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                ad.AnnData(#x1B[90m#x1B[39;49;00m
                    obs=pd.DataFrame(#x1B[90m#x1B[39;49;00m
                        {#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33mn_obs_aggregated#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        },#x1B[90m#x1B[39;49;00m
                        index=[#x1B[33m"#x1B[39;49;00m#x1B[33ma_c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                    ),#x1B[90m#x1B[39;49;00m
                    var=pd.DataFrame(index=[#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mgene_#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mi#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mfor#x1B[39;49;00m i #x1B[95min#x1B[39;49;00m #x1B[96mrange#x1B[39;49;00m(#x1B[94m4#x1B[39;49;00m)]),#x1B[90m#x1B[39;49;00m
                    layers={#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mcount_nonzero#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: np.array([#x1B[90m#x1B[39;49;00m
                            [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                            [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                            [#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        ]),#x1B[90m#x1B[39;49;00m
                        #x1B[90m# "sum": np.array([[2, 0], [0, 2]]),#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                        #x1B[90m# "mean": np.array([[1, 0], [0, 1]]),#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                    },#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mcount_nonzero#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                np.block([#x1B[90m#x1B[39;49;00m
                    [np.ones((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m)), np.zeros((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m))],#x1B[90m#x1B[39;49;00m
                    [np.zeros((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m)), np.ones((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m))],#x1B[90m#x1B[39;49;00m
                ]),#x1B[90m#x1B[39;49;00m
                pd.DataFrame(#x1B[90m#x1B[39;49;00m
                    {#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                    },#x1B[90m#x1B[39;49;00m
                    index=[#x1B[33m"#x1B[39;49;00m#x1B[33ma_c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                [#x1B[33m"#x1B[39;49;00m#x1B[33msum#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mmean#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mcount_nonzero#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                ad.AnnData(#x1B[90m#x1B[39;49;00m
                    obs=pd.DataFrame(#x1B[90m#x1B[39;49;00m
                        {#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33mn_obs_aggregated#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        },#x1B[90m#x1B[39;49;00m
                        index=[#x1B[33m"#x1B[39;49;00m#x1B[33ma_c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                    ),#x1B[90m#x1B[39;49;00m
                    var=pd.DataFrame(index=[#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mgene_#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mi#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mfor#x1B[39;49;00m i #x1B[95min#x1B[39;49;00m #x1B[96mrange#x1B[39;49;00m(#x1B[94m4#x1B[39;49;00m)]),#x1B[90m#x1B[39;49;00m
                    layers={#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33msum#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: np.array([[#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]]),#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mmean#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: np.array([[#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m]]),#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mcount_nonzero#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: np.array([#x1B[90m#x1B[39;49;00m
                            [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                            [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                            [#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        ]),#x1B[90m#x1B[39;49;00m
                    },#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33msum-mean-count_nonzero#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                np.block([#x1B[90m#x1B[39;49;00m
                    [np.ones((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m)), np.zeros((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m))],#x1B[90m#x1B[39;49;00m
                    [np.zeros((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m)), np.ones((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m))],#x1B[90m#x1B[39;49;00m
                ]),#x1B[90m#x1B[39;49;00m
                pd.DataFrame(#x1B[90m#x1B[39;49;00m
                    {#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                    },#x1B[90m#x1B[39;49;00m
                    index=[#x1B[33m"#x1B[39;49;00m#x1B[33ma_c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                [#x1B[33m"#x1B[39;49;00m#x1B[33mmean#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                ad.AnnData(#x1B[90m#x1B[39;49;00m
                    obs=pd.DataFrame(#x1B[90m#x1B[39;49;00m
                        {#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33mn_obs_aggregated#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        },#x1B[90m#x1B[39;49;00m
                        index=[#x1B[33m"#x1B[39;49;00m#x1B[33ma_c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                    ),#x1B[90m#x1B[39;49;00m
                    var=pd.DataFrame(index=[#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mgene_#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mi#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mfor#x1B[39;49;00m i #x1B[95min#x1B[39;49;00m #x1B[96mrange#x1B[39;49;00m(#x1B[94m4#x1B[39;49;00m)]),#x1B[90m#x1B[39;49;00m
                    layers={#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mmean#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: np.array([[#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m]]),#x1B[90m#x1B[39;49;00m
                    },#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mmean#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
        ],#x1B[90m#x1B[39;49;00m
    )#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_aggregate_examples#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        matrix: NDArray[np.int64],#x1B[90m#x1B[39;49;00m
        df: pd.DataFrame,#x1B[90m#x1B[39;49;00m
        keys: #x1B[96mlist#x1B[39;49;00m[#x1B[96mstr#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
        metrics: #x1B[96mlist#x1B[39;49;00m[AggType],#x1B[90m#x1B[39;49;00m
        expected: ad.AnnData,#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        adata = ad.AnnData(#x1B[90m#x1B[39;49;00m
            X=matrix,#x1B[90m#x1B[39;49;00m
            obs=df,#x1B[90m#x1B[39;49;00m
            var=pd.DataFrame(index=[#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mgene_#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mi#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mfor#x1B[39;49;00m i #x1B[95min#x1B[39;49;00m #x1B[96mrange#x1B[39;49;00m(matrix.shape[#x1B[94m1#x1B[39;49;00m])]),#x1B[90m#x1B[39;49;00m
        )#x1B[90m#x1B[39;49;00m
        result = sc.get.aggregate(adata, by=keys, func=metrics)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       assert_equal(expected, result)#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_aggregated.py#x1B[0m:409: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#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/tests/helpers.py#x1B[0m:881: in assert_adata_equal
    #x1B[0massert_equal(a.obs_names, b.obs_names, exact=exact, elem_name=fmt_name(#x1B[33m"#x1B[39;49;00m#x1B[33mobs_names#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m))#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/tests/helpers.py#x1B[0m:808: in assert_equal_index
    #x1B[0mreport_name(pd.testing.assert_index_equal)(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/tests/helpers.py#x1B[0m:606: in func_wrapper
    #x1B[0m#x1B[94mraise#x1B[39;49;00m e#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/tests/helpers.py#x1B[0m:595: 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
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

left = Index(['a_c', 'a_d', 'b_d'], dtype='str')
right = Index(['a_c', 'a_d', 'b_d'], dtype='object'), obj = 'Index'

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92m_check_types#x1B[39;49;00m(left: Index, right: Index, obj: #x1B[96mstr#x1B[39;49;00m = #x1B[33m"#x1B[39;49;00m#x1B[33mIndex#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m exact:#x1B[90m#x1B[39;49;00m
            #x1B[94mreturn#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        assert_class_equal(left, right, exact=exact, obj=obj)#x1B[90m#x1B[39;49;00m
        assert_attr_equal(#x1B[33m"#x1B[39;49;00m#x1B[33minferred_type#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, left, right, obj=obj)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[90m# Skip exact dtype checking when `check_categorical` is False#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(left.dtype, CategoricalDtype) #x1B[95mand#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
            right.dtype, CategoricalDtype#x1B[90m#x1B[39;49;00m
        ):#x1B[90m#x1B[39;49;00m
            #x1B[94mif#x1B[39;49;00m check_categorical:#x1B[90m#x1B[39;49;00m
                assert_attr_equal(#x1B[33m"#x1B[39;49;00m#x1B[33mdtype#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, left, right, obj=obj)#x1B[90m#x1B[39;49;00m
                assert_index_equal(#x1B[90m#x1B[39;49;00m
                    cast(#x1B[33m"#x1B[39;49;00m#x1B[33mCategoricalIndex#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, left).categories,#x1B[90m#x1B[39;49;00m
                    cast(#x1B[33m"#x1B[39;49;00m#x1B[33mCategoricalIndex#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, right).categories,#x1B[90m#x1B[39;49;00m
                    exact=exact,#x1B[90m#x1B[39;49;00m
                    check_freq=check_freq,#x1B[90m#x1B[39;49;00m
                )#x1B[90m#x1B[39;49;00m
            #x1B[94mreturn#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       assert_attr_equal(#x1B[33m"#x1B[39;49;00m#x1B[33mdtype#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, left, right, obj=obj)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE       AssertionError: Index are different#x1B[0m
#x1B[1m#x1B[31mE       #x1B[0m
#x1B[1m#x1B[31mE       Attribute "dtype" are different#x1B[0m
#x1B[1m#x1B[31mE       [left]:  <StringDtype(storage='python', na_value=nan)>#x1B[0m
#x1B[1m#x1B[31mE       [right]: object#x1B[0m
#x1B[1m#x1B[31mE       #x1B[0m
#x1B[1m#x1B[31mE       Error raised from element 'obs_names'.#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../pandas/_testing/asserters.py#x1B[0m:350: AssertionError
tests/test_pca.py::test_pca_transform[scipy_csc_mat]
Stack Traces | 0.004s run time
array_type = <class 'scipy.sparse._csc.csc_matrix'>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_pca_transform#x1B[39;49;00m(array_type):#x1B[90m#x1B[39;49;00m
        adata = AnnData(array_type(A_list).astype(#x1B[33m"#x1B[39;49;00m#x1B[33mfloat32#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m))#x1B[90m#x1B[39;49;00m
        a_pca_abs = np.abs(A_pca)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        warnings.filterwarnings(#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.pp.pca(adata, n_comps=#x1B[94m4#x1B[39;49;00m, zero_center=#x1B[94mTrue#x1B[39;49;00m, dtype=#x1B[33m"#x1B[39;49;00m#x1B[33mfloat64#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       adata = adata.to_memory()#x1B[90m#x1B[39;49;00m
                ^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_pca.py#x1B[0m:239: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:1425: in to_memory
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m AnnData(**new)#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/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:464: in _init_as_actual
    #x1B[0m#x1B[96mself#x1B[39;49;00m._obs = _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[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../pandas/_config/config.py#x1B[0m:752: Pandas4Warning
tests/test_pca.py::test_pca_transform[scipy_csr_arr]
Stack Traces | 0.004s run time
array_type = <class 'scipy.sparse._csr.csr_array'>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_pca_transform#x1B[39;49;00m(array_type):#x1B[90m#x1B[39;49;00m
        adata = AnnData(array_type(A_list).astype(#x1B[33m"#x1B[39;49;00m#x1B[33mfloat32#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m))#x1B[90m#x1B[39;49;00m
        a_pca_abs = np.abs(A_pca)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        warnings.filterwarnings(#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.pp.pca(adata, n_comps=#x1B[94m4#x1B[39;49;00m, zero_center=#x1B[94mTrue#x1B[39;49;00m, dtype=#x1B[33m"#x1B[39;49;00m#x1B[33mfloat64#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       adata = adata.to_memory()#x1B[90m#x1B[39;49;00m
                ^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_pca.py#x1B[0m:239: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:1425: in to_memory
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m AnnData(**new)#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/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:464: in _init_as_actual
    #x1B[0m#x1B[96mself#x1B[39;49;00m._obs = _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[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../pandas/_config/config.py#x1B[0m:752: Pandas4Warning
tests/test_pca.py::test_pca_transform[scipy_csr_mat]
Stack Traces | 0.004s run time
array_type = <class 'scipy.sparse._csr.csr_matrix'>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_pca_transform#x1B[39;49;00m(array_type):#x1B[90m#x1B[39;49;00m
        adata = AnnData(array_type(A_list).astype(#x1B[33m"#x1B[39;49;00m#x1B[33mfloat32#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m))#x1B[90m#x1B[39;49;00m
        a_pca_abs = np.abs(A_pca)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        warnings.filterwarnings(#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.pp.pca(adata, n_comps=#x1B[94m4#x1B[39;49;00m, zero_center=#x1B[94mTrue#x1B[39;49;00m, dtype=#x1B[33m"#x1B[39;49;00m#x1B[33mfloat64#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       adata = adata.to_memory()#x1B[90m#x1B[39;49;00m
                ^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_pca.py#x1B[0m:239: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:1425: in to_memory
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m AnnData(**new)#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/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:464: in _init_as_actual
    #x1B[0m#x1B[96mself#x1B[39;49;00m._obs = _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[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../pandas/_config/config.py#x1B[0m:752: Pandas4Warning
tests/test_pca.py::test_pca_transform[jax_array]
Stack Traces | 0.005s run time
array_type = <function as_dense_jax_array at 0x763dd9598bf0>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_pca_transform#x1B[39;49;00m(array_type):#x1B[90m#x1B[39;49;00m
        adata = AnnData(array_type(A_list).astype(#x1B[33m"#x1B[39;49;00m#x1B[33mfloat32#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m))#x1B[90m#x1B[39;49;00m
        a_pca_abs = np.abs(A_pca)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        warnings.filterwarnings(#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.pp.pca(adata, n_comps=#x1B[94m4#x1B[39;49;00m, zero_center=#x1B[94mTrue#x1B[39;49;00m, dtype=#x1B[33m"#x1B[39;49;00m#x1B[33mfloat64#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       adata = adata.to_memory()#x1B[90m#x1B[39;49;00m
                ^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_pca.py#x1B[0m:239: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:1425: in to_memory
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m AnnData(**new)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/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.stable/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:464: in _init_as_actual
    #x1B[0m#x1B[96mself#x1B[39;49;00m._obs = _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.stable/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.stable/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.stable/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.stable/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.stable/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.stable/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[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../pandas/_config/config.py#x1B[0m:752: Pandas4Warning
tests/test_pca.py::test_pca_transform[numpy_ndarray]
Stack Traces | 0.005s run time
array_type = <function asarray at 0x7ed8f50f9170>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_pca_transform#x1B[39;49;00m(array_type):#x1B[90m#x1B[39;49;00m
        adata = AnnData(array_type(A_list).astype(#x1B[33m"#x1B[39;49;00m#x1B[33mfloat32#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m))#x1B[90m#x1B[39;49;00m
        a_pca_abs = np.abs(A_pca)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        warnings.filterwarnings(#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.pp.pca(adata, n_comps=#x1B[94m4#x1B[39;49;00m, zero_center=#x1B[94mTrue#x1B[39;49;00m, dtype=#x1B[33m"#x1B[39;49;00m#x1B[33mfloat64#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       adata = adata.to_memory()#x1B[90m#x1B[39;49;00m
                ^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_pca.py#x1B[0m:239: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:1425: in to_memory
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m AnnData(**new)#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/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:464: in _init_as_actual
    #x1B[0m#x1B[96mself#x1B[39;49;00m._obs = _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[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../pandas/_config/config.py#x1B[0m:752: Pandas4Warning
tests/test_pca.py::test_covariance_eigh_impls[dask_array_dense-1d_chunked]
Stack Traces | 0.006s run time
other_array_type = <function as_dense_dask_array at 0x763dd94f0250>

    #x1B[0m#x1B[37m@needs#x1B[39;49;00m.dask#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
        #x1B[33m"#x1B[39;49;00m#x1B[33mother_array_type#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        [#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[94mlambda#x1B[39;49;00m x: x.toarray(), #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mdense#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
            *(#x1B[90m#x1B[39;49;00m
                pytest.param(at.values[#x1B[94m0#x1B[39;49;00m], #x1B[96mid#x1B[39;49;00m=at.id)#x1B[90m#x1B[39;49;00m
                #x1B[94mfor#x1B[39;49;00m at #x1B[95min#x1B[39;49;00m VALID_ARRAY_TYPES#x1B[90m#x1B[39;49;00m
                #x1B[94mif#x1B[39;49;00m #x1B[33m"#x1B[39;49;00m#x1B[33m1d_chunked#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[95min#x1B[39;49;00m at.id#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
        ],#x1B[90m#x1B[39;49;00m
    )#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_covariance_eigh_impls#x1B[39;49;00m(other_array_type):#x1B[90m#x1B[39;49;00m
        warnings.filterwarnings(#x1B[33m"#x1B[39;49;00m#x1B[33merror#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       adata_sparse_mem = pbmc3k_normalized()[:#x1B[94m200#x1B[39;49;00m, :#x1B[94m100#x1B[39;49;00m].copy()#x1B[90m#x1B[39;49;00m
                           ^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_pca.py#x1B[0m:589: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[.../scanpy/_helpers/data.py#x1B[0m:67: in pbmc3k_normalized
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m _pbmc3k_normalized().copy()#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:1453: in copy
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._copy()#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:1394: in _copy
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m AnnData(**new)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/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.stable/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:464: in _init_as_actual
    #x1B[0m#x1B[96mself#x1B[39;49;00m._obs = _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.stable/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.stable/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.stable/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.stable/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.stable/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.stable/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[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../pandas/_config/config.py#x1B[0m:752: Pandas4Warning
tests/test_pca.py::test_covariance_eigh_impls[dask_array_sparse-1d_chunked-csr_matrix]
Stack Traces | 0.006s run time
other_array_type = <function gen_csr_csc_params_wrapper.<locals>.wrapper at 0x763dd94f01a0>

    #x1B[0m#x1B[37m@needs#x1B[39;49;00m.dask#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
        #x1B[33m"#x1B[39;49;00m#x1B[33mother_array_type#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        [#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[94mlambda#x1B[39;49;00m x: x.toarray(), #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mdense#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
            *(#x1B[90m#x1B[39;49;00m
                pytest.param(at.values[#x1B[94m0#x1B[39;49;00m], #x1B[96mid#x1B[39;49;00m=at.id)#x1B[90m#x1B[39;49;00m
                #x1B[94mfor#x1B[39;49;00m at #x1B[95min#x1B[39;49;00m VALID_ARRAY_TYPES#x1B[90m#x1B[39;49;00m
                #x1B[94mif#x1B[39;49;00m #x1B[33m"#x1B[39;49;00m#x1B[33m1d_chunked#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[95min#x1B[39;49;00m at.id#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
        ],#x1B[90m#x1B[39;49;00m
    )#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_covariance_eigh_impls#x1B[39;49;00m(other_array_type):#x1B[90m#x1B[39;49;00m
        warnings.filterwarnings(#x1B[33m"#x1B[39;49;00m#x1B[33merror#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       adata_sparse_mem = pbmc3k_normalized()[:#x1B[94m200#x1B[39;49;00m, :#x1B[94m100#x1B[39;49;00m].copy()#x1B[90m#x1B[39;49;00m
                           ^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_pca.py#x1B[0m:589: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[.../scanpy/_helpers/data.py#x1B[0m:67: in pbmc3k_normalized
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m _pbmc3k_normalized().copy()#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:1453: in copy
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._copy()#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:1394: in _copy
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m AnnData(**new)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/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.stable/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:464: in _init_as_actual
    #x1B[0m#x1B[96mself#x1B[39;49;00m._obs = _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.stable/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.stable/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.stable/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.stable/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.stable/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.stable/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[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../pandas/_config/config.py#x1B[0m:752: Pandas4Warning
tests/test_aggregated.py::test_aggregate_examples[count_nonzero]
Stack Traces | 0.007s run time
matrix = array([[1., 1., 0., 0.],
       [1., 1., 0., 0.],
       [0., 0., 1., 1.],
       [0., 0., 1., 1.]])
df =       a  b
a_c   a  c
a_d   a  d
b_d1  b  d
b_d2  b  d, keys = ['a', 'b']
metrics = ['count_nonzero']
expected = AnnData object with n_obs × n_vars = 3 × 4
    obs: 'a', 'b', 'n_obs_aggregated'
    layers: 'count_nonzero'

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
        (#x1B[33m"#x1B[39;49;00m#x1B[33mmatrix#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mdf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mkeys#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mmetrics#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mexpected#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
        [#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                np.block([#x1B[90m#x1B[39;49;00m
                    [np.ones((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m)), np.zeros((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m))],#x1B[90m#x1B[39;49;00m
                    [np.zeros((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m)), np.ones((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m))],#x1B[90m#x1B[39;49;00m
                ]),#x1B[90m#x1B[39;49;00m
                pd.DataFrame(#x1B[90m#x1B[39;49;00m
                    {#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                    },#x1B[90m#x1B[39;49;00m
                    index=[#x1B[33m"#x1B[39;49;00m#x1B[33ma_c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                [#x1B[33m"#x1B[39;49;00m#x1B[33mcount_nonzero#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],  #x1B[90m# , "sum", "mean"],#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                ad.AnnData(#x1B[90m#x1B[39;49;00m
                    obs=pd.DataFrame(#x1B[90m#x1B[39;49;00m
                        {#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33mn_obs_aggregated#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        },#x1B[90m#x1B[39;49;00m
                        index=[#x1B[33m"#x1B[39;49;00m#x1B[33ma_c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                    ),#x1B[90m#x1B[39;49;00m
                    var=pd.DataFrame(index=[#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mgene_#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mi#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mfor#x1B[39;49;00m i #x1B[95min#x1B[39;49;00m #x1B[96mrange#x1B[39;49;00m(#x1B[94m4#x1B[39;49;00m)]),#x1B[90m#x1B[39;49;00m
                    layers={#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mcount_nonzero#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: np.array([#x1B[90m#x1B[39;49;00m
                            [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                            [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                            [#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        ]),#x1B[90m#x1B[39;49;00m
                        #x1B[90m# "sum": np.array([[2, 0], [0, 2]]),#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                        #x1B[90m# "mean": np.array([[1, 0], [0, 1]]),#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                    },#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mcount_nonzero#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                np.block([#x1B[90m#x1B[39;49;00m
                    [np.ones((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m)), np.zeros((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m))],#x1B[90m#x1B[39;49;00m
                    [np.zeros((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m)), np.ones((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m))],#x1B[90m#x1B[39;49;00m
                ]),#x1B[90m#x1B[39;49;00m
                pd.DataFrame(#x1B[90m#x1B[39;49;00m
                    {#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                    },#x1B[90m#x1B[39;49;00m
                    index=[#x1B[33m"#x1B[39;49;00m#x1B[33ma_c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                [#x1B[33m"#x1B[39;49;00m#x1B[33msum#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mmean#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mcount_nonzero#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                ad.AnnData(#x1B[90m#x1B[39;49;00m
                    obs=pd.DataFrame(#x1B[90m#x1B[39;49;00m
                        {#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33mn_obs_aggregated#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        },#x1B[90m#x1B[39;49;00m
                        index=[#x1B[33m"#x1B[39;49;00m#x1B[33ma_c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                    ),#x1B[90m#x1B[39;49;00m
                    var=pd.DataFrame(index=[#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mgene_#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mi#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mfor#x1B[39;49;00m i #x1B[95min#x1B[39;49;00m #x1B[96mrange#x1B[39;49;00m(#x1B[94m4#x1B[39;49;00m)]),#x1B[90m#x1B[39;49;00m
                    layers={#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33msum#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: np.array([[#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]]),#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mmean#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: np.array([[#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m]]),#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mcount_nonzero#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: np.array([#x1B[90m#x1B[39;49;00m
                            [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                            [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                            [#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        ]),#x1B[90m#x1B[39;49;00m
                    },#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33msum-mean-count_nonzero#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[90m#x1B[39;49;00m
                np.block([#x1B[90m#x1B[39;49;00m
                    [np.ones((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m)), np.zeros((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m))],#x1B[90m#x1B[39;49;00m
                    [np.zeros((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m)), np.ones((#x1B[94m2#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m))],#x1B[90m#x1B[39;49;00m
                ]),#x1B[90m#x1B[39;49;00m
                pd.DataFrame(#x1B[90m#x1B[39;49;00m
                    {#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                    },#x1B[90m#x1B[39;49;00m
                    index=[#x1B[33m"#x1B[39;49;00m#x1B[33ma_c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                [#x1B[33m"#x1B[39;49;00m#x1B[33mmean#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                ad.AnnData(#x1B[90m#x1B[39;49;00m
                    obs=pd.DataFrame(#x1B[90m#x1B[39;49;00m
                        {#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: pd.Categorical([#x1B[33m"#x1B[39;49;00m#x1B[33mc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33md#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]),#x1B[90m#x1B[39;49;00m
                            #x1B[33m"#x1B[39;49;00m#x1B[33mn_obs_aggregated#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                        },#x1B[90m#x1B[39;49;00m
                        index=[#x1B[33m"#x1B[39;49;00m#x1B[33ma_c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33ma_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb_d#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
                    ),#x1B[90m#x1B[39;49;00m
                    var=pd.DataFrame(index=[#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mgene_#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mi#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mfor#x1B[39;49;00m i #x1B[95min#x1B[39;49;00m #x1B[96mrange#x1B[39;49;00m(#x1B[94m4#x1B[39;49;00m)]),#x1B[90m#x1B[39;49;00m
                    layers={#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mmean#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: np.array([[#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m]]),#x1B[90m#x1B[39;49;00m
                    },#x1B[90m#x1B[39;49;00m
                ),#x1B[90m#x1B[39;49;00m
                #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mmean#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
        ],#x1B[90m#x1B[39;49;00m
    )#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_aggregate_examples#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        matrix: NDArray[np.int64],#x1B[90m#x1B[39;49;00m
        df: pd.DataFrame,#x1B[90m#x1B[39;49;00m
        keys: #x1B[96mlist#x1B[39;49;00m[#x1B[96mstr#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
        metrics: #x1B[96mlist#x1B[39;49;00m[AggType],#x1B[90m#x1B[39;49;00m
        expected: ad.AnnData,#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        adata = ad.AnnData(#x1B[90m#x1B[39;49;00m
            X=matrix,#x1B[90m#x1B[39;49;00m
            obs=df,#x1B[90m#x1B[39;49;00m
            var=pd.DataFrame(index=[#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mgene_#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mi#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mfor#x1B[39;49;00m i #x1B[95min#x1B[39;49;00m #x1B[96mrange#x1B[39;49;00m(matrix.shape[#x1B[94m1#x1B[39;49;00m])]),#x1B[90m#x1B[39;49;00m
        )#x1B[90m#x1B[39;49;00m
        result = sc.get.aggregate(adata, by=keys, func=metrics)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       assert_equal(expected, result)#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_aggregated.py#x1B[0m:409: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#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/tests/helpers.py#x1B[0m:881: in assert_adata_equal
    #x1B[0massert_equal(a.obs_names, b.obs_names, exact=exact, elem_name=fmt_name(#x1B[33m"#x1B[39;49;00m#x1B[33mobs_names#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m))#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/tests/helpers.py#x1B[0m:808: in assert_equal_index
    #x1B[0mreport_name(pd.testing.assert_index_equal)(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/tests/helpers.py#x1B[0m:606: in func_wrapper
    #x1B[0m#x1B[94mraise#x1B[39;49;00m e#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/tests/helpers.py#x1B[0m:595: 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
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

left = Index(['a_c', 'a_d', 'b_d'], dtype='str')
right = Index(['a_c', 'a_d', 'b_d'], dtype='object'), obj = 'Index'

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92m_check_types#x1B[39;49;00m(left: Index, right: Index, obj: #x1B[96mstr#x1B[39;49;00m = #x1B[33m"#x1B[39;49;00m#x1B[33mIndex#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m exact:#x1B[90m#x1B[39;49;00m
            #x1B[94mreturn#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        assert_class_equal(left, right, exact=exact, obj=obj)#x1B[90m#x1B[39;49;00m
        assert_attr_equal(#x1B[33m"#x1B[39;49;00m#x1B[33minferred_type#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, left, right, obj=obj)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[90m# Skip exact dtype checking when `check_categorical` is False#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(left.dtype, CategoricalDtype) #x1B[95mand#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
            right.dtype, CategoricalDtype#x1B[90m#x1B[39;49;00m
        ):#x1B[90m#x1B[39;49;00m
            #x1B[94mif#x1B[39;49;00m check_categorical:#x1B[90m#x1B[39;49;00m
                assert_attr_equal(#x1B[33m"#x1B[39;49;00m#x1B[33mdtype#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, left, right, obj=obj)#x1B[90m#x1B[39;49;00m
                assert_index_equal(#x1B[90m#x1B[39;49;00m
                    cast(#x1B[33m"#x1B[39;49;00m#x1B[33mCategoricalIndex#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, left).categories,#x1B[90m#x1B[39;49;00m
                    cast(#x1B[33m"#x1B[39;49;00m#x1B[33mCategoricalIndex#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, right).categories,#x1B[90m#x1B[39;49;00m
                    exact=exact,#x1B[90m#x1B[39;49;00m
                    check_freq=check_freq,#x1B[90m#x1B[39;49;00m
                )#x1B[90m#x1B[39;49;00m
            #x1B[94mreturn#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       assert_attr_equal(#x1B[33m"#x1B[39;49;00m#x1B[33mdtype#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, left, right, obj=obj)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE       AssertionError: Index are different#x1B[0m
#x1B[1m#x1B[31mE       #x1B[0m
#x1B[1m#x1B[31mE       Attribute "dtype" are different#x1B[0m
#x1B[1m#x1B[31mE       [left]:  <StringDtype(storage='python', na_value=nan)>#x1B[0m
#x1B[1m#x1B[31mE       [right]: object#x1B[0m
#x1B[1m#x1B[31mE       #x1B[0m
#x1B[1m#x1B[31mE       Error raised from element 'obs_names'.#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../pandas/_testing/asserters.py#x1B[0m:350: AssertionError
tests/test_pca.py::test_covariance_eigh_impls[dense]
Stack Traces | 0.007s run time
other_array_type = <function <lambda> at 0x7e1eda872350>

    #x1B[0m#x1B[37m@needs#x1B[39;49;00m.dask#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
        #x1B[33m"#x1B[39;49;00m#x1B[33mother_array_type#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        [#x1B[90m#x1B[39;49;00m
            pytest.param(#x1B[94mlambda#x1B[39;49;00m x: x.toarray(), #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mdense#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
            *(#x1B[90m#x1B[39;49;00m
                pytest.param(at.values[#x1B[94m0#x1B[39;49;00m], #x1B[96mid#x1B[39;49;00m=at.id)#x1B[90m#x1B[39;49;00m
                #x1B[94mfor#x1B[39;49;00m at #x1B[95min#x1B[39;49;00m VALID_ARRAY_TYPES#x1B[90m#x1B[39;49;00m
                #x1B[94mif#x1B[39;49;00m #x1B[33m"#x1B[39;49;00m#x1B[33m1d_chunked#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[95min#x1B[39;49;00m at.id#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
        ],#x1B[90m#x1B[39;49;00m
    )#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_covariance_eigh_impls#x1B[39;49;00m(other_array_type):#x1B[90m#x1B[39;49;00m
        warnings.filterwarnings(#x1B[33m"#x1B[39;49;00m#x1B[33merror#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       adata_sparse_mem = pbmc3k_normalized()[:#x1B[94m200#x1B[39;49;00m, :#x1B[94m100#x1B[39;49;00m].copy()#x1B[90m#x1B[39;49;00m
                           ^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_pca.py#x1B[0m:589: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[.../scanpy/_helpers/data.py#x1B[0m:67: in pbmc3k_normalized
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m _pbmc3k_normalized().copy()#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:1453: in copy
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._copy()#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:1394: in _copy
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m AnnData(**new)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/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.stable/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:464: in _init_as_actual
    #x1B[0m#x1B[96mself#x1B[39;49;00m._obs = _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.stable/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.stable/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.stable/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.stable/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.stable/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.stable/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[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../pandas/_config/config.py#x1B[0m:752: Pandas4Warning
tests/test_pca.py::test_pca_transform[dask_array_sparse-1d_chunked-csr_matrix]
Stack Traces | 0.018s run time
array_type = <function gen_csr_csc_params_wrapper.<locals>.wrapper at 0x763dd94f01a0>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_pca_transform#x1B[39;49;00m(array_type):#x1B[90m#x1B[39;49;00m
        adata = AnnData(array_type(A_list).astype(#x1B[33m"#x1B[39;49;00m#x1B[33mfloat32#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m))#x1B[90m#x1B[39;49;00m
        a_pca_abs = np.abs(A_pca)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        warnings.filterwarnings(#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.pp.pca(adata, n_comps=#x1B[94m4#x1B[39;49;00m, zero_center=#x1B[94mTrue#x1B[39;49;00m, dtype=#x1B[33m"#x1B[39;49;00m#x1B[33mfloat64#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       adata = adata.to_memory()#x1B[90m#x1B[39;49;00m
                ^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_pca.py#x1B[0m:239: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:1425: in to_memory
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m AnnData(**new)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/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.stable/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:464: in _init_as_actual
    #x1B[0m#x1B[96mself#x1B[39;49;00m._obs = _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.stable/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.stable/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.stable/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.stable/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.stable/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.stable/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[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../pandas/_config/config.py#x1B[0m:752: Pandas4Warning
tests/plotting/legacy/test_plotting.py::test_dotplot_matrixplot_stacked_violin[stacked_violin_std_scale_group]
Stack Traces | 0.019s run time
plot_cmp = <function plot_cmp.<locals>.save_and_compare at 0x7e1ea0d26e50>
id = 'stacked_violin_std_scale_group'
fn = functools.partial(<function stacked_violin at 0x7e1ee0286c40>, groupby='cell_type', use_raw=False, standard_scale='group', title='scale_group\nswap_axes', swap_axes=True, cmap='Blues')

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
        (#x1B[33m"#x1B[39;49;00m#x1B[33mid#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mfn#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
        [#x1B[90m#x1B[39;49;00m
            param_with(p, #x1B[94mlambda#x1B[39;49;00m fn, p=p: (p.id, fn))#x1B[90m#x1B[39;49;00m
            #x1B[94mfor#x1B[39;49;00m p #x1B[95min#x1B[39;49;00m params_dotplot_matrixplot_stacked_violin#x1B[90m#x1B[39;49;00m
        ],#x1B[90m#x1B[39;49;00m
    )#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_dotplot_matrixplot_stacked_violin#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        plot_cmp, #x1B[96mid#x1B[39;49;00m: #x1B[96mstr#x1B[39;49;00m, fn: Callable[[AnnData], #x1B[94mNone#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        adata = krumsiek11()#x1B[90m#x1B[39;49;00m
        adata.obs[#x1B[33m"#x1B[39;49;00m#x1B[33mnumeric_column#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = adata.X[:, #x1B[94m0#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        adata.layers[#x1B[33m"#x1B[39;49;00m#x1B[33mtest#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = -#x1B[94m1#x1B[39;49;00m * adata.X.copy()#x1B[90m#x1B[39;49;00m
        genes_dict = {#x1B[90m#x1B[39;49;00m
            #x1B[33m"#x1B[39;49;00m#x1B[33mgroup a#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33mGata2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mGata1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
            #x1B[33m"#x1B[39;49;00m#x1B[33mgroup b#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33mFog1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mEKLF#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mFli1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mSCL#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
            #x1B[33m"#x1B[39;49;00m#x1B[33mgroup c#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[33m"#x1B[39;49;00m#x1B[33mCebpa#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mPu.1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mcJun#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mEgrNab#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mGfi1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
        }#x1B[90m#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
            #x1B[90m# https://github..../pandas/issues/61928#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            warnings.filterwarnings(#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mignore#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33mr#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33minvalid value encountered in cast#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[96mRuntimeWarning#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            )#x1B[90m#x1B[39;49;00m
>           fn(adata, genes_dict #x1B[94mif#x1B[39;49;00m #x1B[96mid#x1B[39;49;00m.endswith(#x1B[33m"#x1B[39;49;00m#x1B[33mdict#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m) #x1B[94melse#x1B[39;49;00m adata.var_names, show=#x1B[94mFalse#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[.../plotting/legacy/test_plotting.py#x1B[0m:348: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[.../plotting/legacy/_stacked_violin.py#x1B[0m:792: in stacked_violin
    #x1B[0mvp.make_figure()#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../plotting/legacy/_baseplot_class.py#x1B[0m:777: in make_figure
    #x1B[0mnormalize = #x1B[96mself#x1B[39;49;00m._mainplot(main_ax)#x1B[90m#x1B[39;49;00m
                ^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../plotting/legacy/_stacked_violin.py#x1B[0m:402: in _mainplot
    #x1B[0m#x1B[96mself#x1B[39;49;00m._make_rows_of_violinplots(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../plotting/legacy/_stacked_violin.py#x1B[0m:518: in _make_rows_of_violinplots
    #x1B[0mrow_ax = sns.violinplot(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../site-packages/seaborn/categorical.py#x1B[0m:1745: in violinplot
    #x1B[0mp.scale_categorical(p.orient, order=order, formatter=formatter)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../site-packages/seaborn/_base.py#x1B[0m:1437: in scale_categorical
    #x1B[0mcat_data = cat_data.astype(#x1B[96mstr#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
               ^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../pandas/core/generic.py#x1B[0m:6781: in astype
    #x1B[0mnew_data = #x1B[96mself#x1B[39;49;00m._mgr.astype(dtype=dtype, errors=errors)#x1B[90m#x1B[39;49;00m
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../core/internals/managers.py#x1B[0m:632: in astype
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m.apply(#x1B[33m"#x1B[39;49;00m#x1B[33mastype#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, dtype=dtype, errors=errors)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../core/internals/managers.py#x1B[0m:456: in apply
    #x1B[0mapplied = #x1B[96mgetattr#x1B[39;49;00m(b, f)(**kwargs)#x1B[90m#x1B[39;49;00m
              ^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../core/internals/blocks.py#x1B[0m:623: in astype
    #x1B[0mnew_values = astype_array_safe(values, dtype, errors=errors)#x1B[90m#x1B[39;49;00m
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../core/dtypes/astype.py#x1B[0m:245: in astype_array_safe
    #x1B[0mnew_values = astype_array(values, dtype, copy=copy)#x1B[90m#x1B[39;49;00m
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../core/dtypes/astype.py#x1B[0m:187: in astype_array
    #x1B[0mvalues = values.astype(dtype, copy=copy)#x1B[90m#x1B[39;49;00m
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../core/arrays/categorical.py#x1B[0m:653: in astype
    #x1B[0mresult = take_nd(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../core/array_algos/take.py#x1B[0m:127: in take_nd
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m _take_nd_ndarray(arr, indexer, axis, fill_value, allow_fill)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../core/array_algos/take.py#x1B[0m:143: in _take_nd_ndarray
    #x1B[0mdtype, fill_value, mask_info = _take_preprocess_indexer_and_fill_value(#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

arr = array(['Ery', 'Mk', 'Mo', 'Neu', 'progenitor'], dtype='<U10')
indexer = array([4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
       4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,...3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
       3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
       3, 3])
fill_value = <NA>, allow_fill = True, mask = None

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92m_take_preprocess_indexer_and_fill_value#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        arr: np.ndarray,#x1B[90m#x1B[39;49;00m
        indexer: npt.NDArray[np.intp],#x1B[90m#x1B[39;49;00m
        fill_value,#x1B[90m#x1B[39;49;00m
        allow_fill: #x1B[96mbool#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        mask: npt.NDArray[np.bool_] | #x1B[94mNone#x1B[39;49;00m = #x1B[94mNone#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
    ):#x1B[90m#x1B[39;49;00m
        mask_info: #x1B[96mtuple#x1B[39;49;00m[np.ndarray | #x1B[94mNone#x1B[39;49;00m, #x1B[96mbool#x1B[39;49;00m] | #x1B[94mNone#x1B[39;49;00m = #x1B[94mNone#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m allow_fill:#x1B[90m#x1B[39;49;00m
            dtype, fill_value = arr.dtype, arr.dtype.type()#x1B[90m#x1B[39;49;00m
            mask_info = #x1B[94mNone#x1B[39;49;00m, #x1B[94mFalse#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
            #x1B[90m# check for promotion based on types only (do this first because#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            #x1B[90m# it's faster than computing a mask)#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            #x1B[94mif#x1B[39;49;00m lib.is_float(fill_value) #x1B[95mand#x1B[39;49;00m fill_value.is_integer():#x1B[90m#x1B[39;49;00m
                #x1B[90m# Avoid warning if possible#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                fill_value = #x1B[96mint#x1B[39;49;00m(fill_value)#x1B[90m#x1B[39;49;00m
            dtype, fill_value = maybe_promote(arr.dtype, fill_value)#x1B[90m#x1B[39;49;00m
            #x1B[94mif#x1B[39;49;00m dtype != arr.dtype:#x1B[90m#x1B[39;49;00m
                #x1B[94mif#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m (#x1B[90m#x1B[39;49;00m
                    (lib.is_float(fill_value) #x1B[95mand#x1B[39;49;00m np.isnan(fill_value))#x1B[90m#x1B[39;49;00m
                    #x1B[95mor#x1B[39;49;00m (arr.dtype.kind == #x1B[33m"#x1B[39;49;00m#x1B[33mU#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[95mand#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(fill_value, #x1B[96mstr#x1B[39;49;00m))#x1B[90m#x1B[39;49;00m
                ):#x1B[90m#x1B[39;49;00m
                    #x1B[90m# GH#53910#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
>                   warnings.warn(#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33mreindexing with a fill_value that cannot be held by the #x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                        #x1B[33m"#x1B[39;49;00m#x1B[33moriginal dtype is deprecated. Explicitly cast to a common #x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                        #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mdtype (in this case #x1B[39;49;00m#x1B[33m{#x1B[39;49;00mdtype#x1B[33m}#x1B[39;49;00m#x1B[33m) instead.#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                        Pandas4Warning,#x1B[90m#x1B[39;49;00m
                        stacklevel=find_stack_level(),#x1B[90m#x1B[39;49;00m
                    )#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE                   pandas.errors.Pandas4Warning: reindexing with a fill_value that cannot be held by the original dtype is deprecated. Explicitly cast to a common dtype (in this case object) instead.#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../core/array_algos/take.py#x1B[0m:601: Pandas4Warning
tests/test_pca.py::test_pca_transform[dask_array_dense-1d_chunked]
Stack Traces | 0.024s run time
array_type = <function as_dense_dask_array at 0x763dd94f0250>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_pca_transform#x1B[39;49;00m(array_type):#x1B[90m#x1B[39;49;00m
        adata = AnnData(array_type(A_list).astype(#x1B[33m"#x1B[39;49;00m#x1B[33mfloat32#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m))#x1B[90m#x1B[39;49;00m
        a_pca_abs = np.abs(A_pca)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        warnings.filterwarnings(#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.pp.pca(adata, n_comps=#x1B[94m4#x1B[39;49;00m, zero_center=#x1B[94mTrue#x1B[39;49;00m, dtype=#x1B[33m"#x1B[39;49;00m#x1B[33mfloat64#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       adata = adata.to_memory()#x1B[90m#x1B[39;49;00m
                ^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_pca.py#x1B[0m:239: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:1425: in to_memory
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m AnnData(**new)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/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.stable/lib/python3.14.../anndata/_core/anndata.py#x1B[0m:464: in _init_as_actual
    #x1B[0m#x1B[96mself#x1B[39;49;00m._obs = _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.stable/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.stable/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.stable/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.stable/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.stable/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.stable/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[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../pandas/_config/config.py#x1B[0m:752: Pandas4Warning
tests/test_datasets.py::test_pbmc68k_reduced
Stack Traces | 0.068s 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:149: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[.../scanpy/datasets/_datasets.py#x1B[0m:431: in pbmc68k_reduced
    #x1B[0madata.raw = AnnData(X=log_counts, var=adata.var[[]])#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/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:467: in _init_as_actual
    #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[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 requested a review from Zethson November 16, 2026 09:51
@Zethson
Zethson requested review from selmanozleyen and removed request for Zethson November 16, 2026 09:58
@flying-sheep
flying-sheep requested review from Zethson and removed request for Zethson November 16, 2026 10:07
Comment thread ci/scripts/datasets-v2.py Resolved
Comment thread src/scanpy/datasets/registry.yaml Resolved
Comment thread src/scanpy/datasets/_datasets.py Resolved
Comment thread ci/scripts/datasets-v2.py Resolved

@selmanozleyen selmanozleyen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I think having one file file would be better. I'd also ensure everything with a preset side effect is documented.

@flying-sheep

flying-sheep commented Nov 16, 2026 •

Copy link
Copy Markdown
Member Author

I think having one file file would be better.

I did that!

I'd also ensure everything with a preset side effect is documented.

Agreed, it’s done this way for things this PR touches but I’m sure there are 1–2 spots where it isn’t.

This branch has not been deployed

No deployments
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.

modernize datasets

2 participants