Skip to content

Backport PR #4326 on branch 1.12.x (docs: update dev guide) - #4327

Merged
flying-sheep merged 1 commit into
scverse:1.12.xfrom
meeseeksmachine:auto-backport-of-pr-4326-on-1.12.x
Aug 28, 2026
Merged

Backport PR #4326 on branch 1.12.x (docs: update dev guide)#4327
flying-sheep merged 1 commit into
scverse:1.12.xfrom
meeseeksmachine:auto-backport-of-pr-4326-on-1.12.x

Conversation

@meeseeksmachine

Copy link
Copy Markdown
Contributor

Backport PR #4326: docs: update dev guide

@lumberbot-app lumberbot-app Bot added this to the 1.12.5 milestone Aug 28, 2026
@flying-sheep
flying-sheep enabled auto-merge (squash) August 28, 2026 09:21
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
2857 3 2854 175
View the top 3 failed test(s) by shortest run time
tests/test_preprocessing.py::test_regress_out_int[uint32]
Stack Traces | 0.037s run time
data_dir = PosixPath('.../scanpy/tests/_data')
dtype = dtype('float32')

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mdtype#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [np.uint32, np.float64, np.uint64])#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_regress_out_int#x1B[39;49;00m(data_dir: Path, dtype: #x1B[96mtype#x1B[39;49;00m[np.generic]):#x1B[90m#x1B[39;49;00m
        adata = pbmc3k()[:#x1B[94m200#x1B[39;49;00m, :#x1B[94m200#x1B[39;49;00m].copy()#x1B[90m#x1B[39;49;00m
        adata.X = adata.X.astype(np.float64 #x1B[94mif#x1B[39;49;00m dtype != np.uint32 #x1B[94melse#x1B[39;49;00m np.float32)#x1B[90m#x1B[39;49;00m
        dtype = adata.X.dtype#x1B[90m#x1B[39;49;00m
        adata.obs[#x1B[33m"#x1B[39;49;00m#x1B[33mlabels#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = pd.Categorical(#x1B[90m#x1B[39;49;00m
            ([#x1B[33m"#x1B[39;49;00m#x1B[33mA#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * (adata.X.shape[#x1B[94m0#x1B[39;49;00m] - #x1B[94m100#x1B[39;49;00m)) + ([#x1B[33m"#x1B[39;49;00m#x1B[33mB#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m100#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        )#x1B[90m#x1B[39;49;00m
        adata_other = adata.copy()#x1B[90m#x1B[39;49;00m
        adata_other.X = adata_other.X.astype(dtype)#x1B[90m#x1B[39;49;00m
        #x1B[90m# results using only one processor#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
>       sc.pp.regress_out(adata, keys=[#x1B[33m"#x1B[39;49;00m#x1B[33mlabels#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_preprocessing.py#x1B[0m:419: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[.../scanpy/preprocessing/_simple.py#x1B[0m:799: in regress_out
    #x1B[0mres = Parallel(n_jobs=n_jobs)(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14....../site-packages/joblib/parallel.py#x1B[0m:1986: in __call__
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m output #x1B[94mif#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m.return_generator #x1B[94melse#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(output)#x1B[90m#x1B[39;49;00m
                                                ^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14....../site-packages/joblib/parallel.py#x1B[0m:1914: in _get_sequential_output
    #x1B[0mres = func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
          ^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/preprocessing/_simple.py#x1B[0m:842: in _regress_out_chunk
    #x1B[0m).fit()#x1B[90m#x1B[39;49;00m
      ^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../statsmodels/genmod/generalized_linear_model.py#x1B[0m:1269: in fit
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._fit_irls(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../statsmodels/genmod/generalized_linear_model.py#x1B[0m:1486: in _fit_irls
    #x1B[0mwls_results = wls_model.fit(method=wls_method2)#x1B[90m#x1B[39;49;00m
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <statsmodels.regression.linear_model.WLS object at 0x7f8b68db2190>
method = 'pinv', cov_type = 'nonrobust', cov_kwds = None, use_t = None
kwargs = {}

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mfit#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
            #x1B[96mself#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            method: Literal[#x1B[33m"#x1B[39;49;00m#x1B[33mpinv#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mqr#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = #x1B[33m"#x1B[39;49;00m#x1B[33mpinv#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            cov_type: Literal[#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mnonrobust#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mfixed scale#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mHC0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mHC1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mHC2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mHC3#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mHAC#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mhac-panel#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mhac-groupsum#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mcluster#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mcluster-jk#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mcluster-crv3#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ] = #x1B[33m"#x1B[39;49;00m#x1B[33mnonrobust#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            cov_kwds=#x1B[94mNone#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            use_t: #x1B[96mbool#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m = #x1B[94mNone#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            **kwargs#x1B[90m#x1B[39;49;00m
    ):#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
    #x1B[33m    Full fit of the model.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    The results include an estimate of covariance matrix, (whitened)#x1B[39;49;00m
    #x1B[33m    residuals and an estimate of scale.#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    method : {'pinv', 'qr'}, optional#x1B[39;49;00m
    #x1B[33m        Can be "pinv", "qr".  "pinv" uses the Moore-Penrose pseudoinverse#x1B[39;49;00m
    #x1B[33m        to solve the least squares problem. "qr" uses the QR#x1B[39;49;00m
    #x1B[33m        factorization.#x1B[39;49;00m
    #x1B[33m    cov_type : str, optional#x1B[39;49;00m
    #x1B[33m        See `regression.linear_model.RegressionResults` for a description#x1B[39;49;00m
    #x1B[33m        of the available covariance estimators.#x1B[39;49;00m
    #x1B[33m    cov_kwds : dict or None, optional#x1B[39;49;00m
    #x1B[33m        See `linear_model.RegressionResults.get_robustcov_results` for a#x1B[39;49;00m
    #x1B[33m        description required keywords for alternative covariance#x1B[39;49;00m
    #x1B[33m        estimators.#x1B[39;49;00m
    #x1B[33m    use_t : bool, optional#x1B[39;49;00m
    #x1B[33m        Flag indicating to use the Student's t distribution when computing#x1B[39;49;00m
    #x1B[33m        p-values.  Default behavior depends on cov_type. See#x1B[39;49;00m
    #x1B[33m        `linear_model.RegressionResults.get_robustcov_results` for#x1B[39;49;00m
    #x1B[33m        implementation details.#x1B[39;49;00m
    #x1B[33m    **kwargs#x1B[39;49;00m
    #x1B[33m        Additional keyword arguments that contain information used when#x1B[39;49;00m
    #x1B[33m        constructing a model using the formula interface.#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    RegressionResults#x1B[39;49;00m
    #x1B[33m        The model estimation results.#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    RegressionResults#x1B[39;49;00m
    #x1B[33m        The results container.#x1B[39;49;00m
    #x1B[33m    RegressionResults.get_robustcov_results#x1B[39;49;00m
    #x1B[33m        A method to change the covariance estimator used when fitting the#x1B[39;49;00m
    #x1B[33m        model.#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    The fit method uses the pseudoinverse of the design/exogenous variables#x1B[39;49;00m
    #x1B[33m    to solve the least squares minimization.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[90m# NOTE: pinv_wexog, normalized_cov_params, wexog_singular_values and#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[90m# rank are recomputed from self.wexog on every call (rather than#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[90m# cached based on whether they already exist) so that the model's#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[90m# state after fit() depends only on the current data, never on#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[90m# which `method` a previous fit() call happened to use.#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        method = string_like(method, #x1B[33m"#x1B[39;49;00m#x1B[33mmethod#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, options=(#x1B[33m"#x1B[39;49;00m#x1B[33mpinv#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mqr#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m), lower=#x1B[94mFalse#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m method == #x1B[33m"#x1B[39;49;00m#x1B[33mpinv#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
            pinv_wexog, singular_values = pinv_extended(#x1B[96mself#x1B[39;49;00m.wexog)#x1B[90m#x1B[39;49;00m
            #x1B[96mself#x1B[39;49;00m.pinv_wexog = pinv_wexog#x1B[90m#x1B[39;49;00m
            #x1B[96mself#x1B[39;49;00m.normalized_cov_params = np.dot(#x1B[90m#x1B[39;49;00m
                pinv_wexog, np.transpose(pinv_wexog)#x1B[90m#x1B[39;49;00m
            )#x1B[90m#x1B[39;49;00m
            #x1B[96mself#x1B[39;49;00m.wexog_singular_values = singular_values#x1B[90m#x1B[39;49;00m
            #x1B[96mself#x1B[39;49;00m.rank = np.linalg.matrix_rank(np.diag(singular_values))#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
            #x1B[94mif#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m.rank < #x1B[96mself#x1B[39;49;00m.wexog.shape[#x1B[94m1#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[33mThe design matrix is rank-deficient. #x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                    #x1B[33m"#x1B[39;49;00m#x1B[33mThe model parameters are not uniquely determined.#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                    SingularMatrixWarning,#x1B[90m#x1B[39;49;00m
                    stacklevel=#x1B[94m2#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                )#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE               statsmodels.tools.sm_exceptions.SingularMatrixWarning: The design matrix is rank-deficient. The model parameters are not uniquely determined.#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../statsmodels/regression/linear_model.py#x1B[0m:393: SingularMatrixWarning
tests/test_preprocessing.py::test_regress_out_int[uint64]
Stack Traces | 0.434s run time
data_dir = PosixPath('.../scanpy/tests/_data')
dtype = dtype('float64')

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mdtype#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [np.uint32, np.float64, np.uint64])#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_regress_out_int#x1B[39;49;00m(data_dir: Path, dtype: #x1B[96mtype#x1B[39;49;00m[np.generic]):#x1B[90m#x1B[39;49;00m
        adata = pbmc3k()[:#x1B[94m200#x1B[39;49;00m, :#x1B[94m200#x1B[39;49;00m].copy()#x1B[90m#x1B[39;49;00m
        adata.X = adata.X.astype(np.float64 #x1B[94mif#x1B[39;49;00m dtype != np.uint32 #x1B[94melse#x1B[39;49;00m np.float32)#x1B[90m#x1B[39;49;00m
        dtype = adata.X.dtype#x1B[90m#x1B[39;49;00m
        adata.obs[#x1B[33m"#x1B[39;49;00m#x1B[33mlabels#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = pd.Categorical(#x1B[90m#x1B[39;49;00m
            ([#x1B[33m"#x1B[39;49;00m#x1B[33mA#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * (adata.X.shape[#x1B[94m0#x1B[39;49;00m] - #x1B[94m100#x1B[39;49;00m)) + ([#x1B[33m"#x1B[39;49;00m#x1B[33mB#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m100#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        )#x1B[90m#x1B[39;49;00m
        adata_other = adata.copy()#x1B[90m#x1B[39;49;00m
        adata_other.X = adata_other.X.astype(dtype)#x1B[90m#x1B[39;49;00m
        #x1B[90m# results using only one processor#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
>       sc.pp.regress_out(adata, keys=[#x1B[33m"#x1B[39;49;00m#x1B[33mlabels#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_preprocessing.py#x1B[0m:419: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[.../scanpy/preprocessing/_simple.py#x1B[0m:799: in regress_out
    #x1B[0mres = Parallel(n_jobs=n_jobs)(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14....../site-packages/joblib/parallel.py#x1B[0m:1986: in __call__
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m output #x1B[94mif#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m.return_generator #x1B[94melse#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(output)#x1B[90m#x1B[39;49;00m
                                                ^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14....../site-packages/joblib/parallel.py#x1B[0m:1914: in _get_sequential_output
    #x1B[0mres = func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
          ^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/preprocessing/_simple.py#x1B[0m:842: in _regress_out_chunk
    #x1B[0m).fit()#x1B[90m#x1B[39;49;00m
      ^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../statsmodels/genmod/generalized_linear_model.py#x1B[0m:1269: in fit
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._fit_irls(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../statsmodels/genmod/generalized_linear_model.py#x1B[0m:1486: in _fit_irls
    #x1B[0mwls_results = wls_model.fit(method=wls_method2)#x1B[90m#x1B[39;49;00m
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <statsmodels.regression.linear_model.WLS object at 0x7f9bda170590>
method = 'pinv', cov_type = 'nonrobust', cov_kwds = None, use_t = None
kwargs = {}

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mfit#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
            #x1B[96mself#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            method: Literal[#x1B[33m"#x1B[39;49;00m#x1B[33mpinv#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mqr#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = #x1B[33m"#x1B[39;49;00m#x1B[33mpinv#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            cov_type: Literal[#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mnonrobust#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mfixed scale#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mHC0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mHC1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mHC2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mHC3#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mHAC#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mhac-panel#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mhac-groupsum#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mcluster#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mcluster-jk#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mcluster-crv3#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ] = #x1B[33m"#x1B[39;49;00m#x1B[33mnonrobust#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            cov_kwds=#x1B[94mNone#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            use_t: #x1B[96mbool#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m = #x1B[94mNone#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            **kwargs#x1B[90m#x1B[39;49;00m
    ):#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
    #x1B[33m    Full fit of the model.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    The results include an estimate of covariance matrix, (whitened)#x1B[39;49;00m
    #x1B[33m    residuals and an estimate of scale.#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    method : {'pinv', 'qr'}, optional#x1B[39;49;00m
    #x1B[33m        Can be "pinv", "qr".  "pinv" uses the Moore-Penrose pseudoinverse#x1B[39;49;00m
    #x1B[33m        to solve the least squares problem. "qr" uses the QR#x1B[39;49;00m
    #x1B[33m        factorization.#x1B[39;49;00m
    #x1B[33m    cov_type : str, optional#x1B[39;49;00m
    #x1B[33m        See `regression.linear_model.RegressionResults` for a description#x1B[39;49;00m
    #x1B[33m        of the available covariance estimators.#x1B[39;49;00m
    #x1B[33m    cov_kwds : dict or None, optional#x1B[39;49;00m
    #x1B[33m        See `linear_model.RegressionResults.get_robustcov_results` for a#x1B[39;49;00m
    #x1B[33m        description required keywords for alternative covariance#x1B[39;49;00m
    #x1B[33m        estimators.#x1B[39;49;00m
    #x1B[33m    use_t : bool, optional#x1B[39;49;00m
    #x1B[33m        Flag indicating to use the Student's t distribution when computing#x1B[39;49;00m
    #x1B[33m        p-values.  Default behavior depends on cov_type. See#x1B[39;49;00m
    #x1B[33m        `linear_model.RegressionResults.get_robustcov_results` for#x1B[39;49;00m
    #x1B[33m        implementation details.#x1B[39;49;00m
    #x1B[33m    **kwargs#x1B[39;49;00m
    #x1B[33m        Additional keyword arguments that contain information used when#x1B[39;49;00m
    #x1B[33m        constructing a model using the formula interface.#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    RegressionResults#x1B[39;49;00m
    #x1B[33m        The model estimation results.#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    RegressionResults#x1B[39;49;00m
    #x1B[33m        The results container.#x1B[39;49;00m
    #x1B[33m    RegressionResults.get_robustcov_results#x1B[39;49;00m
    #x1B[33m        A method to change the covariance estimator used when fitting the#x1B[39;49;00m
    #x1B[33m        model.#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    The fit method uses the pseudoinverse of the design/exogenous variables#x1B[39;49;00m
    #x1B[33m    to solve the least squares minimization.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[90m# NOTE: pinv_wexog, normalized_cov_params, wexog_singular_values and#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[90m# rank are recomputed from self.wexog on every call (rather than#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[90m# cached based on whether they already exist) so that the model's#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[90m# state after fit() depends only on the current data, never on#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[90m# which `method` a previous fit() call happened to use.#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        method = string_like(method, #x1B[33m"#x1B[39;49;00m#x1B[33mmethod#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, options=(#x1B[33m"#x1B[39;49;00m#x1B[33mpinv#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mqr#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m), lower=#x1B[94mFalse#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m method == #x1B[33m"#x1B[39;49;00m#x1B[33mpinv#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
            pinv_wexog, singular_values = pinv_extended(#x1B[96mself#x1B[39;49;00m.wexog)#x1B[90m#x1B[39;49;00m
            #x1B[96mself#x1B[39;49;00m.pinv_wexog = pinv_wexog#x1B[90m#x1B[39;49;00m
            #x1B[96mself#x1B[39;49;00m.normalized_cov_params = np.dot(#x1B[90m#x1B[39;49;00m
                pinv_wexog, np.transpose(pinv_wexog)#x1B[90m#x1B[39;49;00m
            )#x1B[90m#x1B[39;49;00m
            #x1B[96mself#x1B[39;49;00m.wexog_singular_values = singular_values#x1B[90m#x1B[39;49;00m
            #x1B[96mself#x1B[39;49;00m.rank = np.linalg.matrix_rank(np.diag(singular_values))#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
            #x1B[94mif#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m.rank < #x1B[96mself#x1B[39;49;00m.wexog.shape[#x1B[94m1#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[33mThe design matrix is rank-deficient. #x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                    #x1B[33m"#x1B[39;49;00m#x1B[33mThe model parameters are not uniquely determined.#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                    SingularMatrixWarning,#x1B[90m#x1B[39;49;00m
                    stacklevel=#x1B[94m2#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                )#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE               statsmodels.tools.sm_exceptions.SingularMatrixWarning: The design matrix is rank-deficient. The model parameters are not uniquely determined.#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../statsmodels/regression/linear_model.py#x1B[0m:393: SingularMatrixWarning
tests/test_preprocessing.py::test_regress_out_int[float64]
Stack Traces | 1.38s run time
data_dir = PosixPath('.../scanpy/tests/_data')
dtype = dtype('float64')

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mdtype#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [np.uint32, np.float64, np.uint64])#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_regress_out_int#x1B[39;49;00m(data_dir: Path, dtype: #x1B[96mtype#x1B[39;49;00m[np.generic]):#x1B[90m#x1B[39;49;00m
        adata = pbmc3k()[:#x1B[94m200#x1B[39;49;00m, :#x1B[94m200#x1B[39;49;00m].copy()#x1B[90m#x1B[39;49;00m
        adata.X = adata.X.astype(np.float64 #x1B[94mif#x1B[39;49;00m dtype != np.uint32 #x1B[94melse#x1B[39;49;00m np.float32)#x1B[90m#x1B[39;49;00m
        dtype = adata.X.dtype#x1B[90m#x1B[39;49;00m
        adata.obs[#x1B[33m"#x1B[39;49;00m#x1B[33mlabels#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = pd.Categorical(#x1B[90m#x1B[39;49;00m
            ([#x1B[33m"#x1B[39;49;00m#x1B[33mA#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * (adata.X.shape[#x1B[94m0#x1B[39;49;00m] - #x1B[94m100#x1B[39;49;00m)) + ([#x1B[33m"#x1B[39;49;00m#x1B[33mB#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m100#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        )#x1B[90m#x1B[39;49;00m
        adata_other = adata.copy()#x1B[90m#x1B[39;49;00m
        adata_other.X = adata_other.X.astype(dtype)#x1B[90m#x1B[39;49;00m
        #x1B[90m# results using only one processor#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
>       sc.pp.regress_out(adata, keys=[#x1B[33m"#x1B[39;49;00m#x1B[33mlabels#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_preprocessing.py#x1B[0m:419: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[.../scanpy/preprocessing/_simple.py#x1B[0m:799: in regress_out
    #x1B[0mres = Parallel(n_jobs=n_jobs)(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14....../site-packages/joblib/parallel.py#x1B[0m:1986: in __call__
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m output #x1B[94mif#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m.return_generator #x1B[94melse#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(output)#x1B[90m#x1B[39;49;00m
                                                ^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14....../site-packages/joblib/parallel.py#x1B[0m:1914: in _get_sequential_output
    #x1B[0mres = func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
          ^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/preprocessing/_simple.py#x1B[0m:842: in _regress_out_chunk
    #x1B[0m).fit()#x1B[90m#x1B[39;49;00m
      ^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../statsmodels/genmod/generalized_linear_model.py#x1B[0m:1269: in fit
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._fit_irls(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../statsmodels/genmod/generalized_linear_model.py#x1B[0m:1486: in _fit_irls
    #x1B[0mwls_results = wls_model.fit(method=wls_method2)#x1B[90m#x1B[39;49;00m
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <statsmodels.regression.linear_model.WLS object at 0x7f8b58f96350>
method = 'pinv', cov_type = 'nonrobust', cov_kwds = None, use_t = None
kwargs = {}

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mfit#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
            #x1B[96mself#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            method: Literal[#x1B[33m"#x1B[39;49;00m#x1B[33mpinv#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mqr#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = #x1B[33m"#x1B[39;49;00m#x1B[33mpinv#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            cov_type: Literal[#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mnonrobust#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mfixed scale#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mHC0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mHC1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mHC2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mHC3#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mHAC#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mhac-panel#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mhac-groupsum#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mcluster#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mcluster-jk#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mcluster-crv3#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ] = #x1B[33m"#x1B[39;49;00m#x1B[33mnonrobust#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            cov_kwds=#x1B[94mNone#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            use_t: #x1B[96mbool#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m = #x1B[94mNone#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            **kwargs#x1B[90m#x1B[39;49;00m
    ):#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
    #x1B[33m    Full fit of the model.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    The results include an estimate of covariance matrix, (whitened)#x1B[39;49;00m
    #x1B[33m    residuals and an estimate of scale.#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    method : {'pinv', 'qr'}, optional#x1B[39;49;00m
    #x1B[33m        Can be "pinv", "qr".  "pinv" uses the Moore-Penrose pseudoinverse#x1B[39;49;00m
    #x1B[33m        to solve the least squares problem. "qr" uses the QR#x1B[39;49;00m
    #x1B[33m        factorization.#x1B[39;49;00m
    #x1B[33m    cov_type : str, optional#x1B[39;49;00m
    #x1B[33m        See `regression.linear_model.RegressionResults` for a description#x1B[39;49;00m
    #x1B[33m        of the available covariance estimators.#x1B[39;49;00m
    #x1B[33m    cov_kwds : dict or None, optional#x1B[39;49;00m
    #x1B[33m        See `linear_model.RegressionResults.get_robustcov_results` for a#x1B[39;49;00m
    #x1B[33m        description required keywords for alternative covariance#x1B[39;49;00m
    #x1B[33m        estimators.#x1B[39;49;00m
    #x1B[33m    use_t : bool, optional#x1B[39;49;00m
    #x1B[33m        Flag indicating to use the Student's t distribution when computing#x1B[39;49;00m
    #x1B[33m        p-values.  Default behavior depends on cov_type. See#x1B[39;49;00m
    #x1B[33m        `linear_model.RegressionResults.get_robustcov_results` for#x1B[39;49;00m
    #x1B[33m        implementation details.#x1B[39;49;00m
    #x1B[33m    **kwargs#x1B[39;49;00m
    #x1B[33m        Additional keyword arguments that contain information used when#x1B[39;49;00m
    #x1B[33m        constructing a model using the formula interface.#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    RegressionResults#x1B[39;49;00m
    #x1B[33m        The model estimation results.#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    RegressionResults#x1B[39;49;00m
    #x1B[33m        The results container.#x1B[39;49;00m
    #x1B[33m    RegressionResults.get_robustcov_results#x1B[39;49;00m
    #x1B[33m        A method to change the covariance estimator used when fitting the#x1B[39;49;00m
    #x1B[33m        model.#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    The fit method uses the pseudoinverse of the design/exogenous variables#x1B[39;49;00m
    #x1B[33m    to solve the least squares minimization.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[90m# NOTE: pinv_wexog, normalized_cov_params, wexog_singular_values and#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[90m# rank are recomputed from self.wexog on every call (rather than#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[90m# cached based on whether they already exist) so that the model's#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[90m# state after fit() depends only on the current data, never on#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[90m# which `method` a previous fit() call happened to use.#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        method = string_like(method, #x1B[33m"#x1B[39;49;00m#x1B[33mmethod#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, options=(#x1B[33m"#x1B[39;49;00m#x1B[33mpinv#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mqr#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m), lower=#x1B[94mFalse#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m method == #x1B[33m"#x1B[39;49;00m#x1B[33mpinv#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
            pinv_wexog, singular_values = pinv_extended(#x1B[96mself#x1B[39;49;00m.wexog)#x1B[90m#x1B[39;49;00m
            #x1B[96mself#x1B[39;49;00m.pinv_wexog = pinv_wexog#x1B[90m#x1B[39;49;00m
            #x1B[96mself#x1B[39;49;00m.normalized_cov_params = np.dot(#x1B[90m#x1B[39;49;00m
                pinv_wexog, np.transpose(pinv_wexog)#x1B[90m#x1B[39;49;00m
            )#x1B[90m#x1B[39;49;00m
            #x1B[96mself#x1B[39;49;00m.wexog_singular_values = singular_values#x1B[90m#x1B[39;49;00m
            #x1B[96mself#x1B[39;49;00m.rank = np.linalg.matrix_rank(np.diag(singular_values))#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
            #x1B[94mif#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m.rank < #x1B[96mself#x1B[39;49;00m.wexog.shape[#x1B[94m1#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[33mThe design matrix is rank-deficient. #x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                    #x1B[33m"#x1B[39;49;00m#x1B[33mThe model parameters are not uniquely determined.#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                    SingularMatrixWarning,#x1B[90m#x1B[39;49;00m
                    stacklevel=#x1B[94m2#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                )#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE               statsmodels.tools.sm_exceptions.SingularMatrixWarning: The design matrix is rank-deficient. The model parameters are not uniquely determined.#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.14.../statsmodels/regression/linear_model.py#x1B[0m:393: SingularMatrixWarning

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

@flying-sheep
flying-sheep disabled auto-merge August 28, 2026 09:35
@flying-sheep
flying-sheep merged commit cc4c090 into scverse:1.12.x Aug 28, 2026
4 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants