def std(self, ddof: int = 1) -> Self:
        """
        Return a deterministic ``TimeSeries`` containing the standard deviation of each component
        (over the samples) of this stochastic ``TimeSeries``.

        This works only on stochastic series (i.e., with more than 1 sample)

        Parameters
        ----------
        ddof
            "Delta Degrees of Freedom": the divisor used in the calculation is N - ddof where N represents the
            number of elements. By default, ddof is 1.

        Returns
        -------
        TimeSeries
            The TimeSeries containing the standard deviation for each component.
        """
        self._assert_stochastic()
        new_data = self._xa.values.std(axis=2, ddof=ddof, keepdims=True)
        new_xa = xr.DataArray(
            new_data, dims=self._xa.dims, coords=self._xa.coords, attrs=self._xa.attrs
        )
        return self.__class__(new_xa)

        Return a deterministic ``TimeSeries`` containing the standard deviation of each component
        (over the samples) of this stochastic ``TimeSeries``.

        This works only on stochastic series (i.e., with more than 1 sample)

        Parameters
        ----------
        ddof
            "Delta Degrees of Freedom": the divisor used in the calculation is N - ddof where N represents the
            number of elements. By default, ddof is 1.

        Returns
        -------
        TimeSeries
            The TimeSeries containing the standard deviation for each component.
        
darts/timeseries.py