aixd.data.utils_data.reformat_array_to_torch
- aixd.data.utils_data.reformat_array_to_torch(data: ndarray) torch.Tensor [source]
Converts a numpy array to a torch tensor.
- Parameters:
data (np.ndarray) – The input data, either as a tensor or a numpy array.
- Returns:
torch.Tensor – The data as a torch tensor.