Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Module « scipy.sparse »

Classe « spmatrix »

Informations générales

Héritage

builtins.object
    spmatrix

Définition

class spmatrix(builtins.object):

Description [extrait de spmatrix.__doc__]

 This class provides a base class for all sparse matrices.  It
    cannot be instantiated.  Most of the work is provided by subclasses.
    

Constructeur(s)

Signature du constructeur Description
__init__(self, maxprint=50)

Liste des attributs statiques

Nom de l'attribut Valeur
ndim2

Liste des propriétés

Nom de la propriétéDescription
nnzNumber of stored values, including explicit zeros. [extrait de __doc__]
shapeGet shape of a matrix. [extrait de __doc__]

Liste des opérateurs

Signature de l'opérateur Description
__add__(self, other)
__eq__(self, other)
__ge__(self, other)
__gt__(self, other)
__iadd__(self, other)
__imul__(self, other)
__isub__(self, other)
__itruediv__(self, other)
__le__(self, other)
__lt__(self, other)
__matmul__(self, other)
__mul__(self, other) interpret other and call one of the following [extrait de __mul__.__doc__]
__ne__(self, other)
__neg__(self)
__pow__(self, other)
__radd__(self, other)
__rmul__(self, other)
__rsub__(self, other)
__rtruediv__(self, other)
__sub__(self, other)
__truediv__(self, other)

Liste des méthodes

Toutes les méthodes Méthodes d'instance Méthodes statiques Méthodes dépréciées
Signature de la méthodeDescription
__abs__(self)
__bool__(self)
__div__(self, other)
__getattr__(self, attr)
__idiv__(self, other)
__iter__(self)
__len__(self)
__nonzero__(self)
__rdiv__(self, other)
__repr__(self)
__rmatmul__(self, other)
__round__(self, ndigits=0)
__str__(self)
asformat(self, format, copy=False) Return this matrix in the passed format. [extrait de asformat.__doc__]
asfptype(self) Upcast matrix to a floating point format (if necessary) [extrait de asfptype.__doc__]
astype(self, dtype, casting='unsafe', copy=True) Cast the matrix elements to a specified type. [extrait de astype.__doc__]
conj(self, copy=True) Element-wise complex conjugation. [extrait de conj.__doc__]
conjugate(self, copy=True) Element-wise complex conjugation. [extrait de conjugate.__doc__]
copy(self) Returns a copy of this matrix. [extrait de copy.__doc__]
count_nonzero(self) Number of non-zero entries, equivalent to [extrait de count_nonzero.__doc__]
diagonal(self, k=0) Returns the kth diagonal of the matrix. [extrait de diagonal.__doc__]
dot(self, other) Ordinary dot product [extrait de dot.__doc__]
get_shape(self) Get shape of a matrix. [extrait de get_shape.__doc__]
getcol(self, j) Returns a copy of column j of the matrix, as an (m x 1) sparse [extrait de getcol.__doc__]
getformat(self) Format of a matrix representation as a string. [extrait de getformat.__doc__]
getH(self) Return the Hermitian transpose of this matrix. [extrait de getH.__doc__]
getmaxprint(self) Maximum number of elements to display when printed. [extrait de getmaxprint.__doc__]
getnnz(self, axis=None) Number of stored values, including explicit zeros. [extrait de getnnz.__doc__]
getrow(self, i) Returns a copy of row i of the matrix, as a (1 x n) sparse [extrait de getrow.__doc__]
maximum(self, other) Element-wise maximum between this and another matrix. [extrait de maximum.__doc__]
mean(self, axis=None, dtype=None, out=None)
minimum(self, other) Element-wise minimum between this and another matrix. [extrait de minimum.__doc__]
multiply(self, other) Point-wise multiplication by another matrix [extrait de multiply.__doc__]
nonzero(self) nonzero indices [extrait de nonzero.__doc__]
power(self, n, dtype=None) Element-wise power. [extrait de power.__doc__]
reshape(self, *args, **kwargs) reshape(self, shape, order='C', copy=False) [extrait de reshape.__doc__]
resize(self, shape) Resize the matrix in-place to dimensions given by ``shape`` [extrait de resize.__doc__]
set_shape(self, shape) See `reshape`. [extrait de set_shape.__doc__]
setdiag(self, values, k=0)
sum(self, axis=None, dtype=None, out=None)
toarray(self, order=None, out=None)
tobsr(self, blocksize=None, copy=False) Convert this matrix to Block Sparse Row format. [extrait de tobsr.__doc__]
tocoo(self, copy=False) Convert this matrix to COOrdinate format. [extrait de tocoo.__doc__]
tocsc(self, copy=False) Convert this matrix to Compressed Sparse Column format. [extrait de tocsc.__doc__]
tocsr(self, copy=False) Convert this matrix to Compressed Sparse Row format. [extrait de tocsr.__doc__]
todense(self, order=None, out=None)
todia(self, copy=False) Convert this matrix to sparse DIAgonal format. [extrait de todia.__doc__]
todok(self, copy=False) Convert this matrix to Dictionary Of Keys format. [extrait de todok.__doc__]
tolil(self, copy=False) Convert this matrix to List of Lists format. [extrait de tolil.__doc__]
transpose(self, axes=None, copy=False)

Méthodes héritées de la classe object

__delattr__, __dir__, __format__, __getattribute__, __hash__, __init_subclass__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__