package scipy

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tag = [
  1. | `MMFile
]
type t = [ `MMFile | `Object ] Obj.t
val of_pyobject : Py.Object.t -> t
val to_pyobject : [> tag ] Obj.t -> Py.Object.t
val create : ?kwargs:(string * Py.Object.t) list -> unit -> t

None

val info : source:[ `S of string | `File_like of Py.Object.t ] -> [> tag ] Obj.t -> int * int * int * string * string * string

Return size, storage parameters from Matrix Market file-like 'source'.

Parameters ---------- source : str or file-like Matrix Market filename (extension .mtx) or open file-like object

Returns ------- rows : int Number of matrix rows. cols : int Number of matrix columns. entries : int Number of non-zero entries of a sparse matrix or rows*cols for a dense matrix. format : str Either 'coordinate' or 'array'. field : str Either 'real', 'complex', 'pattern', or 'integer'. symmetry : str Either 'general', 'symmetric', 'skew-symmetric', or 'hermitian'.

val read : source:[ `S of string | `File_like of Py.Object.t ] -> [> tag ] Obj.t -> Py.Object.t

Reads the contents of a Matrix Market file-like 'source' into a matrix.

Parameters ---------- source : str or file-like Matrix Market filename (extensions .mtx, .mtz.gz) or open file object.

Returns ------- a : ndarray or coo_matrix Dense or sparse matrix depending on the matrix format in the Matrix Market file.

val write : ?comment:string -> ?field:string -> ?precision:int -> ?symmetry:string -> target:[ `S of string | `File_like of Py.Object.t ] -> a:[> `Ndarray ] Np.Obj.t -> [> tag ] Obj.t -> Py.Object.t

Writes sparse or dense array `a` to Matrix Market file-like `target`.

Parameters ---------- target : str or file-like Matrix Market filename (extension .mtx) or open file-like object. a : array like Sparse or dense 2D array. comment : str, optional Comments to be prepended to the Matrix Market file. field : None or str, optional Either 'real', 'complex', 'pattern', or 'integer'. precision : None or int, optional Number of digits to display for real or complex values. symmetry : None or str, optional Either 'general', 'symmetric', 'skew-symmetric', or 'hermitian'. If symmetry is None the symmetry type of 'a' is determined by its values.

val to_string : t -> string

Print the object to a human-readable representation.

val show : t -> string

Print the object to a human-readable representation.

val pp : Format.formatter -> t -> unit

Pretty-print the object to a formatter.

OCaml

Innovation. Community. Security.