package np

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module NumpyRaw.NdenumerateSource

Sourcetype tag = [
  1. | `Ndenumerate
]
Sourcetype t = [ `Ndenumerate | `Object ] Obj.t
Sourceval of_pyobject : Py.Object.t -> t
Sourceval to_pyobject : [> tag ] Obj.t -> Py.Object.t
Sourceval 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

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

None

Sourceval to_string : t -> string

Print the object to a human-readable representation.

Sourceval show : t -> string

Print the object to a human-readable representation.

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

Pretty-print the object to a formatter.

OCaml

Innovation. Community. Security.