package scipy

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tag = [
  1. | `VarReader4
]
type t = [ `Object | `VarReader4 ] Obj.t
val of_pyobject : Py.Object.t -> t
val to_pyobject : [> tag ] Obj.t -> Py.Object.t
val create : Py.Object.t -> t

Class to read matlab 4 variables

val array_from_header : ?process:Py.Object.t -> hdr:Py.Object.t -> [> tag ] Obj.t -> Py.Object.t

None

val read_char_array : hdr:Py.Object.t -> [> tag ] Obj.t -> [ `ArrayLike | `Ndarray | `Object ] Np.Obj.t

latin-1 text matrix (char matrix) reader

Parameters ---------- hdr : ``VarHeader4`` instance

Returns ------- arr : ndarray with dtype 'U1', shape given by `hdr` ``dims``

val read_full_array : hdr:Py.Object.t -> [> tag ] Obj.t -> [ `ArrayLike | `Ndarray | `Object ] Np.Obj.t

Full (rather than sparse) matrix getter

Read matrix (array) can be real or complex

Parameters ---------- hdr : ``VarHeader4`` instance

Returns ------- arr : ndarray complex array if ``hdr.is_complex`` is True, otherwise a real numeric array

val read_header : [> tag ] Obj.t -> Py.Object.t

Read and return header for variable

val read_sparse_array : hdr:Py.Object.t -> [> tag ] Obj.t -> Py.Object.t

Read and return sparse matrix type

Parameters ---------- hdr : ``VarHeader4`` instance

Returns ------- arr : ``scipy.sparse.coo_matrix`` with dtype ``float`` and shape read from the sparse matrix data

Notes ----- MATLAB 4 real sparse arrays are saved in a N+1 by 3 array format, where N is the number of non-zero values. Column 1 values 0:N are the (1-based) row indices of the each non-zero value, column 2 0:N are the column indices, column 3 0:N are the (real) values. The last values -1,0:2 of the rows, column indices are shape0 and shape1 respectively of the output matrix. The last value for the values column is a padding 0. mrows and ncols values from the header give the shape of the stored matrix, here N+1, 3. Complex data are saved as a 4 column matrix, where the fourth column contains the imaginary component; the last value is again 0. Complex sparse data do *not* have the header ``imagf`` field set to True; the fact that the data are complex is only detectable because there are 4 storage columns.

val read_sub_array : ?copy:bool -> hdr:Py.Object.t -> [> tag ] Obj.t -> [ `ArrayLike | `Ndarray | `Object ] Np.Obj.t

Mat4 read using header `hdr` dtype and dims

Parameters ---------- hdr : object object with attributes ``dtype``, ``dims``. dtype is assumed to be the correct endianness copy : bool, optional copies array before return if True (default True) (buffer is usually read only)

Returns ------- arr : ndarray of dtype given by `hdr` ``dtype`` and shape given by `hdr` ``dims``

val shape_from_header : hdr:Py.Object.t -> [> tag ] Obj.t -> Py.Object.t

Read the shape of the array described by the header. The file position after this call is unspecified.

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.