class_docstr: Repeat elements of an array.
class_docstr_tok: ["Repeat","elements","of","an","array","."]
code: def __init__(self, repeats, axis=None):
      if isinstance(repeats, six.integer_types):
          self.repeats = (repeats,)
      elif isinstance(repeats, tuple) and all(
          isinstance(x, six.integer_types) for x in repeats
      ):
          # Although it is not explicitly documented, NumPy/CuPy allows
          # specifying bool or tuple of bools as `repeats`.
          # Thus we just check type against `six.integer_types`, without
          # excluding `bool`.
          self.repeats = repeats
      else:
          raise TypeError("repeats must be int or tuple of ints")
  
      if not all(x >= 0 for x in self.repeats):
          raise ValueError(
              "all elements in repeats must be zero or larger"
          )
  
      if axis is not None and (
          not isinstance(axis, six.integer_types)
          or isinstance(axis, bool)
      ):
          # `axis` cannot be bool, in contrast to `repeats`.
          raise TypeError("axis must be int or None")
      self.axis = axis
  
file_path: chainer/chainer/functions/array/repeat.py
imports: import six
  from chainer import backend
  from chainer import function_node
  from chainer import utils
  from chainer.utils import type_check
label_desc: Use image node_id 1 to create a new Repeat object from inherited base classes: function_node with example: obj = Repeat(repeats, axis)