Skip to content

Commit e14a7f8

Browse files
Update docstring
1 parent 2cd6c4e commit e14a7f8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

balance/utils/model_matrix.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,10 @@ def _prepare_input_model_matrix(
295295
variables (List[str] | None, optional): Variables to use from both
296296
inputs. If provided, `choose_variables` validates that each
297297
requested variable exists in both sample and target (when target is
298-
supplied), otherwise it raises ``ValueError``. If None, variables
299-
are inferred by `choose_variables`.
298+
supplied), otherwise it raises ``ValueError``. For ``Sample``
299+
inputs, this validation/inference is based on covariate names
300+
(``sample.covars().names()``), not all raw ``._df`` columns. If
301+
None, variables are inferred by `choose_variables`.
300302
add_na (bool, optional): If True, add NA indicator columns before
301303
model-matrix creation. If False, drop rows containing missing
302304
values; this can raise ``ValueError`` if dropping rows empties the

0 commit comments

Comments
 (0)