Ask Your Question
0

Who is the encoder of jordan_form in SageMath?

asked 2023-01-05 08:11:34 +0200

updated 2023-01-05 08:14:01 +0200

One month ago, the following question involving the function jordan_form was posted https://ask.sagemath.org/question/653... but it got no answer.

Answering this question requires to know how the function jordan_form was encoded, so it may be more relevant to ask directly the one who encoded this function in SageMath. Who is it?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
2

answered 2023-01-05 09:35:11 +0200

FrédéricC gravatar image

go to

https://github.com/sagemath/sage

navigate to the file src/sage/matrix/matrix2.pyx

and use the "Blame" button

edit flag offensive delete link more
1

answered 2023-01-05 10:44:11 +0200

eric_g gravatar image

updated 2023-01-05 11:09:02 +0200

To complement @FrédéricC 's answer, here is how to find that the relevant source file is indeed src/sage/matrix/matrix2.pyx: in a SageMath session, run

sage: m = matrix(1)
sage: m.jordan_form?

At the end of the returned documentation, you can see src/sage/matrix/matrix2.pyx in the File: field. Then you can browse the github directory to that file, as indicated by @FrédéricC.

Alternatively, you can run git blame on your computer: first open a terminal and go to the subdirectory src/sage/matrix of your SageMath root directory (the latter is returned by sage: !echo $SAGE_ROOT in a SageMath terminal). Then determine the line at which the definition of the method jordan_form starts by running

grep -n "def jordan_form" matrix2.pyx

For SageMath 9.7, the output should be:

10823:    def jordan_form(self, base_ring=None, sparse=False, subdivide=True, transformation=False, eigenvalues=None, check_input=True):

Hence the line number is 10823 and you may run

git blame -L 10823 matrix2.pyx

to see the list of contributors to the method jordan_form.

edit flag offensive delete link more

Comments

Next, should I choose a relevant contributor and send him/her an email?

Sébastien Palcoux gravatar imageSébastien Palcoux ( 2023-01-05 11:03:30 +0200 )edit

Since you have now access to the source code of the method, why not read it and answer yourself your own question (which was 'how is "encoded" this method', IIRC...) ?

BTW : this (mis-)use of "encoding" instead of "programming" or just "writing" jar my teeth...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2023-01-05 11:46:08 +0200 )edit

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-01-05 08:11:34 +0200

Seen: 175 times

Last updated: Jan 05 '23