Ask Your Question
0

cannot use .str() on kernel of Matrix ?

asked 2023-12-02 10:14:18 +0100

PiGob gravatar image

updated 2023-12-02 10:14:48 +0100

(with sagemath 10.1 - not checked with previous revision)

A is a matrix defined by:

A=Matrix(GF(2),4,3,[0,1,1,1,0,1,1,1,0,1,1,1])

k is the kernel of A :

k=kernel(A)

Sagemath displays :

Vector space of degree 4 and dimension 1 over Finite Field of size 2
Basis matrix:
[1 1 1 0]

But then, k.str() fails with error message "AttributeError: 'FreeModule_submodule_field_with_category' object has no attribute 'str'".

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-12-02 12:08:38 +0100

eric_g gravatar image

You can use str(k) to get a string representation of k.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-12-02 10:14:18 +0100

Seen: 181 times

Last updated: Dec 02 '23