| 1 | initial version |
You can do this:
sage: from sage.matrix.matrix import is_Matrix
sage: is_Matrix(1)
False
Even better, don't check for types in your code. If an argument behaves like a matrix, then your code works. If not, an exception will be raised. Thats how its supposed to work.
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.