How can I check if something is a matrix?
The best I've come up with so far is:
x in MatrixSpace(SR,n)
But it doesn't work for arbitrary dimension. (Am I right in assuming that SR is the most general thing one can define a matrix over?)
| 1 | initial version |
How can I check if something is a matrix?
The best I've come up with so far is:
x in MatrixSpace(SR,n)
But it doesn't work for arbitrary dimension. (Am I right in assuming that SR is the most general thing one can define a matrix over?)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.