Utils module

This module contains all kinds of utility methods, and can be imported as follows:

>>> from dtaianomaly import utils

Utility classes

CheckIsFittedMixin()

Mixin object to automatically check whether the object is fitted.

PrintConstructionCallMixin()

Mixin object to print the construction call of an object.

Utility functions

is_valid_list(value, target_type)

Check if a given list is valid.

is_valid_array_like(array)

Check if a value is a valid array-like.

is_univariate(X)

Check if the given time series is univariate.

get_dimension(X)

Get the dimension of the given time series.

convert_to_list(value)

Convert a given value to a list.

Numba-based utility functions

np_diff(x)

Numba implementation for np.diff(x).

np_any_axis0(x)

Numba implementation for np.any(x, axis=0).

np_any_axis1(x)

Numba implementation for np.any(x, axis=1).

make_intervals(x)

Numba implementation to convert an array into intervals.