Registry / ai-ml / batchtensor

batchtensor

JSON →
library0.1.1pypypiunverified

A Python library providing utility functions to manipulate batches of PyTorch tensors, such as concatenation, indexing, and nested data operations. Current version 0.1.1 supports Python 3.10-3.14 and PyTorch. The library follows a semantic versioning release cadence with regular updates.

pip install batchtensor
INSTALL
IMPORT
SIG · BATCHTENSOR
B
batchtensor
ai-mlpythonv0.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

cat_along_batch
from batchtensor import cat_along_batch
from batchtensor import cat_along_batch

Basic usage: concatenate a list of tensors along the batch dimension.

import torch from batchtensor import cat_along_batch tensor1 = torch.randn(2, 3) tensor2 = torch.randn(3, 3) result = cat_along_batch([tensor1, tensor2]) print(result.shape) # torch.Size([5, 3])
Debug
Known issues
breakingVersion 0.0.4 introduced breaking changes (see release notes). Functions may have been renamed or arguments changed.
fix
Upgrade and update function calls per changelog.
affects: <0.0.4
gotchabatchtensor uses nested functions (e.g., nested_apply, nested_map) that expect nested structures of tensors. Passing plain tensors may raise unexpected errors.
fix
Ensure input is a dict or list of tensors, not a single tensor.
affects: all
deprecatedSome functions may be deprecated in future releases. Check the release notes before upgrading.
fix
Review deprecation warnings and migrate to recommended alternatives.
affects: >=0.1.0
Upgrade
Version history
0.1.1latest on PyPI · released Nov 2, 2025
Audit
Dependencies
torchrequiredCore dependency: batchtensor operates on PyTorch tensors
Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
batchtensor — pip install batchtensor · libregistry