parameters: (self, dtype, size=None, dynamic_size=None,
                 clear_after_read=None, tensor_array_name=None, handle=None,
                 flow=None, infer_shape=True, name=None)
docstring: Construct a new TensorArray or wrap an existing TensorArray handle.
  
      A note about the parameter `name`:
  
      The name of the `TensorArray` (even if passed in) is uniquified: each time
      a new `TensorArray` is created at runtime it is assigned its own name for
      the duration of the run.  This avoids name collissions if a `TensorArray`
      is created within a `while_loop`.
  
      Args:
        dtype: (required) data type of the TensorArray.
        size: (optional) int32 scalar `Tensor`: the size of the TensorArray.
          Required if handle is not provided.
        dynamic_size: (optional) Python bool: If true, writes to the TensorArray
          can grow the TensorArray past its initial size.  Default: False.
        clear_after_read: Boolean (optional, default: True).  If True, clear
          TensorArray values after reading them.  This disables read-many
          semantics, but allows early release of memory.
        tensor_array_name: (optional) Python string: the name of the TensorArray.
          This is used when creating the TensorArray handle.  If this value is
          set, handle should be None.
        handle: (optional) A `Tensor` handle to an existing TensorArray.  If this
          is set, tensor_array_name should be None.
        flow: (optional) A float `Tensor` scalar coming from an existing
          `TensorArray.flow`.
        infer_shape: (optional, default: True) If True, shape inference
          is enabled.  In this case, all elements must have the same shape.
        name: A name for the operation (optional).
  
      Raises:
        ValueError: if both handle and tensor_array_name are provided.
        TypeError: if handle is provided but is not a Tensor.
docstring_summary: Construct a new TensorArray or wrap an existing TensorArray handle.
docstring_tokens: Construct a new TensorArray or wrap an existing TensorArray handle .
function: def __init__(self, dtype, size=None, dynamic_size=None,
                 clear_after_read=None, tensor_array_name=None, handle=None,
                 flow=None, infer_shape=True, name=None):
      """Construct a new TensorArray or wrap an existing TensorArray handle.
  
      A note about the parameter `name`:
  
      The name of the `TensorArray` (even if passed in) is uniquified: each time
      a new `TensorArray` is created at runtime it is assigned its own name for
      the duration of the run.  This avoids name collissions if a `TensorArray`
      is created within a `while_loop`.
  
      Args:
        dtype: (required) data type of the TensorArray.
        size: (optional) int32 scalar `Tensor`: the size of the TensorArray.
          Required if handle is not provided.
        dynamic_size: (optional) Python bool: If true, writes to the TensorArray
          can grow the TensorArray past its initial size.  Default: False.
        clear_after_read: Boolean (optional, default: True).  If True, clear
          TensorArray values after reading them.  This disables read-many
          semantics, but allows early release of memory.
        tensor_array_name: (optional) Python string: the name of the TensorArray.
          This is used when creating the TensorArray handle.  If this value is
          set, handle should be None.
        handle: (optional) A `Tensor` handle to an existing TensorArray.  If this
          is set, tensor_array_name should be None.
        flow: (optional) A float `Tensor` scalar coming from an existing
          `TensorArray.flow`.
        infer_shape: (optional, default: True) If True, shape inference
          is enabled.  In this case, all elements must have the same shape.
        name: A name for the operation (optional).
  
      Raises:
        ValueError: if both handle and tensor_array_name are provided.
        TypeError: if handle is provided but is not a Tensor.
      """
      if handle is not None and tensor_array_name:
        raise ValueError(
            "Cannot construct with both handle and tensor_array_name")
      if handle is not None and not isinstance(handle, ops.Tensor):
        raise TypeError("Handle must be a Tensor")
      if handle is None and size is None:
        raise ValueError("Size must be provided if handle is not provided")
      if handle is not None and size is not None:
        raise ValueError("Cannot provide both a handle and size "
                         "at the same time")
      if handle is not None and dynamic_size is not None:
        raise ValueError("Cannot provide both a handle and dynamic_size "
                         "at the same time")
      if handle is not None and clear_after_read is not None:
        raise ValueError("Cannot provide both a handle and clear_after_read "
                         "at the same time")
  
      if clear_after_read is None:
        clear_after_read = True
      dynamic_size = dynamic_size or False
  
      self._dtype = dtype
      self._infer_shape = infer_shape
      # Record the current static shape for the array elements. The first
      # write adds the shape of the tensor it writes, and all subsequent
      # writes checks for shape equality.
      self._elem_shape = []
      with ops.op_scope([handle, size, flow], name, "TensorArray") as scope:
        if handle is not None:
          self._handle = handle
        else:
          if flow is not None:
            with ops.colocate_with(flow):
              self._handle = gen_data_flow_ops._tensor_array(
                  dtype=dtype, size=size, dynamic_size=dynamic_size,
                  clear_after_read=clear_after_read,
                  tensor_array_name=tensor_array_name, name=scope)
          else:
            self._handle = gen_data_flow_ops._tensor_array(
                dtype=dtype, size=size, dynamic_size=dynamic_size,
                clear_after_read=clear_after_read,
                tensor_array_name=tensor_array_name, name=scope)
        if flow is not None:
          self._flow = flow
        else:
          with ops.colocate_with(self._handle):
            self._flow = constant_op.constant(0, dtype=_dtypes.float32)
function_tokens: def __init__ ( self , dtype , size = None , dynamic_size = None , clear_after_read = None , tensor_array_name = None , handle = None , flow = None , infer_shape = True , name = None ) : if handle is not None and tensor_array_name : raise ValueError ( "Cannot construct with both handle and tensor_array_name" ) if handle is not None and not isinstance ( handle , ops . Tensor ) : raise TypeError ( "Handle must be a Tensor" ) if handle is None and size is None : raise ValueError ( "Size must be provided if handle is not provided" ) if handle is not None and size is not None : raise ValueError ( "Cannot provide both a handle and size " "at the same time" ) if handle is not None and dynamic_size is not None : raise ValueError ( "Cannot provide both a handle and dynamic_size " "at the same time" ) if handle is not None and clear_after_read is not None : raise ValueError ( "Cannot provide both a handle and clear_after_read " "at the same time" ) if clear_after_read is None : clear_after_read = True dynamic_size = dynamic_size or False self . _dtype = dtype self . _infer_shape = infer_shape # Record the current static shape for the array elements. The first # write adds the shape of the tensor it writes, and all subsequent # writes checks for shape equality. self . _elem_shape = [ ] with ops . op_scope ( [ handle , size , flow ] , name , "TensorArray" ) as scope : if handle is not None : self . _handle = handle else : if flow is not None : with ops . colocate_with ( flow ) : self . _handle = gen_data_flow_ops . _tensor_array ( dtype = dtype , size = size , dynamic_size = dynamic_size , clear_after_read = clear_after_read , tensor_array_name = tensor_array_name , name = scope ) else : self . _handle = gen_data_flow_ops . _tensor_array ( dtype = dtype , size = size , dynamic_size = dynamic_size , clear_after_read = clear_after_read , tensor_array_name = tensor_array_name , name = scope ) if flow is not None : self . _flow = flow else : with ops . colocate_with ( self . _handle ) : self . _flow = constant_op . constant ( 0 , dtype = _dtypes . float32 )