code: def partial_transform(self, traj):
          
          if self.index is not None:
              return traj[:, self.index]
          else:
              return traj[:, :self.first]
docs: Slice a single input array along to select a subset of features.
  
          Parameters
          ----------
          traj : np.ndarray, shape=(n_samples, n_features)
              A sample to slice.
  
          Returns
          -------
          sliced_traj : np.ndarray shape=(n_samples, n_feature_subset)
              Slice of traj