package np

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

Translate slice objects to concatenation along the first axis.

This is the masked array version of `lib.index_tricks.RClass`.

See Also -------- lib.index_tricks.RClass

Examples -------- >>> np.ma.mr_np.ma.array([1,2,3]), 0, 0, np.ma.array([4,5,6]) masked_array(data=1, 2, 3, ..., 4, 5, 6, mask=False, fill_value=999999)

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

None

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

matrix(data, dtype=None, copy=True)

.. note:: It is no longer recommended to use this class, even for linear algebra. Instead use regular arrays. The class may be removed in the future.

Returns a matrix from an array-like object, or from a string of data. A matrix is a specialized 2-D array that retains its 2-D nature through operations. It has certain special operators, such as ``*`` (matrix multiplication) and ``**`` (matrix power).

Parameters ---------- data : array_like or string If `data` is a string, it is interpreted as a matrix with commas or spaces separating columns, and semicolons separating rows. dtype : data-type Data-type of the output matrix. copy : bool If `data` is already an `ndarray`, then this flag determines whether the data is copied (the default), or whether a view is constructed.

See Also -------- array

Examples -------- >>> a = np.matrix('1 2; 3 4') >>> a matrix([1, 2], [3, 4])

>>> np.matrix([1, 2], [3, 4]) matrix([1, 2], [3, 4])

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.