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 convert_temperature : val_:[> `Ndarray ] Np.Obj.t -> old_scale:string -> new_scale:string -> unit -> Py.Object.t

Convert from a temperature scale to another one among Celsius, Kelvin, Fahrenheit, and Rankine scales.

Parameters ---------- val : array_like Value(s) of the temperature(s) to be converted expressed in the original scale.

old_scale: str Specifies as a string the original scale from which the temperature value(s) will be converted. Supported scales are Celsius ('Celsius', 'celsius', 'C' or 'c'), Kelvin ('Kelvin', 'kelvin', 'K', 'k'), Fahrenheit ('Fahrenheit', 'fahrenheit', 'F' or 'f'), and Rankine ('Rankine', 'rankine', 'R', 'r').

new_scale: str Specifies as a string the new scale to which the temperature value(s) will be converted. Supported scales are Celsius ('Celsius', 'celsius', 'C' or 'c'), Kelvin ('Kelvin', 'kelvin', 'K', 'k'), Fahrenheit ('Fahrenheit', 'fahrenheit', 'F' or 'f'), and Rankine ('Rankine', 'rankine', 'R', 'r').

Returns ------- res : float or array of floats Value(s) of the converted temperature(s) expressed in the new scale.

Notes ----- .. versionadded:: 0.18.0

Examples -------- >>> from scipy.constants import convert_temperature >>> convert_temperature(np.array(-40, 40), 'Celsius', 'Kelvin') array( 233.15, 313.15)

val lambda2nu : [> `Ndarray ] Np.Obj.t -> Py.Object.t

Convert wavelength to optical frequency

Parameters ---------- lambda_ : array_like Wavelength(s) to be converted.

Returns ------- nu : float or array of floats Equivalent optical frequency.

Notes ----- Computes ``nu = c / lambda`` where c = 299792458.0, i.e., the (vacuum) speed of light in meters/second.

Examples -------- >>> from scipy.constants import lambda2nu, speed_of_light >>> lambda2nu(np.array((1, speed_of_light))) array( 2.99792458e+08, 1.00000000e+00)

val nu2lambda : [> `Ndarray ] Np.Obj.t -> Py.Object.t

Convert optical frequency to wavelength.

Parameters ---------- nu : array_like Optical frequency to be converted.

Returns ------- lambda : float or array of floats Equivalent wavelength(s).

Notes ----- Computes ``lambda = c / nu`` where c = 299792458.0, i.e., the (vacuum) speed of light in meters/second.

Examples -------- >>> from scipy.constants import nu2lambda, speed_of_light >>> nu2lambda(np.array((1, speed_of_light))) array( 2.99792458e+08, 1.00000000e+00)