torchsig.utils.file_handlers.npy.NPYReader

class torchsig.utils.file_handlers.npy.NPYReader(root: str)[source]

Bases: FileReader

“Handles reading externally stored data into TorchSig as datasets, with data formatted in standard NumPy binary .npy files and metadata in a JSON format.

Methods

read

Read and return the sample at global index idx.

__init__(root: str)[source]

File reader base class

Parameters:

root (str) – Dataset location on disk.

__repr__() str

Return repr(self).

__str__() str

Return str(self).

read(idx: int) tuple[ndarray, list[dict]][source]

Read and return the sample at global index idx.