Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagelib
Path: blob/master/sage/matrix/matrix.pyx
4056 views
1
"""
2
Abstract base class for matrices
3
4
For design documentation see matrix/docs.py.
5
"""
6
7
################################################################################
8
# Copyright (C) 2005, 2006 William Stein <[email protected]>
9
#
10
# Distributed under the terms of the GNU General Public License (GPL).
11
# The full text of the GPL is available at:
12
#
13
# http://www.gnu.org/licenses/
14
################################################################################
15
16
include '../ext/stdsage.pxi'
17
18
def is_Matrix(x):
19
"""
20
EXAMPLES::
21
22
sage: from sage.matrix.matrix import is_Matrix
23
sage: is_Matrix(0)
24
False
25
sage: is_Matrix(matrix([[1,2],[3,4]]))
26
True
27
"""
28
return IS_INSTANCE(x, Matrix)
29
30
cdef class Matrix(matrix2.Matrix):
31
pass
32
33
# This is pretty nasty low level stuff. The idea is to speed up construction
34
# of EuclideanDomainElements (in particular Integers) by skipping some tp_new
35
# calls up the inheritance tree.
36
PY_SET_TP_NEW(Matrix, matrix2.Matrix)
37
38