Skip to content
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

vectors and matrices should support the whole division operation // by a scalar when their base rings do #38637

Open
1 task done
maxale opened this issue Sep 7, 2024 · 4 comments

Comments

@maxale
Copy link
Contributor

maxale commented Sep 7, 2024

Problem Description

sage: v = vector(ZZ,[1,2,3])
sage: v // 2
[...]
TypeError: unsupported operand parent(s) for //: 'Ambient free module of rank 3 over the principal ideal domain Integer Ring' and 'Integer Ring'

Proposed Solution

Vectors / matrices should rely on support of that operation in the base ring. That is, v // 2 should be equivalent to

sage: v.apply_map(lambda t: t // 2)
(0, 1, 1)

Alternatives Considered

N/A

Additional Information

No response

Is there an existing issue for this?

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
@samkitshah1262
Copy link

@mkoeppe @maxale Is this issue up for the taking?

@maxale
Copy link
Contributor Author

maxale commented Sep 25, 2024

@samkitshah1262 yes, you are welcome to step in.

@samkitshah1262
Copy link

@maxale @mkoeppe I have set up sage , but since this is my first time contributing , can you please guide me on how to tackle this issue , or what could be a good starting point? Thank you!

@maxale
Copy link
Contributor Author

maxale commented Sep 28, 2024

@samkitshah1262 Check out this FAQ: https://doc.sagemath.org/html/en/faq/faq-contribute.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants