Graphiit
Utilities for building PyPhi networks that need to be large and/or malleable.
Installation
You can install graphiit from PyPi:
pip install graphiit
Or the latest development version from Github:
pip install git+https://github.com/grahamfindlay/graphiit@develop
Basic Usage
At the core of graphiit is the Graph object.
>>> from graphiit import Graph
Graph takes a graph configuration as a parameter:
>>> graph_config = [
('A', 'OR', 'B', 'C'),
('B', 'AND', 'A', 'C'),
('C', 'XOR', 'A', 'B')]
>>> graph = Graph(graph_config)
Each line in the configuration specifies the name of a node, the mechanism that the node implements, and the nodes in the network which input to the node. For example, in the above configuration the line ('A', 'OR', 'B', 'C') specifies that node A is an OR-gate over the inputs B and C.
Once we’ve initialized a Graph object, we can create a PyPhi Network:
>>> network = graph.pyphi_network()
That’s it! You can now perform all IIT computations using this network.
Mechanisms
While graphiit has a number of builtin mechanisms, you can easily specify your own by defining a function which takes the states of the input nodes as a parameter and returns True if the mechanism should be on and False if it should be off.
>>> def ALWAYS_ON(inputs): ... return True
You can then use this function in the graph configuration:
>>> graph_config = [('A', ALWAYS_ON, 'A')]
>>> graph = Graph(graph_config)
See graphiit.micro_mechanisms for implementations of the basic mechanisms.
Other Functionality
TODO
Metadata
Release files for graphiit 0.1.0
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 |
|---|---|---|---|---|
| graphiit-0.1.0.tar.gz | 19.3 kB | Without provenance | Details for graphiit-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| graphiit-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for graphiit-0.1.0-py3-none-any.whl |
Total release size: 26.1 kB
Release files / graphiit-0.1.0.tar.gz
| Download URL | graphiit-0.1.0.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e898f9d55591e39a48c2a5d04e0658fb4fe7747eeb9f50f33a9af41c08ad9e52
|
|
BLAKE2b-256 checksum How to use checksums |
a6c706488516df23f39694a8af8d82002e300fbbb6da9916930db659a8aa9258
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / graphiit-0.1.0-py3-none-any.whl
| Download URL | graphiit-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fd237de6df6ddff7bc4481d8ebf73a8cbde5c413481d757a3f3f7c79890b490
|
|
BLAKE2b-256 checksum How to use checksums |
2c2bc40720c78c0d4710af179aedce39daad018a0a49fbcd411c440e0f46cc8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for graphiit 0.1.0
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.