Skip to content

Commit

Permalink
Convert point_logps values to arrays
Browse files Browse the repository at this point in the history
When compiling to JAX the returned object is a DeviceArray, which causes problems downstream in check_start_vals
  • Loading branch information
ricardoV94 authored and twiecki committed Nov 27, 2021
1 parent 01ed358 commit f6f1a8e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pymc/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,9 @@ def point_logps(self, point=None, round_vals=2):
return Series(
{
rv.name: np.round(
self.fn(logpt_sum(rv, getattr(rv.tag, "observations", None)))(point),
np.asarray(
self.fn(logpt_sum(rv, getattr(rv.tag, "observations", None)))(point)
),
round_vals,
)
for rv in self.basic_RVs
Expand Down

0 comments on commit f6f1a8e

Please sign in to comment.