def _parse_exogenous(self, obj: DataArray, name: str, node_level: bool) -> Tensor:
    obj = utils.copy_to_tensor(obj)
    if node_level:
        obj = utils.to_steps_nodes_channels(obj)
        self._check_same_dim(obj.shape[1], 'n_nodes', name)
    else:
        obj = utils.to_steps_channels(obj)
    self._check_same_dim(obj.shape[0], 'n_steps', name)
    obj = utils.cast_tensor(obj, self.precision)
    return obj
def _parse_exogenous(self, obj: DataArray, name: str, node_level: bool) -> Tensor:
    obj = utils.copy_to_tensor(obj)
    if node_level:
        obj = utils.to_steps_nodes_channels(obj)
        self._check_same_dim(obj.shape[1], 'n_nodes', name)
    else:
        obj = utils.to_steps_channels(obj)
    self._check_same_dim(obj.shape[0], 'n_steps', name)
    obj = utils.cast_tensor(obj, self.precision)
    return obj