`` archive
savetxt, load

Notes
-----
For a description of the ``.npy`` format, see :py:mod:`numpy.lib.format`.

Any data saved to the file is appended to the end of the file.

Examples
--------
>>> import numpy as np

>>> from tempfile import TemporaryFile
>>> outfile = TemporaryFile()

>>> x = np.arange(10)
>>> np.save(outfile, x)

>>> _ = outfile.seek(0) # Only needed to simulate closing & reopening file
>>> np.load(outfile)
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])


>>> with open('test.npy', 'wb') as f:
...     np.save(f, np.array([1, 2]))
...     np.save(f, np.array([1, 3]))
>>> with open('test.npy', 'rb') as f:
...     a = np.load(f)
...     b = np.load(f)
>>> print(a, b)
# [1 2] [1 3]
zQThe 'fix_imports' flag is deprecated and has no effect. (Deprecated in NumPy 2.1)