package sklearn

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

Double-precision floating-point number type, compatible with Python `float` and C ``double``. Character code: ``'d'``. Canonical name: ``np.double``. Alias: ``np.float_``. Alias *on this platform*: ``np.float64``: 64-bit precision floating-point number type: sign bit, 11 bits exponent, 52 bits mantissa.

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

Return selfkey.

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

Create a floating-point number from a hexadecimal string.

>>> float.fromhex('0x1.ffffp10') 2047.984375 >>> float.fromhex('-0x1p-1074') -5e-324

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

Return a hexadecimal representation of a floating-point number.

>>> (-0.1).hex() '-0x1.999999999999ap-4' >>> 3.14159.hex() '0x1.921f9f01b866ep+1'

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

Return True if the float is an integer.

val newbyteorder : ?new_order:string -> [> tag ] Obj.t -> Np.Dtype.t

newbyteorder(new_order='S')

Return a new `dtype` with a different byte order.

Changes are also made in all fields and sub-arrays of the data type.

The `new_order` code can be any from the following:

* 'S' - swap dtype from current to opposite endian * '<', 'L' - little endian * '>', 'B' - big endian * '=', 'N' - native order * '|', 'I' - ignore (no change to byte order)

Parameters ---------- new_order : str, optional Byte order to force; a value from the byte order specifications above. The default value ('S') results in swapping the current byte order. The code does a case-insensitive check on the first letter of `new_order` for the alternatives above. For example, any of 'B' or 'b' or 'biggish' are valid to specify big-endian.

Returns ------- new_dtype : dtype New `dtype` object with the given change to the byte order.

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.