Skip to main content

mrange

Install via conda install numba pip install mrange

Import via from mrange import mrange

Description

mrange is used to remove nested range loops

Input:

n_s = (n_1, n_2, ..., n_m) Tuple of integers (or array when using mrange_array)

Output:

Generator outputting len(n_s) values with every call, generating every combination of values in the intervals [0,1,...,n_s[i]-1]

Use:

for a, b, ..., m in mrange((n_a, n_b, ..., n_m)):
    ...
Replaces:
for a in range(n_a):
    for b in range(n_b):
       ...
           for m in range(n_m):
               ...

Authors:

By Michael Schilling, with the help of Francesco Preti

Metadata

Release files for mrange 1.2

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

Source distribution (sdist)

Source distribution for mrange 1.2
File Size Uploaded Provenance
mrange-1.2.tar.gz 3.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mrange 1.2
File Interpreter ABI Platform
mrange-1.2-py3-none-any.whl Python 3 none any Details

Total release size: 6.3 kB

Release files / mrange-1.2.tar.gz

Download URL mrange-1.2.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2f69e717dfc8af586bc0291cff30dc7716baa1c5fbe769ec75b0ca271606879c
BLAKE2b-256 checksum
How to use checksums
9cb2b6501f39676c268d2528caa4adf50dfd70ca89034801a829e0aaa618b31f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.7

Release files / mrange-1.2-py3-none-any.whl

Download URL mrange-1.2-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9cbf3d4044db21354037c9c0bc6441a52293492e0bffda257fc48c4868f83462
BLAKE2b-256 checksum
How to use checksums
a58763bdde5b2c50d03ffeb5cc9a20fef02fa62e3a854206dc7f482b33b024f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.7

Security for mrange 1.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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