docstr: Return a subset of the current dataset
  
  :param num_elements: (int) the number of element you wish to have in the subset
  :param shuffle: (bool) Whether to shuffle or not the dataset
  :return: (Dataset) a new subset of the current Dataset object
docstr_tok: ["Return","a","subset","of","the","current","dataset",":","param","num_elements",":","(","int",")","the","number","of","element","you","wish","to","have","in","the","subset",":","param","shuffle",":","(","bool",")","Whether","to","shuffle","or","not","the","dataset",":","return",":","(","Dataset",")","a","new","subset","of","the","current","Dataset","object"]
code: def subset(self, num_elements, shuffle=True):
      """
      Return a subset of the current dataset
  
      :param num_elements: (int) the number of element you wish to have in the subset
      :param shuffle: (bool) Whether to shuffle or not the dataset
      :return: (Dataset) a new subset of the current Dataset object
      """
      data_map = dict()
      for key in self.data_map:
          data_map[key] = self.data_map[key][:num_elements]
      return Dataset(data_map, shuffle)
  
file_path: stable-baselines/stable_baselines/common/dataset.py
imports: import numpy
label_desc: Use image node_id 5 for calling the Dataset obj's underlying member method code with example usage: obj.subset(num_elements, shuffle) and returns: Dataset