def add_sample_timestamps(self, d: np.ndarray, timestamp: float, fs: float):
    'add per-sample timestamp information to the data matrix\n\n        Args:\n            d (np.ndarray): (t,d) the data matrix to attach time stamps to\n            timestamp (float): the timestamp of the last sample of d\n            fs (float): the nomional sample rate of d\n\n        Returns:\n            np.ndarray: (t,d+1) data matrix with attached time-stamp channel\n        '
    if ((self.sample2timestamp is not None) and (not isinstance(self.sample2timestamp, str))):
        sample_ts = self.sample2timestamp.transform(timestamp, len(d))
    else:
        sample_ts = (np.ones((len(d),), dtype=int) * timestamp)
    d = np.append(np.array(d), sample_ts[:, np.newaxis], (- 1)).astype(d.dtype)
    return d
add per-sample timestamp information to the data matrix

Args:
    d (np.ndarray): (t,d) the data matrix to attach time stamps to
    timestamp (float): the timestamp of the last sample of d
    fs (float): the nomional sample rate of d

Returns:
    np.ndarray: (t,d+1) data matrix with attached time-stamp channel
def add_sample_timestamps(self, d: np.ndarray, timestamp: float, fs: float):
    'add per-sample timestamp information to the data matrix\n\n        Args:\n            d (np.ndarray): (t,d) the data matrix to attach time stamps to\n            timestamp (float): the timestamp of the last sample of d\n            fs (float): the nomional sample rate of d\n\n        Returns:\n            np.ndarray: (t,d+1) data matrix with attached time-stamp channel\n        '
    if ((self.sample2timestamp is not None) and (not isinstance(self.sample2timestamp, str))):
        sample_ts = self.sample2timestamp.transform(timestamp, len(d))
    else:
        sample_ts = (np.ones((len(d),), dtype=int) * timestamp)
    d = np.append(np.array(d), sample_ts[:, np.newaxis], (- 1)).astype(d.dtype)
    return d