semvec/pypi-packages huggingface dataset:
ouroboroslib 0.0.2
A Graph Abstract Data Type
Keywords: python,graph,data,structure,data-structure


# Ouroboroslib

A Graph Abstract Data Type Library. Named after the symbol of a serprent eating its own tail.

## Installation

`pip3 install ouroboroslib`

## Usage

```py
from ouroboroslib import OuroborosGraph

ouroboros = OuroborosGraph(directed=True)
# Each tuple in the edge list is (starting_node, ending_node, edge_value)
ouroboros.overwrite_graph(edge_list=[(1, 2, 7), (2, 3, 10)])
ouroboros.add_node(4)
ouroboros.add_edge(3, 4, value=7)
ouroboros.delete_node(2)
# {(3, 4, 7)} - only 1 edge because node 2 is deleted
edges = ouroboros.tuple_edges()
```
pjax 0.0.2
Probability distributions for JAX

# PJAX

Do you just want probability distributions for JAX without all the added baggage of `tensorflow-probability` or `numpyro`?

Do you have some weird distribution not available in the above or `scipy.stats`?

Then `PJAX` is for you. Lightweight probability distributions using JAX backend. That's it.

```python
import jax
import jax.numpy as jnp
from pjax import distributions


a = jnp.asarray([4.3, 0.8])
b = jnp.asarray([1.2, 7.3])
dist = distributions.Gamma(a, b)

x = jnp.asarray([0.4, 0.5, 0.6, 0.7])
dist.log_pdf(x)

key = jax.random.PRNGKey(42)
dist.sample(key, shape=(100,))
```