io
- class laddu.io.ParquetBatchWriter
Streaming writer for appending compatible Dataset batches to one Parquet file.
- close()
Finalize the Parquet file.
- write(dataset)
Append one Dataset batch.
- laddu.io.from_arrow(data: pa.Table, *, p4s: list[str] | None = None, aux: list[str] | None = None, aliases: _Mapping[str, str | _Sequence[str]] | None = None) Dataset
- laddu.io.from_columns(data: Mapping[str, Sequence[float] | ndarray[tuple[Any, ...], dtype[float32]] | ndarray[tuple[Any, ...], dtype[float64]]], *, p4s: list[str] | None = None, aux: list[str] | None = None, aliases: Mapping[str, str | Sequence[str]] | None = None) Dataset
- laddu.io.from_dict(data: Mapping[str, Sequence[float] | ndarray[tuple[Any, ...], dtype[float32]] | ndarray[tuple[Any, ...], dtype[float64]]], *, p4s: list[str] | None = None, aux: list[str] | None = None, aliases: Mapping[str, str | Sequence[str]] | None = None) Dataset
- laddu.io.from_numpy(data: Mapping[str, ndarray[tuple[Any, ...], dtype[float32]] | ndarray[tuple[Any, ...], dtype[float64]]], *, p4s: list[str] | None = None, aux: list[str] | None = None, aliases: Mapping[str, str | Sequence[str]] | None = None) Dataset
- laddu.io.from_pandas(data: object, *, p4s: list[str] | None = None, aux: list[str] | None = None, aliases: Mapping[str, str | Sequence[str]] | None = None) Dataset
- laddu.io.from_polars(data: object, *, p4s: list[str] | None = None, aux: list[str] | None = None, aliases: Mapping[str, str | Sequence[str]] | None = None) Dataset
- laddu.io.open_parquet_writer(path: str | Path, *, chunk_size: int = 10000, precision: Literal['f64', 'f32'] = 'f64') ParquetBatchWriter
- laddu.io.read_amptools(path: str | Path, *, tree: str | None = None, pol_in_beam: bool = False, pol_angle: float | None = None, pol_magnitude: float | None = None, pol_magnitude_name: str = 'pol_magnitude', pol_angle_name: str = 'pol_angle', num_entries: int | None = None) Dataset
- laddu.io.read_amptools_chunked(path: str | Path, *, tree: str | None = None, pol_in_beam: bool = False, pol_angle: float | None = None, pol_magnitude: float | None = None, pol_magnitude_name: str = 'pol_magnitude', pol_angle_name: str = 'pol_angle', num_entries: int | None = None, chunk_size: int = 10000) Iterator[Dataset]
- laddu.io.read_parquet(path: str | Path, *, p4s: list[str] | None = None, aux: list[str] | None = None, aliases: Mapping[str, str | Sequence[str]] | None = None) Dataset
- laddu.io.read_parquet_chunked(path: str | Path, *, p4s: list[str] | None = None, aux: list[str] | None = None, aliases: Mapping[str, str | Sequence[str]] | None = None, chunk_size: int = 10000) Iterator[Dataset]
- laddu.io.read_root(path: str | Path, *, tree: str | None = None, p4s: list[str] | None = None, aux: list[str] | None = None, aliases: Mapping[str, str | Sequence[str]] | None = None, backend: Literal['oxyroot', 'uproot'] = 'oxyroot', uproot_kwargs: dict[str, str | int | float | bool | Sequence[str] | None] | None = None) Dataset
- laddu.io.read_root_chunked(path: str | Path, *, tree: str | None = None, p4s: list[str] | None = None, aux: list[str] | None = None, aliases: Mapping[str, str | Sequence[str]] | None = None, backend: Literal['oxyroot', 'uproot'] = 'oxyroot', uproot_kwargs: dict[str, str | int | float | bool | Sequence[str] | None] | None = None, chunk_size: int = 10000) Iterator[Dataset]
- laddu.io.to_numpy(dataset: Dataset, *, precision: Literal['f64', 'f32'] = 'f64') dict[str, ndarray]