Registry / ai-ml / sleipnirgroup-jormungandr

sleipnirgroup-jormungandr

JSON →
library0.5.4pypypiunverified

Reverse mode automatic differentiation library and domain-specific language for nonlinear programming (NLP) solvers. Designed for efficient gradient and Hessian computations, it provides a Python DSL to formulate and solve optimization problems. Current version 0.5.4, requires Python >=3.12. Development is active with pre-1.0 breaking changes expected.

pip install sleipnirgroup-jormungandr
INSTALL
IMPORT
SIG · SLEIPNIRGROUP-JORM
S
sleipnirgroup-jormungandr
ai-mlpythonv0.5.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Jormungandr
from jormungandr import Jormungandr
from sleipnirgroup_jormungandr import Jormungandr
The library is installed as sleipnirgroup-jormungandr but the top-level import package is 'jormungandr'.
autodiff
from jormungandr import autodiff
The autodiff module is nested under the main 'jormungandr' package.
NlpSolver
from jormungandr.nlp import NlpSolver
from jormungandr import NlpSolver
NlpSolver lives in the 'nlp' submodule, not at the top level.

Minimal example showing variable creation, expression evaluation with reverse mode autodiff, and NLP solving.

from jormungandr import Jormungandr # Define variables x = Jormungandr.variable('x') y = Jormungandr.variable('y') # Define expression f = x**2 + y**2 # Compute gradient (reverse mode) grad = Jormungandr.gradient(f, [x, y]) print('Gradient at (1,2):', grad.eval({'x': 1, 'y': 2})) # Solve NLP from jormungandr.nlp import NlpSolver solver = NlpSolver() solver.set_objective(f) solver.set_initial_guess({'x': 0.0, 'y': 0.0}) solution = solver.solve() print('Solution:', solution)
Debug
Known issues
breakingAPI is unstable before 1.0. Expect changes in module names, function signatures, and behavior between minor versions. Pin your dependency to a specific minor version.
fix
Pin for production: sleipnirgroup-jormungandr==0.5.4
affects: <1.0
gotchaThe package name on PyPI is 'sleipnirgroup-jormungandr' but the import is 'jormungandr'. Do not use the hyphens in import statements.
fix
Always use 'import jormungandr' or 'from jormungandr import ...'
affects: all
deprecatedThe old autodiff API (e.g., `Jormungandr.auto_diff`) is deprecated in favor of `Jormungandr.gradient`. The old name may be removed in 0.6.
fix
Replace `auto_diff` with `gradient` in your code.
affects: >=0.5, <0.6
gotchaDefault variable types are symbolic scalars. To create vectors/matrices, use `Jormungandr.variable('x', shape=(3,))` or similar. Forgetting the shape leads to shape mismatch errors.
fix
Explicitly specify shape when creating non-scalar variables.
affects: all
Upgrade
Version history
0.5.4latest on PyPI · released Apr 26, 2026
Audit
Dependencies
numpyrequiredRequired for array operations and interfacing with Jormungandr's symbolic types.
casadioptionalOptional but often used together for algorithm prototyping.
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
sleipnirgroup-jormungandr — pip install sleipnirgroup-jormungandr · libregistry