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.12 (2020-09-29)
Row-level variables: now can visualize 4 dimensions
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cartesian_explorer-0.1.13.tar.gz.
File metadata
- Download URL: cartesian_explorer-0.1.13.tar.gz
- Upload date:
- Size: 119.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b94bb07e8c8a5697b10bbedaed688456e2199d01dfd31ae6b4151d96029b7ff
|
|
| MD5 |
8b57f1191c00c68f6b75fe1415c9c25c
|
|
| BLAKE2b-256 |
aeb61899ed52d1a07525baba703f8f933dc241e700f49fb2e97bfbe301a579ef
|
File details
Details for the file cartesian_explorer-0.1.13-py2.py3-none-any.whl.
File metadata
- Download URL: cartesian_explorer-0.1.13-py2.py3-none-any.whl
- Upload date:
- Size: 27.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fb96988729773fac08454c0847118b8aaa6c63c8a3fbbee3cf3adc41dc72d57
|
|
| MD5 |
fe40998ba1435a6a757b95ae684f2e21
|
|
| BLAKE2b-256 |
70fafd8db377c8323de30ca80c6f96337b9f83d278c1e4d5bfd9528e22977687
|