def _save_embedding_tsv(data, file_path):
if isinstance(data, np.ndarray):<EOL><INDENT>data_list = data.tolist()<EOL><DEDENT>elif isinstance(data, NDArray):<EOL><INDENT>data_list = data.asnumpy().tolist()<EOL><DEDENT>else:<EOL><INDENT>raise TypeError('<STR_LIT>'.format(<EOL>str(type(data))))<EOL><DEDENT>with open(os.path.join(file_path, '<STR_LIT>'), '<STR_LIT:w>') as f:<EOL><INDENT>for x in data_list:<EOL><INDENT>x = [str(i) for i in x]<EOL>f.write('<STR_LIT:\t>'.join(x) + '<STR_LIT:\n>')<EOL><DEDENT><DEDENT>
Given a 2D `NDarray` or a `numpy.ndarray` as embeding,
    save it in tensors.tsv under the path provided by the user.