Skip to content

Commit

Permalink
docs (#32)
Browse files Browse the repository at this point in the history
* doc

* release2
  • Loading branch information
lockwo authored Sep 15, 2024
1 parent 7d96bcf commit 9d2c899
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,29 @@ name: Deploy package
on:
workflow_dispatch:


jobs:
pypi-publish:
name: upload release to PyPI
name: Upload release to PyPI
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
id-token: write # Required for trusted publishing
steps:
# retrieve your distributions here
- name: Check out repository code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install build dependencies
run: |
python -m pip install --upgrade pip build
- name: Build the package
run: |
python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@release/v1
6 changes: 4 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Available at https://lockwo.github.io/distreqx/.
## Quick example

```python
import jax
from jax import numpy as jnp
from distreqx import distributions

key = jax.random.PRNGKey(1234)
Expand All @@ -35,9 +37,9 @@ sigma = jnp.array([0.1, 0.2, 0.3])

dist = distributions.MultivariateNormalDiag(mu, sigma)

samples = dist_distrax.sample(key)
samples = dist.sample(key)

print(dist_distrax.log_prob(samples))
print(dist.log_prob(samples))
```

## Differences with Distrax
Expand Down

0 comments on commit 9d2c899

Please sign in to comment.