dpnp.dpnp_array.dpnp_array.tofile
method
- dpnp_array.tofile(fid, sep='', format='')[source]
Writes the array to a file as text or binary (default).
For full documentation refer to
numpy.ndarray.tofile.- Parameters:
fid ({file. str, path}) -- An open file object, or a string containing a filename.
sep (str, optional) --
Separator between array items for text output. If
""(empty), a binary file is written.Default:
"".format (str, optional) --
Format string for text file output (when non-empty sep is passed). Each entry in the array is formatted to text by first converting it to the closest Python type, and then using
format % item. If""(empty), no formatting is used while converting to the string.Default:
"".
See also
dpnp.fromfileConstruct an array from data in a text or binary file.