Skip to content

Machine Limit

Particula Index / Particula / Util / Machine Limit

Auto-generated documentation for particula.util.machine_limit module.

safe_exp

Show source in machine_limit.py:12

Compute the exponential of each element in the input array, with limits to prevent overflow based on machine precision.

Arguments

  • value ArrayLike - Input array.

Returns

  • np.ndarray - Exponential of the input array with overflow protection.

Signature

def safe_exp(value: ArrayLike) -> np.ndarray: ...

safe_log

Show source in machine_limit.py:28

Compute the natural logarithm of each element in the input array, with limits to prevent underflow based on machine precision.

Arguments

  • value ArrayLike - Input array.

Returns

  • np.ndarray - Natural logarithm of the input array with underflow protection.

Signature

def safe_log(value: ArrayLike) -> np.ndarray: ...

safe_log10

Show source in machine_limit.py:45

Compute the base 10 logarithm of each element in the input array, with limits to prevent underflow based on machine precision.

Arguments

  • value ArrayLike - Input array.

Returns

  • np.ndarray - Base 10 logarithm of the input array with underflow protection.

Signature

def safe_log10(value: ArrayLike) -> np.ndarray: ...