First time here? Check out the FAQ!

Ask Your Question
0

Who is the encoder of jordan_form in SageMath?

asked 2 years ago

updated 2 years ago

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?

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
2

answered 2 years ago

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

Preview: (hide)
link
1

answered 2 years ago

eric_g gravatar image

updated 2 years ago

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.

Preview: (hide)
link

Comments

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

Sébastien Palcoux gravatar imageSébastien Palcoux ( 2 years ago )

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 ( 2 years ago )

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: 2 years ago

Seen: 334 times

Last updated: Jan 05 '23