Skip to main content

kronbinations is used to remove nested loops and perform parameter sweeps.

Project description

kronbinations

Install via pip install kronbinations

Import via from kronbinations import *

Description

kronbinations is used to remove nested loops, to perform multidimensional parameter sweeps and to generate arrays to store results of such sweeps.

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

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

kronbinations-0.1.tar.gz (3.8 kB view details)

Uploaded Source

File details

Details for the file kronbinations-0.1.tar.gz.

File metadata

  • Download URL: kronbinations-0.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for kronbinations-0.1.tar.gz
Algorithm Hash digest
SHA256 116bd3160a88676aa59a6739dae0085e2dd15616f1677a6905bfe346938f0ad2
MD5 cf4cbfbe1d9d28757da516f69aab3077
BLAKE2b-256 e0da7c918f45775b6737ad58b2b27f9a3ce6111a9e741c49bc413599c911fe13

See more details on using hashes here.

Supported by

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