package np

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

Multidimensional index iterator.

Return an iterator yielding pairs of array coordinates and values.

Parameters ---------- arr : ndarray Input array.

See Also -------- ndindex, flatiter

Examples -------- >>> a = np.array([1, 2], [3, 4]) >>> for index, x in np.ndenumerate(a): ... print(index, x) (0, 0) 1 (0, 1) 2 (1, 0) 3 (1, 1) 4

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

None

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 : Stdlib.Format.formatter -> t -> unit

Pretty-print the object to a formatter.