Skip to main content

Axis Batch

CI Status Documentation Status Test coverage percentage

uv Ruff pre-commit

PyPI Version Supported Python versions License


Documentation: https://axis-batch.readthedocs.io

Source Code: https://github.com/34j/axis-batch


Divide an array into batches along specific axes in NumPy / PyTorch / JAX

Installation

Install this via pip (or your favourite package manager):

pip install axis-batch

Usage

import numpy as np

from axis_batch import AxisBatch

a = np.arange(12).reshape(3, 4)
b = AxisBatch(a, axis=0, size=2)
for i, x in enumerate(b):
    print(f"{i}: {x}")
    b.send(x + 1)
print(b.value)
0: [[0 1 2 3]
 [4 5 6 7]]
1: [[ 8  9 10 11]]
[[ 1  2  3  4]
 [ 5  6  7  8]
 [ 9 10 11 12]]

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits

Copier

This package was created with Copier and the browniebroke/pypackage-template project template.

Metadata

Release files for axis-batch 0.1.1

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

Source distribution (sdist)

Source distribution for axis-batch 0.1.1
File Size Uploaded
axis_batch-0.1.1.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for axis-batch 0.1.1
File Interpreter ABI Platform
axis_batch-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / axis_batch-0.1.1.tar.gz

Download URL axis_batch-0.1.1.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f3eac0b64bf98f2b1aa8fd3a7f9c6606255766f4f1a6642449e0e3b9cbbd5480
BLAKE2b-256 checksum
How to use checksums
8dcbedbc2d1c882e7712a0c2fc3e0a237d3694fc9d21d543b0bfeb7f00672362
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 9, 2025.

Transparency log

Release files / axis_batch-0.1.1-py3-none-any.whl

Download URL axis_batch-0.1.1-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9c6794f9a53ab02cf989ea9ff94e6bf7b667cc11dc8a6e5e381d8c95be3aae6
BLAKE2b-256 checksum
How to use checksums
08e4bd9777eed5fe502c8915ce1e37cf442b3d32271aec0e88ec6fe521963e33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 9, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.0

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