mikera / vectorz-clj

Fast matrix and vector maths library for Clojure - as a core.matrix implementation
203 stars 19 forks source link

Vectorz breaks dot product for matricies #64

Open kieranbrowne opened 7 years ago

kieranbrowne commented 7 years ago

Hi there,

In vectorz-clj 0.46.0 you can't use the matrix/dot function on vectorz' matrices but this works in vanilla core.matrix.

Core.Matrix

> (use 'clojure.core.matrix)
;;=> nil
> (def v (array [[1 2 3] [4 5 6]]))
;;=> #`user/v
> (dot v v)
;;=> [[9 12 15] [24 33 42]]

Vectorz

> (set-current-implementation :vectorz)
;;=> :vectorz
> (def v (array [[1 2 3] [4 5 6]]))
;;=> #'user/v
> (dot v v)
;;=> RuntimeException Can't coerce to AVector with shape: [2 3]  mikera.vectorz.matrix-api/avector-coerce* (matrix_api.clj:198)