function is_timelagged_dataset

deeptime.util.types.is_timelagged_dataset(dataset) bool

Checks whether an object can be ducktyped into a (time-lagged) dataset.

In particular, this method checks for presence of attributes

  • __len__

  • __getitem__

and, if length is positive, checks whether the first element is a tuple of length 2

Parameters:

dataset

Returns:

is_dataset – Whether the input is a time-lagged dataset.

Return type:

bool