GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - DanielBok/nlopt-python: A project to package the NLOpt library to wheels

BranchesTags
Open more actions menu

Latest commit

 

History

111 Commits
111 Commits

Folders and files

NameName
Last commit message
Last commit date
.claude/skills/update-nlopt
.claude/skills/update-nlopt
 
 
.github/workflows
.github/workflows
 
 
extern
extern
 
 
test_scripts
test_scripts
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
.python-version
.python-version
 
 
CMakeLists.txt
CMakeLists.txt
 
 
LICENSE
LICENSE
 
 
MANIFEST.in
MANIFEST.in
 
 
Pipfile
Pipfile
 
 
Pipfile.lock
Pipfile.lock
 
 
README.md
README.md
 
 
extensions.py
extensions.py
 
 
setup.cfg
setup.cfg
 
 
setup.py
setup.py
 
 

Repository files navigation

NLopt Python

PyPI version PyPI downloads Python versions License Build Nightly Build Documentation

Python wheels for NLopt, a library for nonlinear optimization. NLopt provides a common interface to a large collection of optimization algorithms, both global and local, gradient-based and derivative-free, for constrained or unconstrained problems.

This project exists to make installing NLopt in Python as simple as pip install nlopt — no compiler, SWIG, or system NLopt installation required. Prebuilt wheels are published for Windows, macOS, and Linux.

Installation

pip install nlopt

Prebuilt wheels are available for Python 3.10+ on Windows, macOS, and Linux (x86_64 and arm64). If no matching wheel is found for your platform, pip will fall back to building from source, which requires SWIG and a C++ compiler.

Usage

import nlopt
import numpy as np

def objective(x, grad):
    return x[0] ** 2 + x[1] ** 2

opt = nlopt.opt(nlopt.LN_COBYLA, 2)
opt.set_min_objective(objective)
opt.set_lower_bounds([-10, -10])
opt.set_upper_bounds([10, 10])
opt.set_xtol_rel(1e-6)

x = opt.optimize(np.array([1.0, 1.0]))
print(f"Minimum found at {x}, value = {opt.last_optimum_value()}")

Documentation

Full API documentation, including the list of supported algorithms, is available at nlopt.readthedocs.io.

Releases

Builds run nightly and publish dev versions to TestPyPI so regressions surface before a real release. Stable releases are cut from tagged GitHub Releases and published to PyPI. The vendored extern/nlopt submodule is checked daily against upstream and bumped automatically via PR when a new NLopt version is released.

License

This project wraps NLopt, whose underlying routines are covered by a mix of licenses (mainly MIT and LGPL) depending on the algorithm — see LICENSE for details. The Python packaging in this repository is licensed under MIT.

About

A project to package the NLOpt library to wheels

Topics

nloptnon-linear-optimizationoptimizationpython

Resources

Readme
License
Activity

Stars

34 stars

Watchers

4 watching

Forks

19 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.