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
Py3: Fix crystals.kirillov_reshetikhin for python3 #27977
Comments
This comment has been minimized.
This comment has been minimized.
Branch: u/vklein/27977 |
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:5
Note that If there is high performances expectations with these function, it might be best to juste tag the doctests with #py2 / #py3. |
comment:7
IMO, it is bad form to change (non print output) code so doctests are sorted. Instead you should just if gens is None:
if isinstance(on_gens, dict):
- gens = on_gens.keys()
+ gens = sorted(on_gens)
else:
gens = parent.domain().module_generators
self._gens = tuple(gens) |
Reviewer: Travis Scrimshaw |
comment:9
Ok thanks for your comments. Your solution doesn't solve the case with It's not clear to me why sorting at My initial reasoning was that as it is a |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:11
Here is another proposal with fixes at |
This comment has been minimized.
This comment has been minimized.
comment:13
Sorry for the noise |
comment:14
Replying to @vinklein:
Ah, right. I misread it as
It is not specific to that. It just happens to be that this case constructs the morphism using a (complicated enough) I am still not 100% happy with the change I proposed as it is essentially an unnecessary sort. However, I understand why you would do this for compatibility, and I doubt anyone is doing something with this where that would become a performance bottleneck. Well, this will now work (although we could force the sorting, but that would likely trivially break a bunch of other doctests): if gens is None:
if isinstance(on_gens, dict):
- gens = on_gens.keys()
+ gens = on_gens
else:
gens = parent.domain().module_generators
+ if isinstance(gens, dict):
+ gens = sorted(gens)
self._gens = tuple(gens) I am definitely in favor of just changing the doctest to have New commits:
|
comment:15
You just beat me to it. I still think it would be good to remove that useless call to |
comment:16
Well the current branch doesn't have side effects on others doctests under combinat/crystals from the tests i have done. To be accurate you're fine with this solution (minus the |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:18
I think you are right using Third branch has been pushed. |
This comment has been minimized.
This comment has been minimized.
comment:19
Thank you. The doctest is really just about showing the morphism exists, the actual definition is tested through other means. |
Changed branch from u/vklein/27977 to |
comment:21
Not in Sage 8.8. Let's please to try keep tickets' milestones related to the release in which we actually intend to include them, and in particular the release in which they were actually included, especially when closing tickets. |
Fix crystals.kirillov_reshetikhin doctests for python3
CC: @tscrim
Component: python3
Author: Vincent Klein
Branch/Commit:
dc9330d
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/27977
The text was updated successfully, but these errors were encountered: