Repository navigation
Fix utilities docstrings that name parameters the functions do not have - #1076
Merged
Merged
Conversation
- size takes X, documented as a - stack takes XS, documented as arrays - cross_product takes *XS, but documented X1 and X2 as separate parameters. Neither name can be passed, and the entries implied exactly two matrices when the function accepts any number, so the two entries are replaced by one for *XS. The Returns entry of cross_product is named A, which numpydoc allows, so it is left alone. Signed-off-by: VenishPaneliya <141703684+VenishPaneliya@users.noreply.github.com>
kbattocchi
approved these changes
Oct 20, 2026
kbattocchi
left a comment
Member
There was a problem hiding this comment.
Thanks for the contribution! I don't think we'd ever expect cross_product to be called with named parameters, but I guess it doesn't hurt to clean this up.
kbattocchi
enabled auto-merge (rebase)
October 20, 2026 13:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three entries in
econml.utilitiesname a parameter the function does not have. The module is in the public autosummary indoc/reference.rst, so these are rendered.sizeXastackXSarrayscross_product*XSX1andX2cross_productis the interesting one: neitherX1norX2can be passed by name, and documenting exactly two matrices understates it — the body loops overXS, so any number works. The two entries are replaced by a single*XSentry that keeps the original note about n-element vectors.The
Returnsentry ofcross_productis namedA; numpydoc allows naming a return, so I left that alone.Docs only, no behaviour change.
ruff checkpasses. Small follow-up to #1072.