Skip to content

Commit

Permalink
refactor rng_fn method (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
aloctavodia authored Dec 29, 2024
1 parent 064457e commit cd5dfbe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pymc_bart/bart.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ def rng_fn( # pylint: disable=W0237
if not size:
size = None

if isinstance(cls.Y, (TensorSharedVariable, TensorVariable)):
Y = cls.Y.eval()
else:
Y = cls.Y

if not cls.all_trees:
if isinstance(cls.Y, (TensorSharedVariable, TensorVariable)):
Y = cls.Y.eval()
else:
Y = cls.Y

if size is not None:
return np.full((size[0], Y.shape[0]), Y.mean())
else:
Expand Down

0 comments on commit cd5dfbe

Please sign in to comment.