def save(f, arr, vocab):
itr = iter(vocab)<EOL>word, idx = next(itr)<EOL>_write_line(f, arr[idx], word)<EOL>for word, idx in itr:<EOL><INDENT>f.write(b'<STR_LIT:\n>')<EOL>_write_line(f, arr[idx], word)<EOL><DEDENT>
Save word embedding file.

Args:
    f (File): File to write the vectors. File should be open for writing
        ascii.
    arr (numpy.array): Numpy array with ``float`` dtype.
    vocab (iterable): Each element is pair of a word (``bytes``) and ``arr``
        index (``int``). Word should be encoded to str apriori.