Skip to main content

The paramspace package is an open-source project and Python package that makes it possible to conveniently define dictionary-based, multi-dimensional parameter spaces and iterate over them.

Why?

In Python, dictionaries provide a powerful tool to control program behaviour. Frequently, these configuration structures take the shape of highly nested dictionaries, where each hierarchical level holds the information required at that point of the program.

However, it is frequently desired to instantiate some program not with a single set of parameters but with a set of parameters. Especially for scientific purposes, e.g. numerical simulations, it is often required to perform many instantiations of the same program with different parameters, so-called parameter sweeps. For simple configuration structures, this can be easily achieved by basic control flow tools; however, this becomes increasingly difficult the more parameters are desired to be sweeped over or the further nested they are in the configuration hierarchy.

This is where the paramspace package comes in.

How?

At its core, the paramspace package supplies the ParamSpace class, which accepts a dictionary-like object. To define parameter dimensions, individual entries within that dictionary can be replaced by a ParamDim object, regardless of the position and nestedness within the dictionary. The parameter space is then the cartesian product of all parameter dimensions, each parameter opening a new dimension of the parameter space.

When iterating over the space, each returned value is a dictionary with one combination of parameters, ready to be passed on to run the desired program. This allows retaining a hierarchical configuration structure while at the same time being able to conveniently perform sweeps over parameters, e.g. to spawn simulations with.

Furthermore, the paramspace package integrates tightly with YAML, making it very simple to define multidimensional parameter spaces directly in a configuration file.

Learn More

For more information, visit the project page and have a look at the README: https://gitlab.com/blsqr/paramspace

For use of paramspace, see utopya or the Utopia Project.

Metadata

Release files for paramspace 2.8.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 paramspace 2.8.2
File Size Uploaded
paramspace-2.8.2.tar.gz 60.1 kB Details

Built distribution (wheel)

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

Total release size: 106.8 kB

Release files / paramspace-2.8.2.tar.gz

Download URL paramspace-2.8.2.tar.gz
Size 60.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d96d93f8af734b334548d3edf16bde335d4f4d9fd5e67a3c88955fd7772db242
BLAKE2b-256 checksum
How to use checksums
0d86ac83890e529f60fd843d13987d1d3d67f7655fa695f8ce5b81bb7bd4a280
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release files / paramspace-2.8.2-py3-none-any.whl

Download URL paramspace-2.8.2-py3-none-any.whl
Size 46.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6894ba48b715f0fb61b44d69c3a42e0ca8269dc6048a59a5513b9530bad4ec29
BLAKE2b-256 checksum
How to use checksums
2b7ee9559fc8dbccee2ab32157a9622ac098118679dae09e02d168165566c78f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release history Release notifications | RSS feed

This release

2.8.2 This release

2 release files

2.8.1

2 release files

2.8.0

2 release files

2.7.1

2 release files

2.7.0

2 release files

2.6.2

2 release files

2.6.1

2 release files

2.5.9

2 release files

2.5.8

2 release files

2.5.7

2 release files

2.5.6

2 release files

2.5.5

2 release files

2.5.4

2 release files

2.5.3

2 release files

2.5.2

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.3

2 release files

2.1.1

2 release files

2.0.0

2 release files

1.1.1

2 release files

1.0.1

2 release files

0.9.9

2 release files

0.9

3 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