class_docstr: Generate fake data of given shapes
class_docstr_tok: ["Generate","fake","data","of","given","shapes"]
docstr: Args:
      shapes (list): a list of lists/tuples. Shapes of each component.
      size (int): size of this DataFlow.
      random (bool): whether to randomly generate data every iteration.
          Note that merely generating the data could sometimes be time-consuming!
      dtype (str or list): data type as string, or a list of data types.
      domain (tuple or list): (min, max) tuple, or a list of such tuples
docstr_tok: ["Args",":","shapes","(","list",")",":","a","list","of","lists\/tuples",".","Shapes","of","each","component",".","size","(","int",")",":","size","of","this","DataFlow",".","random","(","bool",")",":","whether","to","randomly","generate","data","every","iteration",".","Note","that","merely","generating","the","data","could","sometimes","be","time-consuming","!","dtype","(","str","or","list",")",":","data","type","as","string",",","or","a","list","of","data","types",".","domain","(","tuple","or","list",")",":","(","min",",","max",")","tuple",",","or","a","list","of","such","tuples"]
code: def __init__(
      self,
      shapes,
      size=1000,
      random=True,
      dtype="float32",
      domain=(0, 1),
  ):
      """
      Args:
          shapes (list): a list of lists/tuples. Shapes of each component.
          size (int): size of this DataFlow.
          random (bool): whether to randomly generate data every iteration.
              Note that merely generating the data could sometimes be time-consuming!
          dtype (str or list): data type as string, or a list of data types.
          domain (tuple or list): (min, max) tuple, or a list of such tuples
      """
      super(FakeData, self).__init__()
      self.shapes = shapes
      self._size = int(size)
      self.random = random
      self.dtype = (
          [dtype] * len(shapes)
          if isinstance(dtype, six.string_types)
          else dtype
      )
      self.domain = (
          [domain] * len(shapes)
          if isinstance(domain, tuple)
          else domain
      )
      assert len(self.dtype) == len(self.shapes)
      assert len(self.domain) == len(self.domain)
  
imports: import copy
  import numpy
  import six
  from .base import DataFlow, RNGDataFlow
label_desc: Use image node_id 1 to create a new FakeData object from inherited base classes: RNGDataFlow with example: obj = FakeData(shapes, size, random, dtype, domain)