-
-
Notifications
You must be signed in to change notification settings - Fork 674
fix cardinality of Permutations_setk #41024
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Documentation preview for this PR (built with commit 4db2e93; changes) is ready! 🎉 |
self._k = k | ||
|
||
def cardinality(self) -> Integer: | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should start with "Return the cardinality of this set.", or similar.
Other than this, LGTM.
would be nice if we have a on the other hand, sphinx already generate |
TESTS:: | ||
sage: P = Permutations([1,2,4],2) | ||
sage: P = Permutations([1,2,4,5], 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason for modifying the test? The test suite doesn't detect failure on the old tests, but does detect failure on the new one?
(maybe it's safer to run the test suite on both old and new object, but I don't think it's too bad either)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, the old test is si small that it passes.
sagemathgh-41024: fix cardinality of Permutations_setk Fixes sagemath#41022 URL: sagemath#41024 Reported by: Martin Rubey Reviewer(s): mathzeta
Fixes #41022