Skip to main content

Documentation Status

Overview

A simple, SciPy like interface for the excellent nonlinear optimization library NLopt to make switching between SciPy and NLopt a piece of cake. SimpleNLopt's functions can act as a drop-in replacement for SciPy functions. Major differences compared to plain NLopt:

  • SciPy like minimize(method='NLopt algorithm') API for NLopt's local optimizers
  • Automatic numerical approximation of the gradient if analytical gradient is not available
  • Automatic handling of constraints via the augmented lagrangian method without boilerplate code
  • Scipy like interfaces to NLopt's global optimizers with hard stopping criteria
  • SciPy like curve fitting using NLopt's algorithms

Documentation

Refer to the online documentation for detailed description of the API and examples

Installation

pip install simplenlopt

Example: Minimizing the Rosenbrock function in simplenlopt and scipy

import simplenlopt
from scipy.optimize import rosen, rosen_der
import scipy
import numpy as np

x0 = np.array([0.5, 1.8])

res = simplenlopt.minimize(rosen, x0, jac = rosen_der)
print("Found optimum: ", res.x)

res_scipy = scipy.optimize.minimize(rosen, x0, jac = rosen_der)
print("Found optimum: ", res_scipy.x)

Metadata

Release files for simplenlopt 1.1

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

Built distribution (wheel)

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

Release files / simplenlopt-1.1-py3-none-any.whl

Download URL simplenlopt-1.1-py3-none-any.whl
Size 24.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eaa100a48d0c22d4f2808e7dc365ecf0924ee4eb9641e79339cfb1766cb8f06f
BLAKE2b-256 checksum
How to use checksums
5c49f5a0ab1e09eded33e63065879cd470e2cd3264c276e86cb31c762062eb14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Security for simplenlopt 1.1

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

1.1 This release

1 release file 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