Skip to main content

flatpy

PyPi

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()
flatpy

Metadata

Release files for flatpy 0.0.4

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

Source distribution (sdist)

Source distribution for flatpy 0.0.4
File Size Uploaded
flatpy-0.0.4.tar.gz 1.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for flatpy 0.0.4
File Interpreter ABI Platform
flatpy-0.0.4-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 1.4 MB

Release files / flatpy-0.0.4.tar.gz

Download URL flatpy-0.0.4.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
0a51a4b4607792b0921c6d1fd0bb41216178d0e3c09db5566af46e749361bd4e
BLAKE2b-256 checksum
How to use checksums
160872831c714bfa269698df7858d3e6b05a4b053e1e43f0b7d90c56bc602865
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release files / flatpy-0.0.4-py2.py3-none-any.whl

Download URL flatpy-0.0.4-py2.py3-none-any.whl
Size 6.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
8818dae7e4ab685c88bcf7d25fe9351097d164044b94c06cb2047aecba53d01f
BLAKE2b-256 checksum
How to use checksums
24c9f70205f6973d7fa384687c2213e9e63fc0cb9e63abb4003549209fffa2c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

1 release file

0.0.1

1 release file

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