local_add_neg_to_sub
rewrite gives wrong results with negative constants
#584
Labels
local_add_neg_to_sub
rewrite gives wrong results with negative constants
#584
Reported in https://discourse.pymc.io/t/shape-issue-with-custom-logp-in-densitydist/13608/5?u=ricardov94
pytensor/pytensor/tensor/rewriting/math.py
Lines 1897 to 1922 in c52154d
The helper
get_constant
actually callsget_unique_constant_value
under the hood, which in this case returns a single scalar, not the filled homogenous vector. The rewrite itself is also expecting only a scalar constant, otherwise it should be usingnp.all
The text was updated successfully, but these errors were encountered: