Skip to main content

tdseries

Immutable pytree frames of tensors with named, indexed dimensions, where time is a first-class dimension stored in exact int64 ticks (nanoseconds).

Built for bundling media signals with co-recorded telemetry and the static geometry that shares their non-time dimensions — e.g. multichannel audio (mic, time) together with microphone positions (mic, 3), rotor speeds (rotor, time) together with rotor positions (rotor, 3):

import tdseries as td

frame = td.Frame({
    "audio":     td.uniform(audio_8xT, sr=44100, dims=("mic", "time")),
    "mic_pos":   td.wrap(pos_8x3, dims=("mic", None)),
    "rps":       td.events(stamps, rps_4xM, dims=("rotor", "time")),
    "rotor_pos": td.wrap(rpos_4x3, dims=("rotor", None)),
    "vad":       td.spans(starts, ends),
    "recording_id": "FLY124",
})

sub  = frame.slice["mic", 0]     # audio -> (T,), mic_pos -> (3,): same mic
clip = frame.time[1.0:4.5]       # seconds; all temporal leaves cut exactly
raw  = frame.ticks[a:b]          # exact int64 tick window
rps  = frame["rps"]              # self-contained absolute-time Series

The model

A dimension is a name plus a domain; every tensor axis carrying the name has an index mapping positions into that domain. Slices are expressed in domain coordinates and translated per-tensor — which is how tensors of different lengths share one dimension:

Index Domain Example
RangeIndex (default) positions mic, rotor
LabelIndex hashable labels mic serial numbers
GridIndex int64 ticks, uniform grid + sub-sample phase audio
StampIndex int64 ticks, sorted point events RPS, IMU
SpanIndex int64 ticks, half-open intervals with identity tags VAD

Time is exact: all anchors and cut points are int64 tick counts, shift is O(1), and the algebra satisfies, at the sample level and without tolerances,

x.ticks[a:b].concat(x.ticks[b:c]) == x.ticks[a:c]

for any tick cut points — including sub-sample cuts through audio and cuts through the middle of a VAD span (split spans re-merge via identity tags).

Everything is immutable. Extracting an entry from a frame hands back a self-contained series re-anchored to absolute time; the frame is untouched.

See DESIGN.md for the full contract.

Development

nix develop        # or: uv sync
uv run pytest

nix develop provides Python + uv and pre-commit hooks (ruff, ruff-format, pyright). Data leaves may be any Array-API array — numpy, torch, JAX, CuPy, … — dispatched through array-api-compat; torch stays optional (uv sync --extra torch). The time/dimension index layer is numpy-int64 regardless of the payload backend.

Lineage

Extracted from the utils.data module of the harmonic-noise-suppression research project; the tick/phase arithmetic and the slice/concat/shift invariants are ported from there, the named-dimension frame model is new.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tdseries-0.2.0.tar.gz (94.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tdseries-0.2.0-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file tdseries-0.2.0.tar.gz.

File metadata

  • Download URL: tdseries-0.2.0.tar.gz
  • Upload date:
  • Size: 94.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tdseries-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1d4be0790eb52dfc6cb2daa0eb61b1d88bd7815a79603aa81609a04117d72f3c
MD5 b4bd60c112f0b8be3573cf8accce22bf
BLAKE2b-256 09b2b9b1a0d1bcf69628772c12f6df5a9457c5d196cb3f6aa0b27984f488d241

See more details on using hashes here.

File details

Details for the file tdseries-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: tdseries-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 25.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tdseries-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3d5b2c54414161478ebd7102683ee51e98df3459b9712743f40b4c6e5e8a266
MD5 67583dbf01ba5527bfe8a17d51dc20d6
BLAKE2b-256 9decd585c0ca45274e5e4ead6f5f3b30e7217e2ef0a7627d023752dfe37e964b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.1

2 files

This release

0.2.0 This release

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page