### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Sparse matrices (`scipy.sparse`) »
- scipy.sparse.linalg »

# scipy.sparse.linalg.aslinearoperator

`scipy.sparse.linalg.``aslinearoperator`(A)

  Return A as a LinearOperator.

  ‘A’ may be any of the following types:
    - ndarray
    - matrix
    - sparse matrix (e.g. csr_matrix, lil_matrix, etc.)
    - LinearOperator
    - An object with .shape and .matvec attributes

  See the LinearOperator documentation for additonal information.

  Examples

      >>> from scipy import matrix
      >>> M = matrix( [[1,2,3],[4,5,6]], dtype='int32' )
      >>> aslinearoperator( M )
      <2x3 LinearOperator with dtype=int32>

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Sparse matrices (`scipy.sparse`) »
- scipy.sparse.linalg »