Skip to main content

Variable Adding 2.0

Adaptive fractional, weighted, and iterative variable addition.

Variable Adding is a dependency-free Python toolkit for fractional increments, percentage weighting, numerical model search, and weighted gradient descent.

Installation

pip install variable-adding==2.0

Examples

from variable_adding import (
    variable_add, apply_weight, weighted_blend,
    Model, Variable, Objective, minimize,
)

print(variable_add(20, 10, scale=0.5))  # 25.0
print(apply_weight(10, 20, 90))        # 29.0
print(weighted_blend(10, 20, 90))      # 11.0

model = Model()
model.add_variable(Variable("x", 5, lower=-10, upper=10))
model.set_objective(Objective(lambda values: (values["x"] - 2)**2))
print(minimize(model))

Features

  • Core addition: variable_add, half_add, quarter_add, double_add, percentage_add, weighted_add, exponential_add.
  • Adaptive methods: adaptive_step, iterate_add, optimize_scalar.
  • Weighting: apply_weight, weighted_blend, tradeoff_update, half_weighted_balance, exponential_blend, quadratic_blend, sweep_weights.
  • Model search: Variable, Objective, Model, Result, minimize.
  • Gradient methods: weight_law_rate, weighted_gradient_descent, GradientStep.
  • Parameter tools: tune_angle, rotation_matrix (quantum-inspired mathematics, not quantum hardware support).

Optimization routines are numerical heuristics; global convergence is not guaranteed. Gradient descent behavior depends on objective smoothness and appropriate parameter settings.

Publishing

python -m pip install --upgrade build twine
python publish_pypi.py --dry-run
python publish_pypi.py --repository pypi

Official PyPI and TestPyPI require separate credentials. Supply a newly generated API token when prompted, or set PYPI_API_TOKEN for official PyPI. Never publish your API token with the package.

Metadata

Release files for variable-adding 2.0

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

Source distribution (sdist)

Source distribution for variable-adding 2.0
File Size Uploaded Provenance Actions
variable_adding-2.0.tar.gz 8.6 kB Without provenance Details for variable_adding-2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for variable-adding 2.0
File Interpreter ABI Platform Actions
variable_adding-2.0-py3-none-any.whl Python 3 none any Details for variable_adding-2.0-py3-none-any.whl

Total release size: 16.9 kB

Release files / variable_adding-2.0.tar.gz

Download URL variable_adding-2.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2ddac8606b5379f9843ebf94e0200e410659aea79608ff85d1f6511090209b5b
BLAKE2b-256 checksum
How to use checksums
7c3f21b2dd2252656a317a2e416eae37e1f256851aec0d0be0231e2e6bab4a2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / variable_adding-2.0-py3-none-any.whl

Download URL variable_adding-2.0-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b96f36a13c766668c030fdfb95aec89ff7a30de8134a0b53fa72bbe5df5613d
BLAKE2b-256 checksum
How to use checksums
ca34cf045bb2b894d1ca85da3240ec974618d8540b2aa3d4565548366db84a12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for variable-adding 2.0

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.

Release history Release notifications | RSS feed

This release

2.0 This release

2 release files No provenance

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