Ask Your Question

Deriving from Matrix class

asked 2012-10-28 17:27:20 +0200

SLOtoSF gravatar image

updated 2012-10-28 23:00:26 +0200

Sage doesn't recognize Matrix_generic_dense. How can I create a Matrix class?

Say I want to create a class of generic matrices which I could tack on various other attributes to. I am hoping for something like:

class MatrixNew(Matrix_generic_dense):
edit retag flag offensive close merge delete


It probably needs to be imported from the relevant place? This is a very vague question as it stands :(

kcrisman gravatar imagekcrisman ( 2012-10-28 22:24:48 +0200 )edit

Sorry, let me rephrase.

SLOtoSF gravatar imageSLOtoSF ( 2012-10-28 22:54:38 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-10-29 09:31:33 +0200

Jason Grout gravatar image

Look in the devel/sage/sage/matrix/ directory for examples. matrix_mpolynomial_dense.pyx looks like a pretty minimal example. matrix_symbolic_dense.pyx and matrix_double_dense.pyx might be good examples too.

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


Asked: 2012-10-28 17:27:20 +0200

Seen: 182 times

Last updated: Oct 29 '12