Skip to main content

xtensor

xtensor provides a DataTensor class that wraps a torch.Tensor with labels and coordinates inspired by xarray.DataArray. The goal is to enjoy lightweight labeled computations without leaving eager PyTorch workflows.

Features

  • Construction from torch / numpy data with dimension names and coordinates.
  • Factory helpers from pandas objects or existing xarray.DataArray.
  • Label (sel) and positional (isel) slicing.
  • Mean, standard deviation, sum, min, max style reductions.
  • Elementwise math with scalars or other DataTensor objects that share the same coordinates.
  • Device-agnostic .to() mirror of torch.Tensor.to.

Development

Install dependencies in editable mode.

pip install -e ".[dev]"

Run the tests.

pytest

Metadata

Release files for xtensor-datatensor 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xtensor-datatensor 0.1.0
File Size Uploaded
xtensor_datatensor-0.1.0.tar.gz 34.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xtensor-datatensor 0.1.0
File Interpreter ABI Platform
xtensor_datatensor-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 62.1 kB

Release files / xtensor_datatensor-0.1.0.tar.gz

Download URL xtensor_datatensor-0.1.0.tar.gz
Size 34.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d8f52367cefdf77ed1872163881806db06de1cf13c6ed4f257815352d591d704
BLAKE2b-256 checksum
How to use checksums
89129f12b8379fcfce9db86dd74fbe92db668da03fd557c3d356d957e9fa5fd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / xtensor_datatensor-0.1.0-py3-none-any.whl

Download URL xtensor_datatensor-0.1.0-py3-none-any.whl
Size 28.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd5da026c99239f811fa2ce103ea1f5c3fa3db1b6be821dc85d2c2360baf6c2d
BLAKE2b-256 checksum
How to use checksums
1c0822dc92fcd9904159ff1966abec69df471a9ce7ea18a9ee5232d1256a36c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release 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