Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #21

Merged
merged 3 commits into from
Feb 26, 2024
Merged

Dev #21

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/gsd/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.2.3dev"
__version__ = "0.2.3"
from gsd.fit import fit_moments as fit_moments, GSDParams as GSDParams
from gsd.gsd import (
log_prob as log_prob,
Expand Down
3 changes: 1 addition & 2 deletions src/gsd/gsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import jax.numpy as jnp
import numpy as np
from jax import Array
from jax.random import PRNGKeyArray
from jax.scipy.special import betaln
from jax.typing import ArrayLike

Expand Down Expand Up @@ -113,7 +112,7 @@ def variance(psi: ArrayLike, rho: ArrayLike) -> Array:
return rho * vmin(psi) + (1 - rho) * vmax(psi)


def sample(psi: ArrayLike, rho: ArrayLike, shape: Shape, key: PRNGKeyArray) -> Array:
def sample(psi: ArrayLike, rho: ArrayLike, shape: Shape, key: Array) -> Array:
"""Sample from GSD

:param psi: mean
Expand Down
2 changes: 1 addition & 1 deletion tests/experimental_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from gsd.experimental.fit import GridEstimator
from gsd.experimental.max_entropy import MaxEntropyGSD, vmax
from gsd.fit import fit_moments, GSDParams, log_pmax, pairs, pmax
from gsd.gsd import make_softvmin, vmax, vmin
from gsd.gsd import make_softvmin, vmin


class FitTestCase(unittest.TestCase):
Expand Down
Loading