Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Commit 80478b0

Browse files
Merge pull request #204 from le-ander/dev
fix extraction of corf_loc_names when dmat is provided directly
2 parents 974b482 + 0edf9f8 commit 80478b0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

diffxpy/testing/tests.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,10 @@ def wald(
698698
as_numeric=as_numeric
699699
)
700700
else:
701-
coef_loc_names = dmat_loc.columns.tolist()
701+
if isinstance(dmat_loc, patsy.design_info.DesignMatrix):
702+
coef_loc_names = dmat_loc.design_info.column_names
703+
else:
704+
coef_loc_names = dmat_loc.columns.tolist()
702705
if not np.all([x in coef_loc_names for x in coef_to_test]):
703706
raise ValueError(
704707
"the requested test coefficients %s were found in model coefficients %s" %

0 commit comments

Comments
 (0)