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
(defparameter int-tensor (magicl:from-list '(123) '(3)))
(defparameter float-tensor (magicl:from-list '(1.02.03.0) '(3)))
;; This works
(magicl:.+ float-tensor int-tensor)
;; This is a TYPE-ERROR condition
(magicl:.+ int-tensor float-tensor)
A solution would be to coerce/round/cast one of the arguments, but which one, and when?
Take an example of elementwise sum and the cases of 0.5 + 1 being stored in an int32-tensor. Depending on where, say, the round function is applied the first sum could be
(+ (round0.5) 1)
;; 1
(round (+0.51))
;; 2
The text was updated successfully, but these errors were encountered:
I'm not even convinced this is a bug or appropriate behaviour...
Depending on the order of arguments we can get a type-error from [the setf] (https://github.com/quil-lang/magicl/blob/master/src/high-level/abstract-tensor.lisp#L197=) in
binary-operator
A solution would be to coerce/round/cast one of the arguments, but which one, and when?
Take an example of elementwise sum and the cases of
0.5 + 1
being stored in anint32
-tensor. Depending on where, say, theround
function is applied the first sum could beThe text was updated successfully, but these errors were encountered: