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

matrix_from_columns() assertion failure #27688

Closed
jdemeyer opened this issue Apr 17, 2019 · 11 comments
Closed

matrix_from_columns() assertion failure #27688

jdemeyer opened this issue Apr 17, 2019 · 11 comments

Comments

@jdemeyer
Copy link
Contributor

In src/sage/matrix/matrix1.pyx, the matrix_from_columns() method has the following pieces:

        if not isinstance(columns, (list, tuple)):
            columns = list(columns)

        ...

        ncols = PyList_GET_SIZE(columns)

Note how PyList_GET_SIZE may be called on a tuple. This is invalid and causes assertion failures with Python 3.7.

Analogously for matrix_from_rows() and matrix_from_rows_and_columns().

CC: @kiwifb @slel

Component: linear algebra

Author: Jeroen Demeyer

Branch/Commit: 1a32690

Reviewer: François Bissey

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

@jdemeyer jdemeyer added this to the sage-8.8 milestone Apr 17, 2019
@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Contributor Author

@jdemeyer
Copy link
Contributor Author

Commit: f751bc4

@jdemeyer
Copy link
Contributor Author

New commits:

f751bc4Fix matrix_from_columns() assertion failure

@kiwifb
Copy link
Member

kiwifb commented Apr 17, 2019

comment:5

I'll test in the morning. Is the stuff in rings/number_field/totallyreal_rel.py supposed to be there?

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 17, 2019

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

1a32690Fix matrix_from_columns() assertion failure

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 17, 2019

Changed commit from f751bc4 to 1a32690

@jdemeyer
Copy link
Contributor Author

comment:7

Replying to @kiwifb:

Is the stuff in rings/number_field/totallyreal_rel.py supposed to be there?

No. I fixed that.

@kiwifb
Copy link
Member

kiwifb commented Apr 17, 2019

comment:8

I was half expecting to find further problems building the docs but it all went smoothly to the end :)

@kiwifb
Copy link
Member

kiwifb commented Apr 17, 2019

Reviewer: François Bissey

@vbraun
Copy link
Member

vbraun commented Apr 27, 2019

Changed branch from u/jdemeyer/matrix_from_columns___assertion_failure to 1a32690

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