Skip to main content

Shift Nth row N steps in NumPy / PyTorch / TensorFlow / JAX

Project description

Shift Nth Row N Steps

CI Status Documentation Status Test coverage percentage

uv Ruff pre-commit

PyPI Version Supported Python versions License


Documentation: https://shift-nth-row-n-steps.readthedocs.io

Source Code: https://github.com/34j/shift-nth-row-n-steps


Shift Nth row N steps in NumPy / PyTorch / TensorFlow / JAX

Installation

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

pip install shift-nth-row-n-steps

Usage

from shift_nth_row_n_steps import shift_nth_row_n_steps

a = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
shifted = shift_nth_row_n_steps(a)
print(shifted)
[[1 2 3]
 [0 4 5]
 [0 0 7]]

shift_nth_row_n_steps is array API compatible, which means it works with NumPy, PyTorch, JAX, and other libraries that implement the array API standard.

Benchmark

Benchmark

Algorithm

Algorithm

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.

Project details


Download files

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

Source Distribution

shift_nth_row_n_steps-1.0.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

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

shift_nth_row_n_steps-1.0.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file shift_nth_row_n_steps-1.0.0.tar.gz.

File metadata

  • Download URL: shift_nth_row_n_steps-1.0.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for shift_nth_row_n_steps-1.0.0.tar.gz
Algorithm Hash digest
SHA256 16f2a7ea004eefe66775e037ef1cda51ecee359b67349d7c9ff67b9832fbe62a
MD5 818608d624563327a9900377514e973e
BLAKE2b-256 42b0d0d8fc306b044408413a2a1e192c5d557f3352cc16bf4df8e7274528d64c

See more details on using hashes here.

Provenance

The following attestation bundles were made for shift_nth_row_n_steps-1.0.0.tar.gz:

Publisher: ci.yml on 34j/shift-nth-row-n-steps

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file shift_nth_row_n_steps-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for shift_nth_row_n_steps-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9db27ad13808ba11ab1df6b9037d36b87d9ccad657b7f98f6cc595484239f1f0
MD5 0fd1013d16b809ae53617c27b583af6d
BLAKE2b-256 f36fe529f70216bc4d6ecba9b679f485b67653153d61f32cfac2275dea0aee99

See more details on using hashes here.

Provenance

The following attestation bundles were made for shift_nth_row_n_steps-1.0.0-py3-none-any.whl:

Publisher: ci.yml on 34j/shift-nth-row-n-steps

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page