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
I'm trying to understand the following behavior of the ndarray implementation and am not sure if there's a bug or if I'm misunderstanding something. If I create a new array using fill! and multiply it by its transpose, I get the expected result. If I create a new array using fill and multiply it by its transpose, I get an exception. I don't observe this behavior with the vectorz or persistent-vector implementations.
(m/set-current-implementation :ndarray)
(def a (m/fill! (m/new-array [2 3]) 1))
(m/mmul a (m/transpose a)) ; => #object[clojure.core.matrix.impl.ndarray_object.NDArray 0x1b4f7b03 [[3.0 3.0] [3.0 3.0]]]
(def b (m/fill (m/new-array [2 3]) 1))
(m/add b b) ; => [[2 2 2] [2 2 2]]
(m/mmul b (m/transpose b))
; => Unhandled java.lang.IllegalArgumentException
; No implementation of method: :set-2d! of protocol: #'clojure.core.matrix.protocols/PIndexedSettingMutable
; found for class: clojure.lang.PersistentVector
The text was updated successfully, but these errors were encountered:
I'm trying to understand the following behavior of the ndarray implementation and am not sure if there's a bug or if I'm misunderstanding something. If I create a new array using
fill!
and multiply it by its transpose, I get the expected result. If I create a new array usingfill
and multiply it by its transpose, I get an exception. I don't observe this behavior with the vectorz or persistent-vector implementations.The text was updated successfully, but these errors were encountered: