Skip to content

Capability index

Every public name in mypackage (30 of them), each listed once at its public home and grouped by the module that defines it, with the first sentence of its docstring. Search this page before writing a helper: if what you need is here, compose it; if it is almost here, extend it where it lives. Regenerate with uv run poe capabilities after changing a public API (tests/test_capabilities.py checks it is current).

mypackage

Shared type aliases and structural protocols. (mypackage._typing)

Name Kind What it does
Fittable class Structural protocol for transforms that learn state from data.
Series type alias Alias of collections.abc.Sequence[float].
Transform class Structural protocol for anything that maps a series to a new series.

Exception hierarchy for mypackage. (mypackage.exceptions)

Name Kind What it does
EmptySeriesError class Raised when an operation requires at least one observation.
MypackageError class Base class for every exception raised by mypackage.
NotFittedError class Raised when a stateful transform is used before it has been fitted.
ValidationError class Raised when an argument fails validation.

Smoothing filters for one-dimensional series. (mypackage.smoothing)

Name Kind What it does
Padding class How a finite-support filter extends a series past its boundaries.
exponential_moving_average function Smooth series with a causal exponentially weighted moving average.
median_filter function Smooth series with a centred running median.
moving_average function Smooth series with a centred, equally weighted moving average.

Descriptive statistics for one-dimensional series. (mypackage.stats)

Name Kind What it does
RunningStats class Streaming mean and variance via Welford's online algorithm.
Summary class An immutable snapshot of a series' descriptive statistics.
quantile function Return the q-th quantile using linear interpolation.
summarize function Compute descriptive statistics for series in a single pass.
zscores function Standardise series to zero mean and unit variance.

Composable series transforms with a fit / apply lifecycle. (mypackage.transforms)

Name Kind What it does
Clip class Clamp every value into [lower, upper].
MinMaxScale class Linearly rescale a series into feature_range.
MovingAverage class Transform adapter around moving_average.
Pipeline class Apply a sequence of transforms left to right.
Standardize class Centre a series on zero and scale it to unit standard deviation.
chain function Build a Pipeline from positional transforms.

Small, dependency-free helpers shared across the package. (mypackage.utils)

Name Kind What it does
Elapsed class Wall-clock duration recorded by timer.
Window class A fixed-capacity sliding window over a stream of values.
as_floats function Coerce a sequence of numbers to a fresh list[float].
require_non_empty function Coerce series to floats and require at least one element.
require_positive function Require value to be a strictly positive integer.
timer function Measure the wall-clock time spent inside a with block.

mypackage.cli

Name Kind What it does
build_parser function Build the top-level argument parser.
main function Run the command-line interface.