Ask Your Question

Deriving from Matrix class

asked 2012-10-28 11:27:20 -0500

SLOtoSF gravatar image

updated 2012-10-28 17:00:26 -0500

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 16:24:48 -0500 )edit

Sorry, let me rephrase.

SLOtoSF gravatar imageSLOtoSF ( 2012-10-28 16:54:38 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2012-10-29 03:31:33 -0500

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 11:27:20 -0500

Seen: 46 times

Last updated: Oct 29 '12