"""Type stubs for wayy_db._core C++ extension module.""" from typing import Optional, Sequence import numpy as np import numpy.typing as npt __version__: str class DType: Int64: DType Float64: DType Timestamp: DType Symbol: DType Bool: DType class WayyException(Exception): ... class ColumnNotFound(WayyException): ... class TypeMismatch(WayyException): ... class InvalidOperation(WayyException): ... class Column: @property def name(self) -> str: ... @property def dtype(self) -> DType: ... @property def size(self) -> int: ... def __len__(self) -> int: ... def to_numpy(self) -> npt.NDArray: ... class Table: def __init__(self, name: str = "") -> None: ... @property def name(self) -> str: ... @property def num_rows(self) -> int: ... @property def num_columns(self) -> int: ... @property def sorted_by(self) -> Optional[str]: ... def __len__(self) -> int: ... def has_column(self, name: str) -> bool: ... def column(self, name: str) -> Column: ... def __getitem__(self, name: str) -> Column: ... def column_names(self) -> list[str]: ... def set_sorted_by(self, col: str) -> None: ... def save(self, path: str) -> None: ... @staticmethod def load(path: str) -> Table: ... @staticmethod def mmap(path: str) -> Table: ... def add_column_from_numpy( self, name: str, array: npt.NDArray, dtype: DType ) -> None: ... def to_dict(self) -> dict[str, npt.NDArray]: ... class Database: def __init__(self, path: str = "") -> None: ... @property def path(self) -> str: ... @property def is_persistent(self) -> bool: ... def tables(self) -> list[str]: ... def has_table(self, name: str) -> bool: ... def table(self, name: str) -> Table: ... def __getitem__(self, name: str) -> Table: ... def create_table(self, name: str) -> Table: ... def drop_table(self, name: str) -> None: ... def save(self) -> None: ... def refresh(self) -> None: ... class ops: @staticmethod def sum(col: Column) -> float: ... @staticmethod def avg(col: Column) -> float: ... @staticmethod def min(col: Column) -> float: ... @staticmethod def max(col: Column) -> float: ... @staticmethod def std(col: Column) -> float: ... @staticmethod def aj( left: Table, right: Table, on: Sequence[str], as_of: str ) -> Table: ... @staticmethod def wj( left: Table, right: Table, on: Sequence[str], as_of: str, window_before: int, window_after: int, ) -> Table: ... @staticmethod def mavg(col: Column, window: int) -> npt.NDArray[np.float64]: ... @staticmethod def msum(col: Column, window: int) -> npt.NDArray[np.float64]: ... @staticmethod def mstd(col: Column, window: int) -> npt.NDArray[np.float64]: ... @staticmethod def mmin(col: Column, window: int) -> npt.NDArray[np.float64]: ... @staticmethod def mmax(col: Column, window: int) -> npt.NDArray[np.float64]: ... @staticmethod def ema(col: Column, alpha: float) -> npt.NDArray[np.float64]: ... @staticmethod def diff(col: Column, periods: int = 1) -> npt.NDArray[np.float64]: ... @staticmethod def pct_change(col: Column, periods: int = 1) -> npt.NDArray[np.float64]: ... @staticmethod def shift(col: Column, n: int) -> npt.NDArray[np.float64]: ...