-
-
Notifications
You must be signed in to change notification settings - Fork 567
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
Weaken types for _rmul_ and _lmul_ #15947
Comments
Changed author from Travis Scrimshaw to none |
comment:1
The problem begins with However, more and more I'm convincing myself that my proposal is not the way to do things unless we want The problem can be seen with the following:
So converting things to use |
comment:2
Oh, here's an idea. What about having the |
comment:3
Replying to @tscrim:
I do, and in fact at some point I tried to use more of the "good old" Cython base classes in the category framework. One problem, if I recall correctly, is a bug in Cython (still not fixed if I recall correctly) that makes it possible to create a Python class C that inherits from two Cython base classes A, B, such that some methods of A trying to access cdef attributes of A get confused by cdef attributes of B. So, the Cython does not recognise that the class layouts are incompatible. |
comment:4
But here we would have an intermediate python class. Do you remember if that helped at all? |
comment:5
I don't remember. I think the problem was to simultaneously inherit from Just imagine that you let |
comment:6
So because of the mechanism for constructing element classes, I can't OOTB just add
Although at some point we will need a category-based approach to this problem, but I don't see how to do so Although I've come across an independent bug with 1x1 matrices:
I can post branches/commits of the various attempts I mentioned above too. |
This comment has been minimized.
This comment has been minimized.
Author: Jeroen Demeyer |
Changed author from Jeroen Demeyer to none |
This comment has been minimized.
This comment has been minimized.
comment:13
Replying to @jdemeyer: I think you are right, "any object" would be too broad. If you wanna implement an algebraic structure, you should at least inherit from |
comment:14
Replying to @simon-king-jena:
That was not the reason: "any object" does not work since code often needs the parent of the second argument of Unlike
True, but besides the point. How your algebraic structure is implemented does not say anything about the API of calling I have an eventual goal in mind of merging all the various |
Dependencies: #21140 |
Author: Jeroen Demeyer |
Commit: |
New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:22
Patchbot (essentially) green and this is something that we should do. Positive review and hoping that there are no conflicts. |
Reviewer: Travis Scrimshaw |
Changed branch from u/jdemeyer/weaken_types_for__rmul__and__lmul_ to |
As a step towards removing the old parent with gens and using categories, we need to have
_rmul_
and_lmul_
take anyElement
, not justRingElement
.Depends on #21140
CC: @nthiery @nbruin @vbraun @simon-king-jena
Component: coercion
Author: Jeroen Demeyer
Branch/Commit:
30737e0
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/15947
The text was updated successfully, but these errors were encountered: