Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Successful broadcasting by comparison operators depends on operand order #68

Open
cguenthner opened this issue Feb 19, 2019 · 0 comments

Comments

@cguenthner
Copy link

(require '[clojure.core.matrix :as m])

(m/set-current-implementation :vectorz)

(def vect (m/array [1 0]))
(def mat (m/array [[0 0] [1 1]]))

(m/eq mat vect) ;; => [[0 1] [1 0]]
(m/eq vect mat) ;; java.lang.IllegalArgumentException
                ;; Can't broadcast Matrix with shape [2,2] to shape: [2]

The above exception does not occur with the ndarray core.matrix implementation. With vectorz, it occurs with at least some of the other comparison operators (e.g. ne, gt) but not with at least some of the other arithmetic operators (e.g. add).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant