SHGOFAST
A monkey-patched Cython/C++ backend for bottleneck functions and classes
of the scipy.optimize.shgo code using the simplicial sampling method.
Install
The module can be installed using your preferred pip command from the
source archives root directory (where this README resides).
The installation requires a reasonably modern C++ compiler (tested with g++
13.1.1) and the boost software library (tested with version 1.81.0). If boost
is not available, defining the C++ macro STD_SET_ONLY will use only standard
library components.
Use
Simply import the patch and unpatch functions from shgofast:
from scipy.optimize import shgo
from shgofast import patch
patch()
# This should run faster now if cost_fun is not the bottleneck:
shgo(cost_fun, sampling_method='simplicial', **kwargs)
Improvement
From a one-shot measurement, execution time of identical shgo calls has
been reduced from 13 seconds to 2.5 seconds for a four-dimensional problem
in which shgo was not limited by the function but foremost by the
VertexCacheField.proc_minimisers method.
Changelog
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.1.3] - 2024-09-22
- Add missing NumPy dependency to build environment.
[0.1.2] - 2023-12-29
- Add missing
shgofast/vertex.pyxtoMANIFEST.in.
[0.1.1] - 2023-12-29
- Fix inclusion of build files using
MANIFEST.in.
[0.1.0] - 2023-12-29
- Initial version.
Metadata
Release files for shgofast 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shgofast-0.1.3.tar.gz | 11.2 kB | Without provenance | Details for shgofast-0.1.3.tar.gz |
Release files / shgofast-0.1.3.tar.gz
| Download URL | shgofast-0.1.3.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f434454638d29f50b009a9fa9d3e952c6df079098e8b222c5a3edfafaa58504
|
|
BLAKE2b-256 checksum How to use checksums |
aef32cd53958622e0facaa60878729b2cb6541c28ad8470d7cbb3ed46efb797f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.6
|
Security for shgofast 0.1.3
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.