auto_uncertainties.util

Attributes

T

Functions

ignore_runtime_warnings(f)

A decorator to ignore runtime warnings.

ignore_numpy_downcast_warnings(f)

A decorator to ignore DowncastWarning.

deprecated([reason, category])

Raise a deprecation warning for a decorated function.

is_iterable(y)

has_length(y)

ndarray_to_scalar(value)

strip_device_array(value)

Module Contents

auto_uncertainties.util.T[source]
auto_uncertainties.util.ignore_runtime_warnings(f)[source]

A decorator to ignore runtime warnings.

Parameters:

f – The function to wrap

Returns:

The wrapped function

auto_uncertainties.util.ignore_numpy_downcast_warnings(f)[source]

A decorator to ignore DowncastWarning.

Parameters:

f – The function to wrap

Returns:

The wrapped function

auto_uncertainties.util.deprecated(reason='', category=DeprecationWarning)[source]

Raise a deprecation warning for a decorated function.

Parameters:
  • reason – Why the deprecation is being issued (Default = '')

  • category – The type of warning to issue (Default = DeprecationWarning)

auto_uncertainties.util.is_iterable(y)[source]
auto_uncertainties.util.has_length(y)[source]
auto_uncertainties.util.ndarray_to_scalar(value)[source]
Parameters:

value (numpy.typing.NDArray[T])

Return type:

T

auto_uncertainties.util.strip_device_array(value)[source]
Parameters:

value (jax.Array | numpy.typing.NDArray | float)

Return type:

numpy.typing.NDArray