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 :

Vous êtes un professionnel et vous avez besoin d'une formation ? Machine Learning
avec Scikit-Learn
Voir le programme détaillé
Module « scipy.sparse.linalg »

Fonction aslinearoperator - module scipy.sparse.linalg

Signature de la fonction aslinearoperator

def aslinearoperator(A) 

Description

help(scipy.sparse.linalg.aslinearoperator)

Return A as a LinearOperator.

'A' may be any of the following types:
 - ndarray
 - matrix
 - sparse array (e.g. csr_array, lil_array, etc.)
 - LinearOperator
 - An object with .shape and .matvec attributes

See the LinearOperator documentation for additional information.

Notes
-----
If 'A' has no .dtype attribute, the data type is determined by calling
:func:`LinearOperator.matvec()` - set the .dtype attribute to prevent this
call upon the linear operator creation.

Examples
--------
>>> import numpy as np
>>> from scipy.sparse.linalg import aslinearoperator
>>> M = np.array([[1,2,3],[4,5,6]], dtype=np.int32)
>>> aslinearoperator(M)
<2x3 MatrixLinearOperator with dtype=int32>


Vous êtes un professionnel et vous avez besoin d'une formation ? RAG (Retrieval-Augmented Generation)
et Fine Tuning d'un LLM
Voir le programme détaillé