(self, ix)
return X_sample, y_sample, timestamps_sample, asset_names
Get item.
Get item.
Get item .
def __getitem__(self, ix):
        """Get item."""
        X_sample = torch.from_numpy(self.X[ix])
        y_sample = torch.from_numpy(self.y[ix])
        timestamps_sample = self.timestamps[ix]
        asset_names = self.asset_names

        if self.transform:
            X_sample, y_sample, timestamps_sample, asset_names = self.transform(X_sample,
                                                                                y_sample,
                                                                                timestamps_sample,
                                                                                asset_names)

        return X_sample, y_sample, timestamps_sample, asset_names
def __getitem__ ( self , ix ) : X_sample = torch . from_numpy ( self . X [ ix ] ) y_sample = torch . from_numpy ( self . y [ ix ] ) timestamps_sample = self . timestamps [ ix ] asset_names = self . asset_names if self . transform : X_sample , y_sample , timestamps_sample , asset_names = self . transform ( X_sample , y_sample , timestamps_sample , asset_names ) return X_sample , y_sample , timestamps_sample , asset_names