Returns actual time series size.
Final timesteps that have NaN values for all dimensions will be removed from the count. Infinity and negative infinity ar considered valid time series values.
A time series.
Backend. If be is an instance of the class NumPyBackend or the string “numpy”, the NumPy backend is used. If be is an instance of the class PyTorchBackend or the string “pytorch”, the PyTorch backend is used. If be is None, the backend is determined by the input arrays. See our dedicated user-guide page for more information.
Actual size of the time series.
Examples
>>> ts_size([1, 2, 3, numpy.nan]) 3 >>> ts_size([1, numpy.nan]) 1 >>> ts_size([numpy.nan]) 0 >>> ts_size([[1, 2], ... [2, 3], ... [3, 4], ... [numpy.nan, 2], ... [numpy.nan, numpy.nan]]) 4 >>> ts_size([numpy.nan, 3, numpy.inf, numpy.nan]) 3
tslearn.utils.ts_size
¶
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4