The file to read. File-like objects must support the
seek() and read() methods. Pickled files require that the
file-like object support the readline() method as well.

mmap_mode:{None, ‘r+’, ‘r’, ‘w+’, ‘c’}, optional

If not None, then memory-map the file, using the given mode (see
numpy.memmap for a detailed description of the modes). A
memory-mapped array is kept on disk. However, it can be accessed
and sliced like any ndarray. Memory mapping is especially useful
for accessing small fragments of large files without reading the
entire file into memory.

Only useful when loading Python 2 generated pickled files on Python 3,
which includes npy/npz files containing object arrays. If fix_imports
is True, pickle will try to map the old Python 2 names to the new names
used in Python 3.

encoding:str, optional

What encoding to use when reading Python 2 strings. Only useful when
loading Python 2 generated pickled files in Python 3, which includes
npy/npz files containing object arrays. Values other than ‘latin1’,
‘ASCII’, and ‘bytes’ are not allowed, as they can corrupt numerical
data. Default: ‘ASCII’

Returns:

result:array, tuple, dict, etc.

Data stored in the file. For .npz files, the returned instance
of NpzFile class must be closed to avoid leaking file descriptors.