weldx.util#

Contains utility functions and classes.

Classes

WeldxAccessor

Custom accessor for extending DataArray functionality.

Functions

apply_func_by_mapping

Transform a dict by running functions mapped by keys over its values.

check_matplotlib_available

Emit a warning if matplotlib is not available.

compare_nested

Deeply compares [nested] data structures combined of tuples, lists, dicts...

dataclass_nested_eq

Set class __eq__ using util.compare_nested on __dict__.

deprecated

Mark a functions as deprecated.

inherit_docstrings

Inherits (public) docstrings from parent classes.

is_interactive_session

Check whether this Python session is interactive, e.g. Jupyter/IPython.

is_jupyterlab_session

Check whether we are in a Jupyter-Lab session.

mat_vec_mul

Matrix, Vector multiplication using matmul with newaxis for correct broadcasting.

ureg_check_class

Decorate class __init__ function with pint.UnitRegistry.check.

xr_3d_matrix

Create an xarray 3d matrix with correctly named dimensions and coordinates.

xr_3d_vector

Create an xarray 3d vector with correctly named dimensions and coordinates.

xr_check_coords

Validate the coordinates of the DataArray against a reference dictionary.

xr_check_dimensionality

Check if the dimensionality of a DataArray is compatible with reference unit.

xr_fill_all

Fill NaN values along all dimensions in xarray DataArray.

xr_interp_coordinates_in_time

Interpolate an xarray DataArray that represents 3d coordinates in time.

xr_interp_like

Interpolate DataArray along dimensions of another DataArray.

xr_interp_orientation_in_time

Interpolate an xarray DataArray that represents orientation data in time.

xr_is_orthogonal_matrix

Check if matrix along specific dimensions in a DataArray is orthogonal.

xr_matmul

Calculate broadcasted np.matmul(a,b) for xarray objects.

xr_transpose_matrix_data

Transpose data along two dimensions in an xarray DataArray.

weldx.util.external_file

External file utilities.

weldx.util.media_file

Media file.

weldx.util.util

Contains general (mostly internal) utility functions.

weldx.util.xarray

Contains xarray specific utility functions.