parameters: (sequence)
return_statement: return indices, sequence, shape
docstring: r"""Creates a sparse representention of ``sequence``.
          Returns a tuple with (indices, values, shape)
docstring_summary: r"""Creates a sparse representention of ``sequence``.
          Returns a tuple with (indices, values, shape)
docstring_tokens: r Creates a sparse representention of sequence . Returns a tuple with ( indices values shape )
function: def to_sparse_tuple(sequence):
      r"""Creates a sparse representention of ``sequence``.
          Returns a tuple with (indices, values, shape)
      """
      indices = np.asarray(list(zip([0]*len(sequence), range(len(sequence)))), dtype=np.int64)
      shape = np.asarray([1, len(sequence)], dtype=np.int64)
      return indices, sequence, shape
function_tokens: def to_sparse_tuple ( sequence ) : indices = np . asarray ( list ( zip ( [ 0 ] * len ( sequence ) , range ( len ( sequence ) ) ) ) , dtype = np . int64 ) shape = np . asarray ( [ 1 , len ( sequence ) ] , dtype = np . int64 ) return indices , sequence , shape