-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
Move real/complex interval fields to new coercion model #24371
Comments
Commit: |
Author: Jeroen Demeyer |
Dependencies: #24372 |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:10
Also, I imagine #24363 is a dependency from looking at the code. |
This comment has been minimized.
This comment has been minimized.
comment:14
I also shortly want to note #15114 here and the discussion from which that ticket spawned at sage-devel. I am not saying it needs to get fixed here, but it is a good thing to have in the back of your mind while working on this ticket so that at least things do not get worse in that respect. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:17
Replying to @koffie:
OK. So with #15114 in mind, this should be a feature and not a bug:
|
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits: |
comment:37
I still need to implement the Python 3 compatibility that I promised. |
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Reviewer: Travis Scrimshaw |
comment:40
Some comments:
I think it looks good otherwise. |
comment:41
I consider the proposed changes to unique representation outside the scope of this ticket. This ticket is already reasonably large, let's not add more things. I'll have a look at your other comments. |
comment:42
I guess the |
comment:43
We should also do changes of the form in -return ComplexIntervalFieldElement(self._parent, re, im)
+return type(self)(self._parent, re, im) and similarly for |
comment:45
I guess I kept
We should probably have a separate ticket to replace |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:47
I ended up doing a lot of cleanup. I think I'm using Note that currently the category stuff won't be used anyway because the elements are extension types. |
comment:48
Thank you for doing the cleanup. For changes such as - cdef ComplexIntervalFieldElement res = self._new()
+ res = self._new() aren't we loosing some efficiency? I would think because they are still subclasses of This goes through the - return complex_interval.ComplexIntervalFieldElement(self, 0, 1)
+ return self(0, 1) I think we are better making a direct call to |
comment:49
Replying to @tscrim:
No, Cython has type inference. Since
I don't see the problem with using |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:51
Replying to @tscrim:
Actually, the relevant attributes are I changed some |
comment:52
Replying to @jdemeyer:
That is what is happening, e.g.: __pyx_t_1 = ((PyObject *)__pyx_f_4sage_5rings_16complex_interval_27ComplexIntervalFieldE
lement__new(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_a00 = ((struct __pyx_obj_4sage_5rings_16complex_interval_ComplexIntervalFieldEle
ment *)__pyx_t_1);
__pyx_t_1 = 0; I didn't realize that Cython was that smart. :)
Thank you. LGTM. (If I wanted to be really picky, I would say |
comment:53
Thanks! |
Changed branch from public/24371-move_real_complex_interval_fields_to_new_coercion_model to |
, sagemath#24483, sagemath#24371, sagemath#24511, sagemath#25848, sagemath#26105, sagemath#28481, sagemath#29010, sagemath#29412, sagemath#30332, sagemath#30372, sagemath#31345, sagemath#32375, sagemath#32606, sagemath#32610, sagemath#32612, sagemath#32641, sagemath#32660, sagemath#32750, sagemath#32869, sagemath#33602 <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [ ] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36307 Reported by: Matthias Köppe Reviewer(s):
Also fix the following:
We also deal with Python 3 compatibility regarding
int
/long
andbytes
/unicode
.Depends on #24423
CC: @tscrim
Component: coercion
Author: Jeroen Demeyer
Branch/Commit:
9ac1612
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/24371
The text was updated successfully, but these errors were encountered: