Utility to efficiently explore functions on their domains
Project description
Cartesian Explorer
A handy tool to map functions over their domains.
Works:
Map over cartesian product of arguments: pass arrays of values for function argument
Built-in caching
Handy plotting utilities
Resolving dependencies between functions that require and provide variables
Usage
Map
from cartesian_explorer import Explorer
explorer = Explorer()
def my_function(x, y):
return x+y
data = explorer.map(my_function, x=range(5), y=range(3))
print(data)
assert data.shape == (5, 3)
assert data[1, 2] == my_function(1, 2)
Cache
from cartesian_explorer import Explorer
explorer = Explorer()
mock = MagicMock()
my_function = mock.my_function
wrapped = explorer.cache_function(my_function)
wrapped(a=1, b=2)
wrapped(a=1, b=2)
my_function.assert_called_once_with(a=1, b=2)
TODO
[ ] Interpolation, extrapolation
[ ] Vectorized providers
[x] Plot distribution props along additional distribution var
History
0.1.3 (2020-09-29)
Joblib disc caching and parallelism
Dependency graph visualization with networkx
Plot-level variables
0.0.1 (2020-09-23)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cartesian_explorer-0.1.12.tar.gz
(26.1 kB
view hashes)
Built Distribution
Close
Hashes for cartesian_explorer-0.1.12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd7b25fdcd814b7845b00c2881f64f224e0e69c2699ebe1620a0bfc1ed343f69 |
|
MD5 | d50c9fafb0f460d43ed8d950ea3dddd7 |
|
BLAKE2b-256 | 25c838394667b8814b3f52b59eabf68020167137dc9a21897c86b35cb2d587f1 |
Close
Hashes for cartesian_explorer-0.1.12-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8f17565166330b959b5902c1ce7108e30888e183409deadd24808b766a487d3 |
|
MD5 | 40284e8c1aeec4b91a0655b8f186c458 |
|
BLAKE2b-256 | 9fb24837c18c69b556e91543a1af5c04dba08419aad0577e8c704a53d4313c62 |