Skip to main content

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.

Usage:

  • Pass arbitrarily many arrays to the constructor kronbinations, to iterate over all combinations of the arrays elements.
k = kronbinations(array([1,2,3]), array(['a','b','c']), array([False,True,False]))
  • If you need to store results of some computation in an array, you can construct these arrays via k.empty(), k.ones(), k.zeros(), , k.full(fill_value), k.randint(), k.rng_random(rng) (and pass the corresponding numpy arguments , eg. k.zeros(dtype=int)).
  • Finally you can iterate over all combinations using:
for index, values, changed in k.kronprod(index=True, change=True, progress=True):
    # Demonstrating a few of the functions here
    if changed[0]:
        print('First value changed')
    x[index] = values[0]

Authors:

By Michael Schilling

Metadata

Release files for kronbinations 0.3

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

Source distribution (sdist)

Source distribution for kronbinations 0.3
File Size Uploaded
kronbinations-0.3.tar.gz 5.3 kB Details

Release files / kronbinations-0.3.tar.gz

Download URL kronbinations-0.3.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c96b98e835002d6bf5e895ba25aa12605b27daa0fdaa47aa18b70728e114eb81
BLAKE2b-256 checksum
How to use checksums
06cf24ce41731eecd82bc24119a4b8849f3bc543b09e348d947cc1032961265f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.15

Release history Release notifications | RSS feed

1.18

2 release files

1.17

2 release files

1.16

1 release file

1.15

2 release files

1.14

2 release files

1.13

2 release files

1.12

2 release files

1.10

2 release files

1.9

2 release files

1.8

2 release files

1.7

2 release files

1.6

2 release files

1.5

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0

1 release file

0.6

1 release file

This release

0.3 This release

1 release file

0.2

1 release file

0.1

1 release file

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