For using igraph from Python
Home  Trees  Indices  Help 



object +  Matrix
Simple matrix data type.
Of course there are much more advanced matrix data types for Python
(for instance, the ndarray
data type of Numeric Python) and
this implementation does not want to compete with them. The only role of
this data type is to provide a convenient interface for the matrices
returned by the Graph
object (for instance, allow indexing
with tuples in the case of adjacency matrices and so on).






































Inherited from 









data Returns the data stored in the matrix as a list of lists 

shape Returns the shape of the matrix as a tuple 

Inherited from 

Initializes a matrix.

Creates a matrix filled with the given value

Creates a matrix filled with zeros.

Creates an identity matrix.

Adds the given value to the matrix.

Returns a single item, a row or a column of the matrix

Returns a hash value for a matrix.

Sets a single item, a row or a column of the matrix

Subtracts the given value from the matrix.

repr(x)

str(x)

Support for iteration. This is actually implemented as a generator, so there is no need for a separate iterator class. The generator returns copies of the rows in the matrix as lists to avoid messing around with the internals. Feel free to do anything with the copies, the changes won't be reflected in the original matrix. 
Plots the matrix to the given Cairo context in the given box Besides the usual selfexplanatory plotting parameters
(
If only the row names or the column names are given and the matrix is squareshaped, the same names are used for both column and row names. 
Returns the minimum of the matrix along the given dimension

Returns the maximum of the matrix along the given dimension


dataReturns the data stored in the matrix as a list of lists 
shapeReturns the shape of the matrix as a tuple

Home  Trees  Indices  Help 


Generated by Epydoc 3.0.1 on Fri May 10 10:51:14 2019  http://epydoc.sourceforge.net 