A library for computing samplings in arbitrary dimensions
Project description
Function Library for Analysis and Testing in Python - A collection of scalar functions (many of which generalize to arbitrary dimensions) typically used in global optimization problems, but also suitable for various other test cases.
Working on several different applications with scalar field topology, active learning, and optimization, I have found myself programming and reprogramming a core set of often cited test functions. In addition, I have found the need to modify or tweak some of these functions while also generating completely novel functions that exhibit some specified behavior. This work is an attempt to consolidate those functions and offer them in a reusable fashion in a simple python library with some nice recipes/utilities such as generating a test 2D grid of data, adding noise to the functions, etc.
Installation
A preliminary version is available on PyPI:
pip install flatpy
Otherwise, you can download the repository for the most cutting edge additions:
git clone https://github.com/maljovec/flatpy.git cd flatpy python setup.py [build|develop|install]
Usage
import flatpy import matplotlib.pyplot as plt X = flatpy.utils.generate_test_grid_2d(40) x, y = flatpy.utils.unpack2D(X) z = flatpy.nD.schwefel(X) plt.figure() img = plt.tricontourf(x, y, z, cmap="cividis") plt.colorbar(img) plt.show()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file flatpy-0.0.4.tar.gz
.
File metadata
- Download URL: flatpy-0.0.4.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a51a4b4607792b0921c6d1fd0bb41216178d0e3c09db5566af46e749361bd4e |
|
MD5 | 82e18beea76eed12783c77eecefc5450 |
|
BLAKE2b-256 | 160872831c714bfa269698df7858d3e6b05a4b053e1e43f0b7d90c56bc602865 |
File details
Details for the file flatpy-0.0.4-py2.py3-none-any.whl
.
File metadata
- Download URL: flatpy-0.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8818dae7e4ab685c88bcf7d25fe9351097d164044b94c06cb2047aecba53d01f |
|
MD5 | 1f37223fdfc1ca40ee1e4b03941dba8d |
|
BLAKE2b-256 | 24c9f70205f6973d7fa384687c2213e9e63fc0cb9e63abb4003549209fffa2c5 |