check_for_nonfinite#
- pytorch_forecasting.data.timeseries.check_for_nonfinite(tensor: Tensor, names: str | List[str]) Tensor [source]#
Check if 2D tensor contains NAs or inifinite values.
- Parameters:
names (Union[str, List[str]]) – name(s) of column(s) (used for error messages)
tensor (torch.Tensor) – tensor to check
- Returns:
returns tensor if checks yield no issues
- Return type:
torch.Tensor