package scipy

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val get_py : string -> Py.Object.t

Get an attribute of this module as a Py.Object.t. This is useful to pass a Python function to another function.

module IdentityOperator : sig ... end
module MatrixLinearOperator : sig ... end
val aslinearoperator : Py.Object.t -> Py.Object.t

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 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 -------- >>> 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>

val asmatrix : ?dtype:Py.Object.t -> data:Py.Object.t -> unit -> Py.Object.t

None

val is_pydata_spmatrix : Py.Object.t -> Py.Object.t

Check whether object is pydata/sparse matrix, avoiding importing the module.

val isintlike : Py.Object.t -> Py.Object.t

Is x appropriate as an index into a sparse matrix? Returns True if it can be cast safely to a machine int.

val isshape : ?nonneg:Py.Object.t -> x:Py.Object.t -> unit -> Py.Object.t

Is x a valid 2-tuple of dimensions?

If nonneg, also checks that the dimensions are non-negative.

val isspmatrix : Py.Object.t -> Py.Object.t

Is x of a sparse matrix type?

Parameters ---------- x object to check for being a sparse matrix

Returns ------- bool True if x is a sparse matrix, False otherwise

Notes ----- issparse and isspmatrix are aliases for the same function.

Examples -------- >>> from scipy.sparse import csr_matrix, isspmatrix >>> isspmatrix(csr_matrix([5])) True

>>> from scipy.sparse import isspmatrix >>> isspmatrix(5) False

OCaml

Innovation. Community. Security.