package scipy

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val get_py : string -> Py.Object.t

Get an attribute of this module as a Py.Object.t. This is useful to pass a Python function to another function.

val find : ?sub:string -> ?disp:bool -> unit -> [ `ArrayLike | `Ndarray | `Object ] Np.Obj.t option

Return list of physical_constant keys containing a given string.

Parameters ---------- sub : str, unicode Sub-string to search keys for. By default, return all keys. disp : bool If True, print the keys that are found, and return None. Otherwise, return the list of keys without printing anything.

Returns ------- keys : list or None If `disp` is False, the list of keys is returned. Otherwise, None is returned.

Examples -------- >>> from scipy.constants import find, physical_constants

Which keys in the ``physical_constants`` dictionary contain 'boltzmann'?

>>> find('boltzmann') 'Boltzmann constant', 'Boltzmann constant in Hz/K', 'Boltzmann constant in eV/K', 'Boltzmann constant in inverse meter per kelvin', 'Stefan-Boltzmann constant'

Get the constant called 'Boltzmann constant in Hz/K':

>>> physical_constants'Boltzmann constant in Hz/K' (20836619120.0, 'Hz K^-1', 0.0)

Find constants with 'radius' in the key:

>>> find('radius') 'Bohr radius', 'classical electron radius', 'deuteron rms charge radius', 'proton rms charge radius' >>> physical_constants'classical electron radius' (2.8179403262e-15, 'm', 1.3e-24)

val parse_constants_2002to2014 : Py.Object.t -> Py.Object.t

None

val parse_constants_2018toXXXX : Py.Object.t -> Py.Object.t

None

val precision : [ `S of string | `Python_string of Py.Object.t ] -> float

Relative precision in physical_constants indexed by key

Parameters ---------- key : Python string or unicode Key in dictionary `physical_constants`

Returns ------- prec : float Relative precision in `physical_constants` corresponding to `key`

Examples -------- >>> from scipy import constants >>> constants.precision(u'proton mass') 5.1e-37

val sqrt : Py.Object.t -> Py.Object.t

Return the square root of x.

val unit : [ `S of string | `Python_string of Py.Object.t ] -> Py.Object.t

Unit in physical_constants indexed by key

Parameters ---------- key : Python string or unicode Key in dictionary `physical_constants`

Returns ------- unit : Python string Unit in `physical_constants` corresponding to `key`

Examples -------- >>> from scipy import constants >>> constants.unit(u'proton mass') 'kg'

val value : [ `S of string | `Python_string of Py.Object.t ] -> float

Value in physical_constants indexed by key

Parameters ---------- key : Python string or unicode Key in dictionary `physical_constants`

Returns ------- value : float Value in `physical_constants` corresponding to `key`

Examples -------- >>> from scipy import constants >>> constants.value(u'elementary charge') 1.602176634e-19

OCaml

Innovation. Community. Security.