You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compiled, a scalar over a matrix argument divides by each entry, where evaluation inverts #2287
Compiled, a scalar divided by a matrix argument divides by each entry, where evaluation multiplies by the inverse (#2232). Master:
Answered
"2 / [[1, 2], [3, 4]]".ToEntity().Evaled
[[-4, 2], [3, -1]], which is 2 times the inverse
"x / A" compiled over GenTensor<double>, with A = [[1, 0], [0, 1]] and x = 1
[[1, Infinity], [Infinity, 1]]
With a matrix written into the expression, compiled output agrees with evaluation, because the expression is simplified before it is compiled: "x / [[1, 0], [2, 4]]" at 1 is [[1, 0], [-0.5, 0.25]]. Only a matrix argument reaches TensorCompilation's DivideFromScalar, which is Elementwise(a, x => Divide(scalar, x)).
Activity
A scalar over a matrix argument is not compiled (ASC-Community#2289)