parameters: (self, type_enum)
docstring: Creates a new `DataType`.
  
      NOTE(mrry): In normal circumstances, you should not need to
      construct a `DataType` object directly. Instead, use the
      `tf.as_dtype()` function.
  
      Args:
        type_enum: A `types_pb2.DataType` enum value.
  
      Raises:
        TypeError: If `type_enum` is not a value `types_pb2.DataType`.
docstring_summary: Creates a new `DataType`.
docstring_tokens: Creates a new DataType .
function: def __init__(self, type_enum):
      """Creates a new `DataType`.
  
      NOTE(mrry): In normal circumstances, you should not need to
      construct a `DataType` object directly. Instead, use the
      `tf.as_dtype()` function.
  
      Args:
        type_enum: A `types_pb2.DataType` enum value.
  
      Raises:
        TypeError: If `type_enum` is not a value `types_pb2.DataType`.
  
      """
      # TODO(mrry): Make the necessary changes (using __new__) to ensure
      # that calling this returns one of the interned values.
      type_enum = int(type_enum)
      if (type_enum not in types_pb2.DataType.values()
          or type_enum == types_pb2.DT_INVALID):
        raise TypeError(
            "type_enum is not a valid types_pb2.DataType: %s" % type_enum)
      self._type_enum = type_enum
function_tokens: def __init__ ( self , type_enum ) : # TODO(mrry): Make the necessary changes (using __new__) to ensure # that calling this returns one of the interned values. type_enum = int ( type_enum ) if ( type_enum not in types_pb2 . DataType . values ( ) or type_enum == types_pb2 . DT_INVALID ) : raise TypeError ( "type_enum is not a valid types_pb2.DataType: %s" % type_enum ) self . _type_enum = type_enum