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

Something funny with free modules #3469

Closed
robertwb opened this issue Jun 19, 2008 · 3 comments
Closed

Something funny with free modules #3469

robertwb opened this issue Jun 19, 2008 · 3 comments

Comments

@robertwb
Copy link
Contributor

sage: W = (ZZ^2).span([(1/2,1/2), (0,1)]); W
Free module of degree 2 and rank 2 over Integer Ring
Echelon basis matrix:
[1/2 1/2]
[  0   1]
sage: V = (ZZ^2).span([(1/2,1/2), (0,2)]); V
Free module of degree 2 and rank 2 over Integer Ring
Echelon basis matrix:
[1/2 1/2]
[  0   2]
sage: W(V.gen(0))
Traceback (most recent call last):
...
TypeError: no coercion of this rational to integer

CC: @jasongrout

Component: linear algebra

Issue created by migration from https://trac.sagemath.org/ticket/3469

@robertwb
Copy link
Contributor Author

comment:1

Also

sage: type(V.gen())
<type 'sage.modules.vector_rational_dense.Vector_rational_dense'>
sage: type(V([1,2]))
<type 'sage.modules.vector_integer_dense.Vector_integer_dense'>

@robertwb
Copy link
Contributor Author

comment:2

This seems to be the real issue:

sage: V([1/2,1/2])
Traceback (most recent call last):
...
TypeError: no coercion of this rational to integer

@boothby
Copy link

boothby commented Jan 18, 2010

comment:4

Seems to work now.

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