docs: add docstrings to .matrix() and .dict() methods#890
Open
urbanophile wants to merge 2 commits intocoin-or:masterfrom
Open
docs: add docstrings to .matrix() and .dict() methods#890urbanophile wants to merge 2 commits intocoin-or:masterfrom
urbanophile wants to merge 2 commits intocoin-or:masterfrom
Conversation
Contributor
urbanophile
commented
Nov 30, 2025
- Add docstrings for .matrix() and .dict() methods
- Add more detail to docstring for .dicts() method
- Add basic usage examples
- Add some type annotations
- Add docstrings for .matrix() and .dict() methods - Add more detail to docstring for .dicts() method - Add basic usage examples
6946744 to
4131556
Compare
4131556 to
757e239
Compare
pchtsp
reviewed
Dec 9, 2025
Collaborator
pchtsp
left a comment
There was a problem hiding this comment.
Thanks, I left some minor comments on optional and union types
| indexStart=[], | ||
| ): | ||
| name: str, | ||
| indices: Iterable, |
Collaborator
There was a problem hiding this comment.
here indices should be optional to match the original definition. it's also the case for the dicts classmethod
| index = indices[0] | ||
| indices = indices[1:] | ||
| d = {} | ||
| d: dict[Any, Any] = {} |
Collaborator
There was a problem hiding this comment.
I guess here you can do something like dict[Any, Union[dict, LpVariable]]
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.