pynapple.io.interface_npz.NPZFile#

class pynapple.io.interface_npz.NPZFile(path)[source]#

Bases: object

Class to read/write NPZ files as a pynapple object. Objects have a save function in npz format as well as the Folder class.

Examples

>>> import pynapple as nap
>>> tsd = nap.load_file("path/to/my_tsd.npz")
>>> tsd
Time (s)
0.0    0
0.1    1
0.2    2
dtype: int64
__init__(path)[source]#

Initialization of the NPZ file

Parameters:

path (str) – Valid path to a NPZ file

Methods

__init__(path)

Initialization of the NPZ file

load()

Load the NPZ file

load()[source]#

Load the NPZ file

Returns:

A pynapple object

Return type:

(Tsd, Ts, TsdFrame, TsdTensor, TsGroup, IntervalSet)