-
-
Notifications
You must be signed in to change notification settings - Fork 553
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: numerous additional fixes for sage.numerical #24741
Comments
New commits:
|
Changed branch from +u/embray/python3/sage-numerical-backends/misc to u/embray/python3/sage-numerical-backends/misc |
Commit: |
comment:3
I believe this issue can reasonably be addressed for Sage 8.4. |
comment:4
branch is red |
comment:6
Retargeting some of my tickets (somewhat optimistically for now). |
comment:7
red branch |
Changed dependencies from #24740 to none |
comment:8
still red |
comment:9
This branch is such a mess now. I think a lot of the things in it were already fixed. I'm trying to figure it out... |
comment:10
yes, indeed. That's why I did not manage to merge or rebase it myself.. |
comment:11
Okay, I'm working on it. From what I can tell there are still a handful of fixes in here that haven't made it into the mainline yet. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:16
It could check if it's not already a |
comment:17
Also if that's definitely a problem it's not caught be any tests. Why don't you see if it actually does break, and if so a regression test should be added. |
comment:18
ok, then. Let us keep this question about What about the conflict with #27342 ? |
comment:19
- names.extend([str(s) for s in self.x()])
+ names.extend(str(s) for s in self.x()) otherwise, LGTM |
comment:20
We want to convert these inputs explicitly to |
comment:21
I perfectly understood that you now allow to give an iterable as input, and that it is important to cast to What I don't understand is the use of |
comment:22
Yes, if you want to check an exact type using
|
comment:23
Thanks for the explanation. It's good to know. The remaining issues with py3 are due to |
comment:24
Hmm, not that it really matters much here either way but I'm not sure comment:19 is necessarily much of an improvement. In most cases I do advocate for generator expressions, but for small collections there's actually more overhead in terms of setting up the generator object and iterating over it than it's worth. For example:
You can also see in the list.extend implementation that it has a more optimized code path for the case where it's given a list or tuple and can use the Of course that's all implementation detail and there's no guarantee in the language that this should be faster. By rights the generator expression should be "better" but in practice it isn't, at least for small lists. |
comment:25
Thank you very much for this detailed explanation. Then I agree that current formulation is good. To avoid merge conflict with #27342, you should revert some changes
- sage: x_sol.keys()
+ sage: sorted(x_sol) |
Reviewer: David Coudert |
comment:26
Thanks for reminding me. Yes, I'll just rebase this on top of #27342. |
comment:27
red branch, as expected |
comment:28
All the better then. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:30
I think this is still good, though I did not test on Python 3. |
comment:31
With this branch on Python3, I go from
to
which all look like |
Changed reviewer from David Coudert to David Coudert, Travis Scrimshaw |
comment:32
Same for me. Good to go. |
Changed branch from u/embray/python3/sage-numerical-backends/misc to |
Component: python3
Author: Erik Bray
Branch/Commit:
2ebacb6
Reviewer: David Coudert, Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/24741
The text was updated successfully, but these errors were encountered: