package sklearn

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tag = [
  1. | `Bunch
]
type t = [ `Bunch | `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

Container object exposing keys as attributes

Bunch objects are sometimes used as an output for functions and methods. They extend dictionaries by enabling values to be accessed by key, `bunch'value_key'`, or by an attribute, `bunch.value_key`.

Examples -------- >>> b = Bunch(a=1, b=2) >>> b'b' 2 >>> b.b 2 >>> b.a = 3 >>> b'a' 3 >>> b.c = 6 >>> b'c' 6

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.