pyvista_zstd.read

Contents

pyvista_zstd.read#

pyvista_zstd.read(filename: Path | str, n_threads: int | None = None) DataSet#

Decompress a pyvista-zstd file.

This is a convenience function that uses Reader. Use that class to finely tune reading in a file.

Parameters:
filenamepathlib.Path | str

Path to the file.

n_threadsNone | int, optional

Number of threads to use. If omitted, the best number of threads to decompress the file will be used.

Returns:
pyvista.DataSet
Raises:
pyvista.LocalFileRequiredError

If filename is a remote URI. When called via pyvista.read(), this triggers an automatic download and retry with a local path.

Examples

>>> import pyvista_zstd
>>> ds = pyvista_zstd.read("dataset.pv")