Skip to content

Commit

Permalink
models: problem.get_random_point use new pymc draw for rng
Browse files Browse the repository at this point in the history
  • Loading branch information
hvasbath committed Jan 24, 2024
1 parent 7aa73ad commit a22b2dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions beat/models/problems.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import numpy as num
import pytensor.tensor as tt
from pymc import Deterministic, Model, Potential
from pymc import Deterministic, Model, Potential, draw
from pyrocko import util
from pyrocko.model import get_effective_latlon
from pytensor import config as tconfig
Expand Down Expand Up @@ -306,7 +306,7 @@ def get_random_point(self, include=["priors", "hierarchicals", "hypers"]):
if "hierarchicals" in include:
for name, param in self.hierarchicals.items():
if not isinstance(param, num.ndarray):
point[name] = param.random()
point[name] = draw(param)

if "priors" in include:
for param in pc.priors.values():
Expand All @@ -318,7 +318,7 @@ def get_random_point(self, include=["priors", "hierarchicals", "hypers"]):
self.init_hyperparams()

hps = {
hp_name: param.random()
hp_name: draw(param)
for hp_name, param in self.hyperparams.items()
if not isinstance(param, num.ndarray)
}
Expand Down

0 comments on commit a22b2dd

Please sign in to comment.